Skip to content

Catalog

Run tool

Run a built-in tool using published parameter IDs. Requires workspace read access. Sim resolves `credentialId`, hosted keys, and whole-value `{{VAR_NAME}}` references in `user-only` parameters; other values pass through unchanged. Send connected credentials as top-level `credentialId`, not inside `input`. Third-party refusal returns `200` with `status: "failed"`; API failures use the error envelope. Hidden or missing tools return `404`; disallowed integrations return `403` with `error.details.code: INTEGRATION_NOT_ALLOWED`. Hosted-key usage is billed to the workspace. A call that would use a hosted key returns `402` when the workspace exceeds usage or billing limits. Workspace API keys return `403`; use a personal API key or scoped OAuth token. OAuth scope: `api:write`.

POST/api/v2/tools/{toolId}/execute

Run a built-in tool using published parameter IDs. Requires workspace read access. Sim resolves credentialId, hosted keys, and whole-value {{VAR_NAME}} references in user-only parameters; other values pass through unchanged. Send connected credentials as top-level credentialId, not inside input. Third-party refusal returns 200 with status: "failed"; API failures use the error envelope. Hidden or missing tools return 404; disallowed integrations return 403 with error.details.code: INTEGRATION_NOT_ALLOWED. Hosted-key usage is billed to the workspace. A call that would use a hosted key returns 402 when the workspace exceeds usage or billing limits. 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.

Path parameters

toolIdstringRequired

Tool identifier. An exact visible ID is retained; an unversioned name resolves to the newest visible family version. The response echoes the resolved ID.

minLength
1
maxLength
255

Request body

Required

Workspace, accepted tool arguments, and optional connected credential. Hidden fields and credential aliases inside input are rejected.

object

Workspace, accepted tool arguments, and optional connected credential. Hidden fields and credential aliases inside input are rejected.

4 fields
workspaceIdstringRequired

Workspace whose integration allowlist, credentials, and environment variables govern this call.

minLength
1
maxLength
128
inputobject

Arguments keyed by published parameter IDs. Hidden and undeclared fields are rejected. Send connected credentials as top-level credentialId, not input.credential, input.credentialId, or input.oauthCredential. Whole-value {{VAR_NAME}} references resolve environment variables only for user-only parameters; other values pass through unchanged.

default
{}
Schema details
Additional propertiesvalue

One argument value. Its shape is declared by the tool parameter.

credentialIdstring

Connected credential to authenticate with. Required for tools declaring required OAuth or a required credential-selector parameter. Use List credentials to find candidates; do not send credential aliases inside input.

minLength
1
maxLength
255
timeoutSecondsinteger

Maximum wait time in seconds; defaults to 120 and cannot exceed 300. Timeout does not guarantee that a third-party side effect was cancelled.

minimum
1
maximum
300

Additional properties are not allowed.

Request example 1

json
{
  "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
  "input": {
    "channel": "C0123456789",
    "text": "Deploy finished."
  },
  "credentialId": "cred_01J8ZK3QW4M6X2R9T7B5C0V2"
}

Responses

200

The outcome of the tool call.

object

What the tool produced, or why it did not succeed.

1 field
dataobjectRequired

Response data.

4 fields
toolIdstringRequired

Tool that ran. An unversioned name resolves to the newest version visible in the workspace, so this can differ from the id in the path.

statusstringRequired

Whether the tool reported success. A failed tool call is still a 200.

enum
["succeeded","failed"]
outputvalueRequired

Whatever the tool produced, shaped by its declared outputs.

errorvalueRequired

Populated only when status is failed.

Schema details

Any of

Option 1object
1 field
messagestringRequired

Why the tool call did not succeed.

Additional properties are not allowed.

Option 2null

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "toolId": "slack_message",
    "status": "succeeded",
    "output": {
      "ts": "1718191234.004500"
    },
    "error": null
  }
}

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