Credentials

Create credential

Changed on

Create a new credential. The secret is returned once and never readable again.

post/credentials

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /credentials
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL /authorize, token URL /oauth/token)

Request body

OR
OR
OR
OR
OR

Example request

{
  "api": {
    "catalog_api_id": "stripe.com",
    "name": "stripe",
    "vendor": "stripe.com",
    "version": "2024-04-10"
  },
  "name": "Stripe live key",
  "provider": "static",
  "runtime_config": {
    "headers": {
      "Stripe-Version": "2024-04-10"
    },
    "query_params": {
      "locale": "en-GB"
    }
  },
  "server_variables": {
    "region": "eu"
  },
  "token": "example-secret",
  "type": "bearer_token"
}

Response

Successful Response

secretobject required

Type-specific secret material, returned only in this create response.

warningsstring[] nullable

Advisory warnings from create — e.g. the credential's API scope matches no imported API identity, so execution through it would fail until a matching API is imported. The credential is created regardless; null when there is nothing to flag.

Example response

{
  "credential": {
    "active": true,
    "api": {
      "name": "stripe",
      "vendor": "stripe-com",
      "version": "2024-04-10"
    },
    "created_at": "2026-01-15T09:30:00Z",
    "credential_id": "cred_01HZX9...",
    "name": "Stripe live key",
    "provider": "static",
    "type": "api_key"
  },
  "secret": {
    "key": "sk_live_…"
  }
}

Changes

    • info

      the endpoint scheme security OAuth2 was added to the API

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status