Skip to main content
POST
/
v1
/
integrations
/
{provider}
/
credentials
Store credentials
curl --request POST \
  --url https://api.example.com/v1/integrations/{provider}/credentials \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credentials": {},
  "label": "<string>"
}
'

Overview

Saves API credentials for integrations that use API key authentication (not OAuth). Credentials are encrypted at rest and never returned in plaintext after this request. Required role: admin

Request headers

Authorization
string
required
JWT Bearer token. Format: Bearer <your-jwt>.

Path parameters

provider
string
required
The integration provider. Example: datadog. Must be a provider with authType: api_key in the catalog.

Request body

credentials
object
required
Key-value map of credential fields. The required keys vary by provider — see the integration catalog for requiredFields per provider. Example for Datadog: { "api_key": "...", "application_key": "..." }.
label
string
Optional human-readable label to identify this credential set. Useful if you have multiple environments.

Response

Returns 201 Created.
{
  "credentialId": "crd_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "provider": "datadog",
  "label": "Production",
  "status": "validated",
  "createdAt": "2024-04-01T10:00:00Z"
}
FieldTypeDescription
credentialIdstringUnique credential identifier
providerstringProvider name
labelstringOptional label you provided
statusstringvalidated if credentials were successfully tested, unverified otherwise
createdAtstringISO 8601 timestamp

Error responses

StatusError codeDescription
400validation_errorMissing required credential fields
401unauthorizedMissing or invalid JWT
403forbiddenCaller lacks admin role
422credential_validation_failedCauseFlow tested the credentials against the provider and they were rejected

Examples

curl https://api.causeflow.ai/v1/integrations/datadog/credentials \
  -X POST \
  -H "Authorization: Bearer eyJhbGc..." \
  -H "Content-Type: application/json" \
  -d '{
    "credentials": {
      "api_key": "dd_api_key_EXAMPLE",
      "application_key": "dd_app_key_EXAMPLE"
    },
    "label": "Production"
  }'

Connect integration

Activate the integration after storing credentials

Integration catalog

Check required fields for your provider