api-keys

Rename a key or change its domain scope and scopes.

The token is unchanged — use POST /api-keys/:id/rotate for that.

patch/api-keys/{id}

Request

  • Base URL: https://api.agentisend.com
  • URL: https://api.agentisend.com/api-keys/{id}
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Headers

Idempotency-Keystring

Makes this call safe to retry. Send the same key with the same body and the original response is replayed instead of the work happening twice. Keys are 1-256 characters and are remembered for 7 days. While the first attempt is still running, a second call with that key returns 409 idempotency_in_flight (Resend calls this concurrent_idempotent_requests); the same key with a different body returns 409 idempotency_payload_mismatch (Resend: invalid_idempotent_request). Resend-Idempotency-Key is accepted as the same header.

Resend-Idempotency-Keystring

Alias of Idempotency-Key. Idempotency-Key wins if both are sent.

Request body

namestring

A new name. Omit it to keep the current one.

domain_scopestring nullable

Limit the key to one domain, or null to allow every domain.

scopesstring[]

Replace the scope list.

loop_guard'off' | 'repetition-only' | 'full'

off watches nothing. repetition-only watches near-identical sends. full also watches recipient collapse. Omit it and transactional sends use repetition-only; a marketing send on a key with no setting still uses full.

Response

Success

object'api_key' required
idstring uuid required
namestring required
permission'full_access' | 'sending_access' required
domain_scopestring nullable required
scopesstring[] required
expires_atstring date-time nullable required
token_prefixstring required
systemboolean required
created_atstring date-time required
last_used_atstring date-time nullable required
request_count_30dinteger required
rotated_atstring date-time nullable required
previous_key_expires_atstring date-time nullable required
budget_per_periodinteger nullable required
period'hourly' | 'daily' | 'monthly' required
rate_ceiling_per_minuteinteger nullable required
loop_guard'off' | 'repetition-only' | 'full' required

Changes

No recorded changes to this operation across all 1 revision of this API.