Docs / API reference

Secrets

Secrets hold sensitive values such as tokens and passwords. Reference them from env as {{ secrets.NAME }}; the value is resolved when a pod or worker starts and never appears in API responses or logs.

The secret object

The value field is write-only: you send it on create and update, it is never returned. Values are encrypted at rest and limited to 32 KB.

NameTypeDescription
idstringUnique ID, prefixed sec_.
objectstringAlways secret.
namestringUPPER_SNAKE_CASE, unique in the organization. Used in references.
descriptionstring | nullFree text.
createdBystringUser who created it.
createdAtstringISO 8601 timestamp.
updatedAtstringWhen the value or description last changed.
secret object
{
  "id": "sec_3n7q2w8k",
  "object": "secret",
  "name": "HF_TOKEN",
  "description": "Hugging Face read token for gated models",
  "createdBy": "usr_2m9x4k7q",
  "createdAt": "2026-10-14T08:30:00Z",
  "updatedAt": "2026-11-03T16:45:20Z"
}

Endpoints

MethodPathDescription
GET/secretsList secrets
POST/secretsCreate a secret
GET/secrets/{secretId}Retrieve a secret's metadata
PATCH/secrets/{secretId}Update a value or description
DELETE/secrets/{secretId}Delete a secret

List secrets

GET/secrets

Returns secret metadata, newest first.

Request

curl https://api.apipods.com/v1/secrets \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "object": "list",
  "data": [
    {
      "id": "sec_3n7q2w8k",
      "object": "secret",
      "name": "HF_TOKEN",
      "description": "Hugging Face read token for gated models",
      "createdBy": "usr_2m9x4k7q",
      "createdAt": "2026-10-14T08:30:00Z",
      "updatedAt": "2026-11-03T16:45:20Z"
    }
  ],
  "hasMore": false,
  "nextCursor": null
}

Create a secret

POST/secrets

Creates a secret. Reference it in env right away.

Parameters

NameInTypeDescription
namerequiredbodystringUPPER_SNAKE_CASE, 1 to 64 characters.
valuerequiredbodystringThe secret value. Write-only.
descriptionbodystringFree text.

Request

curl -X POST https://api.apipods.com/v1/secrets \
  -H "Authorization: Bearer $APIPODS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "HF_TOKEN",
    "value": "hf_…",
    "description": "Hugging Face read token for gated models"
  }'

Response

201 Created
{
  "id": "sec_3n7q2w8k",
  "object": "secret",
  "name": "HF_TOKEN",
  "description": "Hugging Face read token for gated models",
  "createdBy": "usr_2m9x4k7q",
  "createdAt": "2026-10-14T08:30:00Z",
  "updatedAt": "2026-10-14T08:30:00Z"
}
StatusWhen
400invalid_parameter: a secret with this name already exists.

Retrieve a secret

GET/secrets/{secretId}

Returns metadata only. There is no endpoint that returns a secret's value.

Parameters

NameInTypeDescription
secretIdrequiredpathstringThe secret ID.

Request

curl https://api.apipods.com/v1/secrets/sec_3n7q2w8k \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

200 OK
{
  "id": "sec_3n7q2w8k",
  "object": "secret",
  "name": "HF_TOKEN",
  "description": "Hugging Face read token for gated models",
  "createdBy": "usr_2m9x4k7q",
  "createdAt": "2026-10-14T08:30:00Z",
  "updatedAt": "2026-11-03T16:45:20Z"
}

Update a secret

PATCH/secrets/{secretId}

Replaces the value or description. Running pods and workers keep the old value until they restart; new workers get the new value.

Parameters

NameInTypeDescription
secretIdrequiredpathstringThe secret ID.
valuebodystringNew value.
descriptionbodystringNew description.

Request

curl -X PATCH https://api.apipods.com/v1/secrets/sec_3n7q2w8k \
  -H "Authorization: Bearer $APIPODS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "hf_…"
  }'

Response

200 OK
{
  "id": "sec_3n7q2w8k",
  "object": "secret",
  "name": "HF_TOKEN",
  "description": "Hugging Face read token for gated models",
  "createdBy": "usr_2m9x4k7q",
  "createdAt": "2026-10-14T08:30:00Z",
  "updatedAt": "2026-11-18T15:00:00Z"
}

Delete a secret

DELETE/secrets/{secretId}

Deletes the secret. Pods and workers that reference it fail to start with an error naming the missing secret.

Parameters

NameInTypeDescription
secretIdrequiredpathstringThe secret ID.

Request

curl -X DELETE https://api.apipods.com/v1/secrets/sec_3n7q2w8k \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Response

Returns 204 No Content with an empty body.