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.
| Name | Type | Description |
|---|---|---|
id | string | Unique ID, prefixed sec_. |
object | string | Always secret. |
name | string | UPPER_SNAKE_CASE, unique in the organization. Used in references. |
description | string | null | Free text. |
createdBy | string | User who created it. |
createdAt | string | ISO 8601 timestamp. |
updatedAt | string | When the value or description last changed. |
{
"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
| Method | Path | Description |
|---|---|---|
| GET | /secrets | List secrets |
| POST | /secrets | Create 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
/secretsReturns secret metadata, newest first.
Request
curl https://api.apipods.com/v1/secrets \
-H "Authorization: Bearer $APIPODS_API_KEY"Response
{
"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
/secretsCreates a secret. Reference it in env right away.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
namerequired | body | string | UPPER_SNAKE_CASE, 1 to 64 characters. |
valuerequired | body | string | The secret value. Write-only. |
description | body | string | Free 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
{
"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"
}| Status | When |
|---|---|
400 | invalid_parameter: a secret with this name already exists. |
Retrieve a secret
/secrets/{secretId}Returns metadata only. There is no endpoint that returns a secret's value.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
secretIdrequired | path | string | The secret ID. |
Request
curl https://api.apipods.com/v1/secrets/sec_3n7q2w8k \
-H "Authorization: Bearer $APIPODS_API_KEY"Response
{
"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
/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
| Name | In | Type | Description |
|---|---|---|---|
secretIdrequired | path | string | The secret ID. |
value | body | string | New value. |
description | body | string | New 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
{
"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
/secrets/{secretId}Deletes the secret. Pods and workers that reference it fail to start with an error naming the missing secret.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
secretIdrequired | path | string | The 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.