Admiral
Variables

Update a variable

PATCH
/api/v1/variables/{variable.id}

Scope: var:write

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT) or Service Access Token (SAT). Pass the token in the Authorization header: Bearer adm_pat_...

In: header

Path Parameters

variable.id*id

Unique identifier for the variable (UUID).

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://admiral.example.com/api/v1/variables/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "variable": {      "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",      "key": "DATABASE_URL",      "value": "postgresql://db.internal:5432/inventory",      "sensitive": false,      "type": "VARIABLE_TYPE_STRING",      "scope": "VARIABLE_SCOPE_ENVIRONMENT",      "description": "Primary database connection string for the inventory service.",      "application_id": "a1b2c3d4-5678-9abc-def0-1234567890ab",      "environment_id": "e5f6a7b8-9012-3cde-f456-789012345678",      "created_by": "d290f1ee-6c54-4b01-90e6-d701748f0851",      "updated_by": "d290f1ee-6c54-4b01-90e6-d701748f0851",      "created_at": "2025-09-16T12:00:00Z",      "updated_at": "2025-10-30T15:00:00Z"    }  }'
{  "variable": {    "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789",    "key": "DATABASE_URL",    "value": "postgresql://db.internal:5432/inventory",    "sensitive": false,    "type": "VARIABLE_TYPE_STRING",    "scope": "VARIABLE_SCOPE_ENVIRONMENT",    "description": "Primary database connection string for the inventory service.",    "application_id": "a1b2c3d4-5678-9abc-def0-1234567890ab",    "environment_id": "e5f6a7b8-9012-3cde-f456-789012345678",    "created_by": "d290f1ee-6c54-4b01-90e6-d701748f0851",    "updated_by": "d290f1ee-6c54-4b01-90e6-d701748f0851",    "created_at": "2025-09-16T12:00:00Z",    "updated_at": "2025-10-30T15:00:00Z"  }}