Skip to main content
PATCH
/
1
/
secret-keys
/
{secret_key_id}
Patch Secret Key
curl --request PATCH \
  --url https://{APPLICATION_ID}.algolia.net/agent-studio/1/secret-keys/{secret_key_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Algolia-API-Key: <x-algolia-api-key>' \
  --header 'X-Algolia-Application-Id: <x-algolia-application-id>' \
  --data '
{
  "name": "<string>",
  "agentIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "value": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "lastUsedAt": "2023-11-07T05:31:56Z",
  "agentIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "isDefault": false
}
Requires Admin API key

Headers

X-Algolia-API-Key
string
required
X-Algolia-Application-Id
string
required

Path Parameters

secret_key_id
string<uuid>
required

Body

application/json

Secret key patch payload

name
string | null

The new name of the secret key

Required string length: 1 - 128
agentIds
string<uuid>[] | null

Updated list of agent IDs this secret key is associated with

Response

Successful Response

id
string<uuid>
required
name
string
required
value
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
lastUsedAt
string<date-time> | null
required
agentIds
string<uuid>[]
required
isDefault
boolean
default:false
Last modified on March 6, 2026