CaraCara API

Create an API key

Create a new API key. The full plaintext key is returned only once in the response. Store it securely — it cannot be retrieved again.

Create a new API key. The full plaintext key is returned only once in the response. Store it securely — it cannot be retrieved again.

POST
/settings/portal-access-keys

Authorization

AuthorizationRequiredBearer <token>

Use your API key (sk_live_* or sk_test_*) as the Bearer token.

In: header

Request Body

application/jsonRequired
nameRequiredstring

Human-readable name for the key.

descriptionstring
scopesarray<string>

Permission scopes for the key.

isTestboolean

Create a test key (sk_test_) instead of a live key (sk_live_).

Default: false
expiresAtstring

Optional expiration date.

Format: "date-time"
curl -X POST "https://platform.caramedical.com/api/v1/settings/portal-access-keys" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "scopes": [
      "string"
    ],
    "isTest": false,
    "expiresAt": "2019-08-24T14:15:22Z"
  }'

API key created. The plaintext key is included in the response.

{
  "key": {
    "id": "string",
    "name": "string",
    "keyPrefix": "string",
    "scopes": [
      "string"
    ]
  },
  "plainTextKey": "sk_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}