Skip to main content
POST
/
api
/
work-tasks
Create work task
curl --request POST \
  --url https://dev.exante.app/api/work-tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "Review Q4 invoice discrepancies",
  "description": "Check invoices flagged by the agent for amount mismatches",
  "assign_to": {
    "type": "user",
    "user_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agent_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "full_name": "<string>",
    "name": "<string>",
    "avatar_url": "<string>"
  },
  "priority": "medium",
  "due_date": "2026-04-15",
  "status": "todo",
  "context_entities": [
    {
      "entity_type": "invoice",
      "entity_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ]
}
'
{
  "status": "success",
  "status_code": 200,
  "message": "<string>",
  "data": {
    "uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "type": "task",
    "status": "todo",
    "priority": "urgent",
    "due_date": "2023-12-25",
    "created_at": "2023-11-07T05:31:56Z",
    "assign_to": {
      "type": "user",
      "user_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "agent_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "full_name": "<string>",
      "name": "<string>",
      "avatar_url": "<string>"
    },
    "origin": {
      "type": "user",
      "user_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "agent_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "user_name": "<string>",
      "agent_name": "<string>",
      "avatar_url": "<string>",
      "trigger_type": "<string>"
    },
    "description": "<string>",
    "updated_at": "2023-11-07T05:31:56Z",
    "context_entities": [
      {
        "entity_type": "invoice",
        "entity_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    ],
    "change_log": [
      {
        "at": "2023-11-07T05:31:56Z",
        "by_name": "<string>",
        "action": "<string>",
        "details": {}
      }
    ],
    "reasoning": "<string>",
    "tool_args": {},
    "trigger": {}
  }
}
Creates a new user task. The authenticated user is recorded as the requester.
Only tasks with type: "task" can be created through this endpoint. HIL approval tasks are created by AI agents during workflow execution.

Minimal request

Only title is required:
{
  "title": "Follow up with Acme Corp on payment"
}

Full request

{
  "title": "Review Q4 invoice discrepancies",
  "description": "Check invoices flagged by the agent for amount mismatches against purchase orders.",
  "assign_to": {
    "type": "user",
    "user_uid": "550e8400-e29b-41d4-a716-446655440000"
  },
  "priority": "high",
  "due_date": "2026-04-01",
  "status": "todo",
  "context_entities": [
    { "entity_type": "invoice", "entity_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" },
    { "entity_type": "party", "entity_uid": "b2c3d4e5-f6a7-8901-bcde-f12345678901" }
  ]
}

Assigning a task

Pass assign_to with a type and the corresponding UID. Use Filter options to get the list of assignable users and agents. For user assignment:
{
  "assign_to": {
    "type": "user",
    "user_uid": "550e8400-e29b-41d4-a716-446655440000"
  }
}
For agent assignment:
{
  "assign_to": {
    "type": "agent",
    "agent_uid": "660e8400-e29b-41d4-a716-446655440000"
  }
}

Linking context entities

Associate the task with invoices, parties, or messages to provide context. Use Context search to find linkable entities by name or number.
{
  "context_entities": [
    { "entity_type": "invoice", "entity_uid": "inv-uuid-here" },
    { "entity_type": "party", "entity_uid": "party-uuid-here" },
    { "entity_type": "message", "entity_uid": "msg-uuid-here" }
  ]
}
When an invoice is linked, its associated party is automatically linked as well — you don’t need to add both manually.

Response

Returns 201 with the full task detail:
{
  "status": "success",
  "status_code": 201,
  "message": "Work task created",
  "data": {
    "uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "Review Q4 invoice discrepancies",
    "type": "task",
    "status": "todo",
    "priority": "high",
    "due_date": "2026-04-01",
    "description": "Check invoices flagged by the agent for amount mismatches against purchase orders.",
    "created_at": "2026-03-16T10:00:00Z",
    "updated_at": "2026-03-16T10:00:00Z",
    "assign_to": {
      "type": "user",
      "user_uid": "550e8400-e29b-41d4-a716-446655440000",
      "full_name": "Jane Smith",
      "avatar_url": "https://cdn.example.com/avatars/jane.jpg"
    },
    "origin": {
      "type": "user",
      "user_uid": "660e8400-e29b-41d4-a716-446655440000",
      "user_name": "John Doe",
      "avatar_url": "https://cdn.example.com/avatars/john.jpg"
    },
    "context_entities": [
      {
        "entity_type": "invoice",
        "entity_uid": "inv-uuid-here",
        "invoice_number": "INV-2026-0042",
        "counterparty_name": "Acme Corp"
      }
    ],
    "change_log": [
      {
        "at": "2026-03-16T10:00:00Z",
        "by_name": "John Doe",
        "action": "created",
        "details": null
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
title
string
required

Task title

Required string length: 1 - 255
Example:

"Review Q4 invoice discrepancies"

description
string

Task description

Example:

"Check invoices flagged by the agent for amount mismatches"

assign_to
object

Assignee. Provide type and corresponding uid.

priority
enum<string>
default:medium
Available options:
urgent,
high,
medium,
low
due_date
string<date>

Due date in ISO 8601 format

Example:

"2026-04-15"

status
enum<string>

Initial status. Defaults to todo if omitted.

Available options:
todo,
in_progress,
in_review,
done,
canceled
context_entities
object[]

Entities to link to this task (invoices, parties, messages)

Response

Task created

status
string
Example:

"success"

status_code
integer
Example:

200

message
string
data
object