On this page
Sommatic Docs
Open portal

Credentials Beta

Credentials that nodes use to reach external systems.

View as Markdown
Open in

Create a new credential.

POST /platform-infrastructure/credential/

Returns the created credential with data provided.

Authentication: Bearer token

Request body

Credential object to be created.

organization_id string

Identifier of the organization that this credential is associated with.

slug string Required

Stable semantic key uniquely identifying this credential within the organization or tenant.

name string Required

Human-readable name for this credential used in editors, logs and audit trails.

type PlatformInfrastructureCredentialType Required

Credential type object { id, name, title, color }.

id integer Required

Numeric type identifier.

name string Required

Machine-readable type name.

title string Required

Human-readable label.

color string

Optional UI color for the type badge.

description string

Optional description explaining what this credential is used for and in which contexts.

connector_slug string

Optional reference to the ConnectorModel this credential is primarily associated with.

provider PlatformInfrastructureCredentialProvider

Optional provider object { id, name, title, color } identifying the external service.

id integer Required

Numeric provider identifier.

name string Required

Machine-readable provider name.

title string Required

Human-readable label.

color string

Optional UI color for the provider badge.

secret_backend string

Identifier of the secret storage backend used to hold the actual secret material (e.g. "sommatics-vault", "aws-kms").

secret_handle object

AES-256-GCM encrypted secret material stored as { iv, content, tag }. Encrypted at creation, decrypted only by the resolve endpoint.

masked_preview string

Optional masked preview of the secret (e.g. last 4 characters) used only for UI display.

scopes array<string>

Optional list of permission scopes, roles or API grants associated with this credential.

allowed_connector_slugs array<string>

Optional list of connector keys that are allowed to use this credential for outbound calls.

expires_at string

Optional expiration timestamp after which this credential must not be used.

last_rotated_at string

Timestamp of the last successful rotation of the underlying secret material.

rotation_policy PlatformInfrastructureCredentialRotationPolicy

Optional rotation policy describing how and when this credential should be rotated.

enabled boolean

Whether rotation is enabled for this credential.

strategy object

Rotation strategy as { id, name, title }.

id integer
name string
title string
interval_days integer

Number of days between rotations. Relevant when strategy is "scheduled".

notify_before_days integer

Number of days before rotation to send a notification.

is_revoked boolean

Indicates whether this credential has been revoked and must no longer be used.

is_enabled boolean

Indicates whether this credential is currently active and eligible for use.

is_system boolean

Indicates whether this credential is managed by the platform rather than user-created.

tags array<string>

Optional list of free-form tags used for governance, search and reporting.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/platform-infrastructure/credential/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>",
    "type": {
      "id": 1,
      "name": "api-key",
      "title": "API Key",
      "color": "#1976d2"
    }
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234567890",
    "slug": "cred_slack_support_bot",
    "name": "Slack Support Bot OAuth Credential",
    "type": {
      "id": 2,
      "name": "oauth2",
      "title": "OAuth 2.0",
      "color": "#7b1fa2"
    },
    "description": "OAuth2 access token for the Slack support bot used in customer support flows.",
    "connector_slug": "connector:http.slack",
    "provider": {
      "id": 5,
      "name": "slack",
      "title": "Slack",
      "color": "#4A154B"
    },
    "secret_backend": "sommatic-vault",
    "secret_handle": "vault://slack/support-bot/oauth-token",
    "masked_preview": "xoxb-****-1234",
    "scopes": [
      "chat:write",
      "users:read"
    ],
    "allowed_connector_slugs": [
      "connector:http.slack"
    ],
    "expires_at": "2026-01-01T00:00:00.000Z",
    "last_rotated_at": "2025-07-01T10:15:00.000Z",
    "rotation_policy": {
      "enabled": true,
      "strategy": {
        "id": 2,
        "name": "scheduled",
        "title": "Scheduled"
      },
      "interval_days": 90,
      "notify_before_days": 7
    },
    "is_system": false,
    "tags": [
      "slack",
      "oauth2",
      "support"
    ]
  }
}

Update an existing credential.

PATCH /platform-infrastructure/credential/

Updates the data of an existing credential with the data provided.

Authentication: Bearer token

Request body

Credential object to be updated.

organization_id string

Identifier of the organization that this credential is associated with.

slug string Required

Stable semantic key uniquely identifying this credential within the organization or tenant.

name string Required

Human-readable name for this credential used in editors, logs and audit trails.

type PlatformInfrastructureCredentialType Required

Credential type object { id, name, title, color }.

id integer Required

Numeric type identifier.

name string Required

Machine-readable type name.

title string Required

Human-readable label.

color string

Optional UI color for the type badge.

description string

Optional description explaining what this credential is used for and in which contexts.

connector_slug string

Optional reference to the ConnectorModel this credential is primarily associated with.

provider PlatformInfrastructureCredentialProvider

Optional provider object { id, name, title, color } identifying the external service.

id integer Required

Numeric provider identifier.

name string Required

Machine-readable provider name.

title string Required

Human-readable label.

color string

Optional UI color for the provider badge.

secret_backend string

Identifier of the secret storage backend used to hold the actual secret material (e.g. "sommatics-vault", "aws-kms").

secret_handle object

AES-256-GCM encrypted secret material stored as { iv, content, tag }. Encrypted at creation, decrypted only by the resolve endpoint.

masked_preview string

Optional masked preview of the secret (e.g. last 4 characters) used only for UI display.

scopes array<string>

Optional list of permission scopes, roles or API grants associated with this credential.

allowed_connector_slugs array<string>

Optional list of connector keys that are allowed to use this credential for outbound calls.

expires_at string

Optional expiration timestamp after which this credential must not be used.

last_rotated_at string

Timestamp of the last successful rotation of the underlying secret material.

rotation_policy PlatformInfrastructureCredentialRotationPolicy

Optional rotation policy describing how and when this credential should be rotated.

enabled boolean

Whether rotation is enabled for this credential.

strategy object

Rotation strategy as { id, name, title }.

id integer
name string
title string
interval_days integer

Number of days between rotations. Relevant when strategy is "scheduled".

notify_before_days integer

Number of days before rotation to send a notification.

is_revoked boolean

Indicates whether this credential has been revoked and must no longer be used.

is_enabled boolean

Indicates whether this credential is currently active and eligible for use.

is_system boolean

Indicates whether this credential is managed by the platform rather than user-created.

tags array<string>

Optional list of free-form tags used for governance, search and reporting.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/platform-infrastructure/credential/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>",
    "type": {
      "id": 1,
      "name": "api-key",
      "title": "API Key",
      "color": "#1976d2"
    }
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234567890",
    "slug": "cred_slack_support_bot",
    "name": "Slack Support Bot OAuth Credential",
    "type": {
      "id": 2,
      "name": "oauth2",
      "title": "OAuth 2.0",
      "color": "#7b1fa2"
    },
    "description": "OAuth2 access token for the Slack support bot used in customer support flows.",
    "connector_slug": "connector:http.slack",
    "provider": {
      "id": 5,
      "name": "slack",
      "title": "Slack",
      "color": "#4A154B"
    },
    "secret_backend": "sommatic-vault",
    "secret_handle": "vault://slack/support-bot/oauth-token",
    "masked_preview": "xoxb-****-1234",
    "scopes": [
      "chat:write",
      "users:read"
    ],
    "allowed_connector_slugs": [
      "connector:http.slack"
    ],
    "expires_at": "2026-01-01T00:00:00.000Z",
    "last_rotated_at": "2025-07-01T10:15:00.000Z",
    "rotation_policy": {
      "enabled": true,
      "strategy": {
        "id": 2,
        "name": "scheduled",
        "title": "Scheduled"
      },
      "interval_days": 90,
      "notify_before_days": 7
    },
    "is_system": false,
    "tags": [
      "slack",
      "oauth2",
      "support"
    ]
  }
}

Delete a credential by its id.

DELETE /platform-infrastructure/credential/

Deletes a credential based on the provided ID.

Authentication: Bearer token

Request body

ID of the credential to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/platform-infrastructure/credential/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Credential successfully deleted",
  "result": null
}

Get a credential by query selector.

GET /platform-infrastructure/credential/{queryselector}

Returns the credential information that matches the query selector and search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idallstatus

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include credentials of a specific status.

exclude_status string query

Optional status parameter to exclude credentials of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/platform-infrastructure/credential/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234567890",
    "slug": "cred_slack_support_bot",
    "name": "Slack Support Bot OAuth Credential",
    "type": {
      "id": 2,
      "name": "oauth2",
      "title": "OAuth 2.0",
      "color": "#7b1fa2"
    },
    "description": "OAuth2 access token for the Slack support bot used in customer support flows.",
    "connector_slug": "connector:http.slack",
    "provider": {
      "id": 5,
      "name": "slack",
      "title": "Slack",
      "color": "#4A154B"
    },
    "secret_backend": "sommatic-vault",
    "secret_handle": "vault://slack/support-bot/oauth-token",
    "masked_preview": "xoxb-****-1234",
    "scopes": [
      "chat:write",
      "users:read"
    ],
    "allowed_connector_slugs": [
      "connector:http.slack"
    ],
    "expires_at": "2026-01-01T00:00:00.000Z",
    "last_rotated_at": "2025-07-01T10:15:00.000Z",
    "rotation_policy": {
      "enabled": true,
      "strategy": {
        "id": 2,
        "name": "scheduled",
        "title": "Scheduled"
      },
      "interval_days": 90,
      "notify_before_days": 7
    },
    "is_system": false,
    "tags": [
      "slack",
      "oauth2",
      "support"
    ]
  }
}

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs