API Keys

Create API key

Create a new API key for the specified organization. The key authenticates requests as a member of that organization.

post/v3/api-keys

Request

  • Base URL: https://api.creditcoop.xyz
  • URL: https://api.creditcoop.xyz/v3/api-keys
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://clerk.creditcoop.xyz/oauth/authorize, token URL https://clerk.creditcoop.xyz/oauth/token)

Request body

organizationIdstring uuid required

The organization this API key belongs to. Requests authenticated with this key will be made as a member of this organization. Example: 550e8400-e29b-41d4-a716-446655440000

namestring required

Name for the API key

expiresInDaysnumber

Number of days until the key expires

Response

Default Response

idstring uuid required
organizationIdstring uuid required
keyPrefixstring required
namestring required
fullKeystring required

Full API key. Only returned once at creation — save it immediately.

expiresAtstring date-time nullable
createdAtstring date-time required
messagestring required

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "organizationId": "550e8400-e29b-41d4-a716-446655440000",
  "keyPrefix": "cc_abc123",
  "expiresAt": "2025-01-15T10:30:00Z",
  "createdAt": "2025-01-15T10:30:00Z"
}

Changes

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