Create an entity workflow
POST/projects/{projectId}/entities/{entityId}/workflows
Base URL: https://api.tinkermode.com
Create a new workflow for this entity.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain the key of a user or service account with permissions to create entity workflows, or a project API key with admin permission.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. | |
entityId | string | Yes | Entity ID (unique within project) |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
description | string | No | default: "" | An optional description of the workflow. | ||||||||||||||||||||||||||||||||||||||||
enabled | boolean | No | default: false | Whether the workflow should be active immediately after creation. | ||||||||||||||||||||||||||||||||||||||||
name | string | Yes | The display name of the workflow. | |||||||||||||||||||||||||||||||||||||||||
steps | array<object> | No | Ordered list of steps to execute when the workflow runs. | |||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
triggers | array<object> | No | List of triggers that can start this workflow. | |||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
Responses
201 Workflow successfully created.
Content type: application/json
| Property | Type | Required | Constraints | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
createdAt | string | No | The time the workflow was created (ISO 8601). | |||||||||||||||||||||||||||||||||||||||||
description | string | No | An optional description of the workflow. | |||||||||||||||||||||||||||||||||||||||||
enabled | boolean | No | Whether the workflow is active and eligible to be triggered. | |||||||||||||||||||||||||||||||||||||||||
entityId | string | No | The unique identifier for the entity the workflow belongs to. | |||||||||||||||||||||||||||||||||||||||||
id | string | No | The unique identifier for the workflow (MongoDB ObjectID hex string, auto-generated). | |||||||||||||||||||||||||||||||||||||||||
name | string | No | The display name of the workflow. | |||||||||||||||||||||||||||||||||||||||||
projectId | integer | No | The unique identifier for the project the workflow belongs to. | |||||||||||||||||||||||||||||||||||||||||
revision | integer | No | Monotonically increasing revision number, updated on every write. | |||||||||||||||||||||||||||||||||||||||||
steps | array<object> | No | Ordered list of steps to execute when the workflow runs. | |||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
triggers | array<object> | No | List of triggers that can start this workflow. | |||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
updatedAt | string | No | The time the workflow was last updated (ISO 8601). | |||||||||||||||||||||||||||||||||||||||||
401 Authorization is required to access this resource.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
403 Request failed because of invalid data or denied permission.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
429 Request failed because of rate limit.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
500 An unexpected error has occurred.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |
503 The service is temporarily unavailable.
Content type: application/json
| Property | Type | Required | Constraints | Description |
|---|---|---|---|---|
data | object | No | read-only (server-generated) | Any relevant data related to error. |
reason | string | Yes | read-only (server-generated) | Reason of error. |