SalesOS

Workflows

Automation workflow management

Get workflow configuration options (trigger types, action types, etc.)

GET
/v1/workflows/config

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

curl -X GET "https://api.salesos.org/v1/workflows/config" \
  -H "Authorization: Bearer <token>"

Get workflow statistics

GET
/v1/workflows/stats

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

curl -X GET "https://api.salesos.org/v1/workflows/stats" \
  -H "Authorization: Bearer <token>"

{}

List all workflows

GET
/v1/workflows

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Query Parameters

statusstring
Value in: "ACTIVE" | "INACTIVE" | "DRAFT"
triggerTypestring
Value in: "RECORD_CREATED" | "RECORD_UPDATED" | "RECORD_DELETED" | "FIELD_CHANGED" | "STAGE_CHANGED" | "TIME_BASED" | "WEBHOOK" | "MANUAL"
triggerEntityobject
limitnumber
offsetnumber
curl -X GET "https://api.salesos.org/v1/workflows?status=ACTIVE&triggerType=RECORD_CREATED&triggerEntity=%5Bobject+Object%5D&limit=0&offset=0" \
  -H "Authorization: Bearer <token>"

Create a new workflow

POST
/v1/workflows

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired
nameRequiredstring
descriptionstring
triggerTypeRequiredstring
Value in: "RECORD_CREATED" | "RECORD_UPDATED" | "RECORD_DELETED" | "FIELD_CHANGED" | "STAGE_CHANGED" | "TIME_BASED" | "WEBHOOK" | "MANUAL"
triggerEntityRequiredobject
triggerConfigobject
conditionsarray<object>
actionsRequiredarray<object>
runOnceboolean
delayMinutesnumber
Minimum: 0

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/workflows" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "triggerType": "RECORD_CREATED",
    "triggerEntity": {},
    "triggerConfig": {},
    "conditions": [
      {
        "field": "string",
        "operator": "EQUALS",
        "value": {}
      }
    ],
    "actions": [
      {
        "type": "SEND_EMAIL",
        "config": {},
        "condition": {}
      }
    ],
    "runOnce": true,
    "delayMinutes": 0
  }'

{}

Get execution history

GET
/v1/workflows/executions

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Query Parameters

workflowIdstring
statusstring
Value in: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED"
entityTypestring
entityIdstring
limitnumber
offsetnumber
curl -X GET "https://api.salesos.org/v1/workflows/executions?workflowId=%3Cstring%3E&status=PENDING&entityType=%3Cstring%3E&entityId=%3Cstring%3E&limit=0&offset=0" \
  -H "Authorization: Bearer <token>"

Get a single workflow by ID

GET
/v1/workflows/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X GET "https://api.salesos.org/v1/workflows/<string>" \
  -H "Authorization: Bearer <token>"

{}

Delete a workflow

DELETE
/v1/workflows/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring
curl -X DELETE "https://api.salesos.org/v1/workflows/<string>" \
  -H "Authorization: Bearer <token>"

Update a workflow

PUT
/v1/workflows/{id}

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired
namestring
descriptionstring
statusstring
Value in: "ACTIVE" | "INACTIVE" | "DRAFT"
triggerTypestring
Value in: "RECORD_CREATED" | "RECORD_UPDATED" | "RECORD_DELETED" | "FIELD_CHANGED" | "STAGE_CHANGED" | "TIME_BASED" | "WEBHOOK" | "MANUAL"
triggerEntityobject
triggerConfigobject
conditionsarray<object>
actionsarray<object>
runOnceboolean
delayMinutesnumber
Minimum: 0

Path Parameters

idRequiredstring
curl -X PUT "https://api.salesos.org/v1/workflows/<string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "status": "ACTIVE",
    "triggerType": "RECORD_CREATED",
    "triggerEntity": {},
    "triggerConfig": {},
    "conditions": [
      {
        "field": "string",
        "operator": "EQUALS",
        "value": {}
      }
    ],
    "actions": [
      {
        "type": "SEND_EMAIL",
        "config": {},
        "condition": {}
      }
    ],
    "runOnce": true,
    "delayMinutes": 0
  }'

{}

Activate a workflow

POST
/v1/workflows/{id}/activate

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/workflows/<string>/activate" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

{}

Deactivate a workflow

POST
/v1/workflows/{id}/deactivate

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/workflows/<string>/deactivate" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>"

{}

Manually trigger a workflow

POST
/v1/workflows/trigger

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Request Body

application/jsonRequired
workflowIdRequiredstring
entityTypeRequiredobject
entityIdRequiredstring
contextobject

Header Parameters

Idempotency-Keystring

Unique key (a UUID is ideal) that makes this write safe to retry for 24 hours: a retry with the same body replays the original response (Idempotent-Replayed: true); the same key with a different body is a 409.

Maximum length: 255
curl -X POST "https://api.salesos.org/v1/workflows/trigger" \
  -H "Idempotency-Key: <string>" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "string",
    "entityType": {},
    "entityId": "string",
    "context": {}
  }'

{}

Get executions for a specific workflow

GET
/v1/workflows/{id}/executions

Authorization

AuthorizationRequiredBearer <token>

Session token from the SalesOS web app.

In: header

X-API-Key<token>

API key from Settings → API Keys. Authorization: ApiKey <key> is also accepted. Each operation lists the scope it needs under x-api-key-scopes.

In: header

Path Parameters

idRequiredstring

Query Parameters

workflowIdstring
statusstring
Value in: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED"
entityTypestring
entityIdstring
limitnumber
offsetnumber
curl -X GET "https://api.salesos.org/v1/workflows/<string>/executions?workflowId=%3Cstring%3E&status=PENDING&entityType=%3Cstring%3E&entityId=%3Cstring%3E&limit=0&offset=0" \
  -H "Authorization: Bearer <token>"