postCreate service account
Required capability
service_accounts.createCreates a service account and mints a fresh client_secret. The plaintext secret is returned exactly once in this response and is never re-fetchable afterwards — store it immediately on the client side. Use service_accounts.rotate_secret to issue a new secret if it is lost. The service account itself never expires on a timer; lifecycle is status-only (active or revoked). client_secret_expires_at is the client-secret TTL, while JWT access-token TTL is separate.
Request
Request URL
POST /service-accountsRequest Body
{
"description": "Withdrawal automation account",
"external_id": "sa-ext-001",
"parent_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b"
}Responses
Response
{
"client_id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
"client_secret": "cs_live_abc123placeholder",
"client_secret_expires_at": "2026-05-01T10:00:00Z",
"principal_ref": "service-accounts/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
"service_account": {
"description": "Withdrawal automation account",
"created_at": "2026-05-01T10:00:00Z",
"current_secret_expires_at": "2026-05-01T10:00:00Z",
"etag": "W/\"sa-etag-0001\"",
"external_id": "sa-ext-001",
"id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
"parent_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
"previous_secret_expires_at": null,
"principal_ref": "service-accounts/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
"resource": "service_account",
"status": "active",
"updated_at": "2026-05-01T10:00:00Z"
}
}Resource created successfully.