Skip to content

Credentials

Create service-account credential

Verify and store a service-account credential. Use the fields from List credential providers, encoded as a JSON object string in `credentials`. Requires workspace write access. A matching source returns the existing credential with `200`; creation returns `201`. Stored secrets are omitted from the response. Workspace API keys return `403`; use a personal API key or scoped OAuth token. OAuth scope: `api:write`.

POST/api/v2/credentials

Verify and store a service-account credential. Use the fields from List credential providers, encoded as a JSON object string in credentials. Requires workspace write access. A matching source returns the existing credential with 200; creation returns 201. Stored secrets are omitted from the response. Workspace API keys return 403; use a personal API key or scoped OAuth token.

OAuth scope: api:write.

Authentication

Send a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.

Send X-API-Key in the request header.

Alternatively

Send a Sim OAuth access token in Authorization: Bearer. See OAuth authentication and scopes.

Authorization: Bearer YOUR_ACCESS_TOKEN

Required scopes: api:write

OAuth flows
json
{
  "authorizationCode": {
    "authorizationUrl": "https://www.sim.ai/api/auth/oauth2/authorize",
    "tokenUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "refreshUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "scopes": {
      "api:read": "Read your workspaces, workflows, files, tables, and logs",
      "api:write": "Read, create, change, run, and delete resources in your workspaces",
      "offline_access": "Stay signed in without asking again"
    }
  }
}

OAuth scope: api:write.

Request body

Required

Provider identifier, optional display metadata, and a write-only JSON object string containing the fields declared by provider discovery.

object

Provider identifier, optional display metadata, and a write-only JSON object string containing the fields declared by provider discovery.

7 fields
workspaceIdstringRequired

Workspace that will own the credential.

minLength
1
maxLength
128
typestringRequired

Service-account credential discriminator.

const
service_account
providerIdstringRequired

Exact service-account provider ID returned by provider discovery.

minLength
1
maxLength
255
displayNamestring

Optional name; providers may derive one from the verified account identity.

minLength
1
maxLength
255
descriptionstring

Optional credential description.

maxLength
500
idstring

Optional client-generated credential ID. The server mints one when it is omitted, so no provider requires it. A slack-custom-bot credential may supply one so its Slack Request URL, which embeds the ID, can be configured before the credential exists; every other provider ignores it.

format
uuid
pattern
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
credentialsstringRequired

Write-only JSON object string containing the fields declared by credential-provider discovery.

minLength
1
maxLength
4325376
writeOnly
true

Additional properties are not allowed.

Request example 1

json
{
  "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
  "type": "service_account",
  "providerId": "zoom-service-account",
  "displayName": "Zoom automation",
  "credentials": "{\"clientId\":\"YOUR_CLIENT_ID\",\"clientSecret\":\"YOUR_CLIENT_SECRET\",\"orgId\":\"YOUR_ACCOUNT_ID\"}"
}

Responses

200

An existing credential matched the verified source.

object

Verified credential metadata without secret material.

1 field
dataobjectRequired

Response data.

10 fields
idstringRequired

Unique credential identifier.

typestringRequired

Authenticated connection type.

enum
["oauth","service_account"]
displayNamestringRequired

Credential display name.

descriptionvalueRequired

Optional credential description.

Schema details

Any of

Option 1string
Option 2null
providerIdvalueRequired

Integration provider authenticated by this credential.

Schema details

Any of

Option 1string
Option 2null
accountIdvalueRequired

Linked account identifier for OAuth credentials.

Schema details

Any of

Option 1string
Option 2null
hasServiceAccountKeybooleanRequired

Whether a service-account payload is stored. Its contents are never returned.

rolestringRequired

Caller role for the credential.

enum
["admin","member"]
createdAtstringRequired

ISO 8601 timestamp when the credential was created.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updatedAtstringRequired

ISO 8601 timestamp when the credential was last updated.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "type": "service_account",
    "displayName": "Zoom service account",
    "description": null,
    "providerId": "zoom-service-account",
    "accountId": null,
    "hasServiceAccountKey": true,
    "role": "admin",
    "createdAt": "2026-06-01T09:14:00.000Z",
    "updatedAt": "2026-06-20T14:02:11.000Z"
  }
}

Response headers

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Remaininginteger

Requests remaining in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Resetstring

ISO 8601 timestamp when the current rate-limit window resets.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Was this helpful?
Suggest an edit