cURL
curl --request POST \ --url https://api.devin.ai/v3beta1/enterprise/service-users/{service_user_id}/api-keys/{api_key_id}/rotate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "new_key_expires_at": 123, "revoke_current": true } '
{ "api_key_id": "<string>", "api_key_name": "<string>", "token": "<string>" }
ManageServiceUsers
Service User credential (prefix: cog_)
Service user ID (prefix: service-user-)
"service-user-abc123def456"
Optional expiration for the new key as a UNIX timestamp in seconds. Null for no expiration.
Whether to revoke the current key. Set to False for graceful rollover.
Successful Response
Shared response model for API key creation/rotation (includes one-time token).
The raw API token. This is only shown once at creation/rotation time.