Create Agent Secret
POSThttps://a.klaviyo.com/api/agent-secrets
Creates a secret for use by one or more Customer Agent tools.
The provided plaintext value is encrypted before persistence and is never exposed after creation. Subsequent responses return only the mask (last 3 characters) and non-sensitive metadata. Secret names are trimmed of leading and trailing whitespace before validation, and both the resulting name and provided value must be non-empty. If another secret already exists with the same name for the calling company, the API returns 409 Conflict.
- Revision header
revision: 2026-10-15.prerequired- Scopes
agents:write- Rate limits
- Burst:
10/sSteady:150/m
Query parameters
For more information please visit API overview
Headers
API endpoint revision (format: YYYY-MM-DD[.suffix])
2026-10-15.pre
Request body
Content type: application/vnd.api+jsonrequired
Show 2 fields
Show 2 fields
Display name for the secret. Leading and trailing whitespace is stripped before validation; the resulting name must be non-empty. Not the alias used in tool configs.
Plaintext secret value. Must be non-empty. Encrypted prior to persistence and never returned in any response.
Responses
201Success
Content type: application/vnd.api+json
Show 5 fields
Agent Secret identifier.
Show 4 fields
Display name for the secret.
Last 3 characters of the plaintext value, for visual disambiguation. The plaintext itself is never returned.
Date and time when the secret was created.
Date and time when the secret was last updated.
Show 1 field
4XXClient Error
Content type: application/vnd.api+json
5XXServer Error
Content type: application/vnd.api+json