SnozeDevelopers
API referenceConnected Accounts

Rebind an automation's credential

Changes which credential an automation runs on, or clears the pin so its nodes fall back to their workspace connection. Deliberately separate from saving the graph: editing conditions or mappings must never silently remove the only credential that works. The current run-as owner may swap the pin for another of their own accounts without further permission; clearing it, moving it onto a workspace connection, or any change by someone else needs `automations:write`. A personal credential can only ever be bound by the person who owns it, and is rejected outright when the workspace requires workspace connections. A workspace target may be a connection created through the connections API or an enabled provider install.

PUT
/v1/workspaces/{workspaceId}/automations/{automationId}/run-as

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string
automationId*string

Request Body

application/json
  1. body
runAs*||null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X PUT 'https://api.snoze.dev/v1/workspaces/string/automations/string/run-as' \  -H 'Content-Type: application/json' \  -d '{  "runAs": {    "kind": "workspace",    "connectionId": "string"  }}'
Example Response
{  "data": {    "automationId": "string",    "runAs": null  }}