WorkflowsCreate an enabled workflowpost

Create an enabled workflow

Magic workflow endpoint. A single POST creates an enabled linear workflow graph: trigger, condition, then action. Use the catalog endpoints to choose valid kind values and params.

curl -X POST "https://api.textmine.com/v3/teams/123/workflows" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "name": "Review low-confidence governing law",
  "description": "Assign legal review when governing-law extraction confidence is low.",
  "trigger": {
    "kind": "document_processed",
    "params": {
      "vault_id": 12345
    }
  },
  "condition": {
    "kind": "confidence",
    "params": {
      "tag": "Governing law",
      "operator": "lt",
      "threshold": 0.8
    }
  },
  "action": {
    "kind": "add_reviewer",
    "params": {
      "user_ids": [
        42
      ]
    }
  }
}'
{
  "id": 555,
  "team_id": 321,
  "name": "Review low-confidence governing law",
  "trigger_type": "document_processed",
  "status": "active",
  "step_count": 3,
  "created_at": "2024-12-25T10:00:00Z",
  "created_by_id": 123
}
POST
/v3/teams/{teamId}/workflows
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (`tm_<key>`)
Bearer Tokenstring
Required

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.
path
teamIdinteger
Required

Team ID.

Format: int64
Content-Typestring
Required

The media type of the request body

Options: application/json
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (tm_<key>). Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Path Parameters

Body

application/json
namestring
Required
Example:
Review low-confidence governing law
descriptionstring
Example:
Assign legal review when governing-law extraction confidence is low.
triggerobject
Required
conditionobject
Required
actionobject
Required

Responses