Skip to content
API Reference
Credentials

Create

Create

POST/organizations/{organization_id}/service-accounts/{service_account_id}/credentials

Create a new credential for a service account

Path ParametersExpand Collapse
organization_id: string

Organization ID or label identifier

minLength1
maxLength255
service_account_id: string

Identifier for API resources. A 26-char nanoid (URL/DNS safe).

minLength1
maxLength255
Header ParametersExpand Collapse
"X-Client-Request-ID": optional string
formatuuid
Body ParametersJSONExpand Collapse
name: string

Credential name

description: optional string

Optional description of the credential

maxLength500
ReturnsExpand Collapse
id: string

Identifier for API resources. A 26-char nanoid (URL/DNS safe).

minLength1
maxLength255
client_id: string

The client ID for authentication

client_secret: string

The client secret

created_at: string

The time the entity was created in utc

formatdate-time
name: string

A name for the entity to be displayed in UI

description: optional string

Optional description of the credential

Create

curl https://api.keycard.ai/organizations/$ORGANIZATION_ID/service-accounts/$SERVICE_ACCOUNT_ID/credentials \
    -H 'Content-Type: application/json' \
    -d '{
          "name": "name"
        }'
{
  "id": "ab3def8hij2klm9opq5rst7uvw",
  "client_id": "A1b2C3d4E5f6G7h8I9j0K",
  "client_secret": "a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V2w3X4y5Z6A7B8c9D0e1F2",
  "created_at": "2019-12-27T18:11:19.117Z",
  "name": "name",
  "description": "description"
}
Returns Examples
{
  "id": "ab3def8hij2klm9opq5rst7uvw",
  "client_id": "A1b2C3d4E5f6G7h8I9j0K",
  "client_secret": "a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V2w3X4y5Z6A7B8c9D0e1F2",
  "created_at": "2019-12-27T18:11:19.117Z",
  "name": "name",
  "description": "description"
}