Skip to Content
Integrations

Rotate a key under the same integration and scope restriction

POST
/integrations/{integration_id}/keys/{key_id}/rotate

Authorization

studioSession
cookie__Secure-avatarstudio.session_token<token>

An authenticated Studio session. Each operation enforces its resource and role permissions.

Path Parameters

integration_idrequiredstring
Match^ipr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
key_idrequiredstring
Match^key_[0-9a-f]{32}$

Request Body

application/json
  1. body
grace_period_secondsrequiredinteger
Range0 <= value <= 3600
Rotate a key under the same integration and scope restriction
curl -X POST 'https://example.com/v1/integrations/string/keys/string/rotate' \
  -H 'Content-Type: application/json' \
  -d '{
  "grace_period_seconds": 0
}'
{
  "id": "string",
  "object": "integration.key",
  "integration_id": "string",
  "name": "string",
  "display_prefix": "string",
  "scopes": [
    "experiences:read"
  ],
  "created_at": -9007199254740991,
  "expires_at": -9007199254740991,
  "revoked_at": -9007199254740991,
  "secret": "string"
}

Response Body

OK

application/json
  1. response
idrequiredstring
Match^key_[0-9a-f]{32}$
objectrequiredunknown
integration_idrequiredstring
Match^ipr_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
namerequiredstring
display_prefixrequiredstring
scopesrequiredarray<>
Items1 <= items <= 9
created_atrequiredinteger
Range-9007199254740991 <= value <= 9007199254740991
expires_atrequiredinteger
Range-9007199254740991 <= value <= 9007199254740991
revoked_atrequired|null
secretrequiredstring

Shown once. Store securely on a trusted server; never place in browser code or a URL.