DM Champ Docs

Tasks API

Tasks are the to-dos and follow-ups on your account, optionally linked to a contact, deal or campaign. They sit in the stages of your task board (your kanban columns) and have a type and a priority.

Every field, filter and response body is documented in the API Reference. This page explains how tasks behave and shows one example per main job. Examples use the ?apiKey= query form; the X-API-Key header works on every endpoint too.


How tasks work

  • Stages are the columns of your board. A task’s stage is a stage id from GET /tasks/stages. Leave it out on create and the task lands in your first stage. New tasks are added at the top of their stage.
  • Done stages. A stage marked is_completed_stage is a Done column. A task in one counts as completed; any other task, including one whose stage you have since removed, counts as open.
  • Types come from GET /tasks/types (to_do by default). faq_update is the type the AI uses when it suggests a new FAQ (see Approve an FAQ suggestion).
  • Priority is one of none (the default), low, medium, high or urgent.
  • Reminders. remind_before_minutes is how long before due_date the reminder goes out: a whole number from 0 (at the due time) to 1440 (one day ahead); anything larger is rejected. It needs a due_date to fire, and is delivered according to your Tasks notification settings. When a task gets a due date and you leave the field out, it defaults to 0, so the reminder fires at the due moment; send null for a due date with no reminder. Moving an existing due date moves the reminder with it and keeps its lead time.
  • Links. contact_id, deal_id and campaign_id link the task to those records; assigned_to is a team member’s user id. On update, send null for due_date, contact_id, deal_id or assigned_to to clear it.

Endpoints

Task Method + path Explorer
Create a task POST /tasks Open in API Reference
List tasks GET /tasks Open in API Reference
Search tasks POST /tasks/search Open in API Reference
Get a task GET /tasks/{taskId} Open in API Reference
Update a task PUT /tasks/{taskId} Open in API Reference
Complete a task POST /tasks/{taskId}/complete Open in API Reference
Move a task to another stage or slot POST /tasks/{taskId}/move Open in API Reference
Reorder tasks within a stage POST /tasks/reorder Open in API Reference
Tasks for one contact GET /tasks/contact/{contactId} Open in API Reference
List task stages GET /tasks/stages Open in API Reference
Replace task stages PUT /tasks/stages Open in API Reference
List task types GET /tasks/types Open in API Reference
Approve an FAQ suggestion POST /tasks/{taskId}/approve-faq Open in API Reference
Delete a task DELETE /tasks/{taskId} Open in API Reference

Create a task

Only title is required.

curl -X POST "https://api.dmchamp.com/v1/tasks?apiKey=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Call Jane about her quote",
    "priority": "high",
    "due_date": "2026-06-15T09:00:00.000Z",
    "contact_id": "uid_whatsapp_15551234567",
    "tags": ["sales"]
  }'
{ "success": true, "task_id": "tsk_abc123", "task": { "title": "Call Jane about her quote", "...": "..." } }

Getting assigned_to right. It should be the user id of the account owner or of an active team member on the same account. This endpoint does not currently check that, so an id belonging to nobody is accepted and stored exactly as you sent it, and you still get a 201. Copy the id rather than retyping it: these ids mix l with L and the letter O with the digit 0, and one wrong character is enough. To check what you sent, open the task in the dashboard: the Assignee field on the task record falls back to showing the raw id when it matches nobody, and the assignee picker in Edit task shows Unassigned.

List and search tasks

GET /tasks returns your tasks in board order, with optional filters (stage, priority, contact, deal, assignee, due-date range). POST /tasks/search matches text in titles and descriptions with the same kind of filters. GET /tasks/contact/{contactId} returns every task linked to one contact.

curl "https://api.dmchamp.com/v1/tasks?apiKey=YOUR_API_KEY&status=open&priority=high&include=contact"
  • Open or finished only. status=open returns tasks not in a Done stage; status=completed returns only those in one. Leave it out for every task. Any other value returns 400.
  • Naming the linked contact. A task stores its contact as a reference. Add include=contact (on search, "include": "contact" in the body) and each task also carries the contact’s name, phone, email and channel, so you do not have to fetch every contact yourself. Tasks with no contact, or whose contact has been deleted, simply do not carry those fields.
  • Syncing changes. Pass updated_after to get only the tasks changed since your last sync, oldest change first, paged with limit and cursor. In this mode the board filters are ignored.

Update, complete and delete

PUT /tasks/{taskId} changes only the fields you send. POST /tasks/{taskId}/complete moves the task to your board’s Done stage and records when it was completed, with an optional closing notes.

curl -X POST "https://api.dmchamp.com/v1/tasks/tsk_abc123/complete?apiKey=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "notes": "Customer signed up." }'
  • Completing needs a stage marked is_completed_stage on your board; without one the call returns 400. With several Done stages, completing uses the first one; to put a task in a specific Done stage, move it there instead.
  • Moving a task into a Done stage with PUT (the stage field) or move also marks it completed; moving it back to an open stage clears that.
  • DELETE /tasks/{taskId} removes the task permanently. There is no undo.
  • A task that does not exist on your account returns 404.

Move and reorder (kanban)

These work like dragging cards on the board.

  • Move (POST /tasks/{taskId}/move) takes new_stage_id and new_position (zero-based slot in that stage, required, 0 is the top). Use the current stage id to reposition within the same column. Other tasks in both columns are renumbered for you.
  • Reorder (POST /tasks/reorder) takes a stage_id and the full list of task ids in that stage in their new order. Ids no longer in the stage are skipped, so a slightly stale list still works. Up to 1,000 ids per call.
curl -X POST "https://api.dmchamp.com/v1/tasks/tsk_abc123/move?apiKey=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "new_stage_id": "stage-2", "new_position": 0 }'

Task board configuration

GET /tasks/stages returns your board’s columns in order; GET /tasks/types returns your task types. PUT /tasks/stages replaces the whole stage configuration in one call: send the complete ordered list, because anything you leave out is gone.

curl -X PUT "https://api.dmchamp.com/v1/tasks/stages?apiKey=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "task_stages": [
    { "id": "stage-1", "name": "To Do", "color": "#3B82F6", "position": 0 },
    { "id": "stage-2", "name": "In Progress", "color": "#F59E0B", "position": 1 },
    { "id": "stage-done", "name": "Done", "color": "#10B981", "position": 2, "is_completed_stage": true }
  ] }'
  • Mark at least one stage is_completed_stage: true so completed tasks have a column to land in.
  • A board can have up to 20 stages. Stage ids must be unique.

Approve an FAQ suggestion

When the AI proposes a new FAQ, it creates a task of type faq_update. POST /tasks/{taskId}/approve-faq turns that suggestion into a real FAQ in the knowledge base of the AI agent that raised it and completes the task. You can override the question or answer in the body. It only works on faq_update tasks.

Add "send_follow_up": true to also have the AI send the answer to the task’s linked contact right away, as a natural message in that chat (the same as the Send the answer to the contact now toggle in the app). The reply goes out through the AI agent that handles that contact. The contact’s bot setting is left as it was: on a contact where the AI is paused, this one reply is sent and the AI stays paused.

curl -X POST "https://api.dmchamp.com/v1/tasks/tsk_faq99/approve-faq?apiKey=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "question": "Do you offer refunds?", "answer": "Yes, within 30 days.", "send_follow_up": true }'
{ "success": true, "faq_id": "faq_xyz", "task_id": "tsk_faq99", "follow_up_status": "published" }
  • follow_up_status says what happened to the message: not_requested, published (sent), queued (the bot was mid-reply to that contact; the answer goes out as soon as it finishes), skipped_duplicate (the same answer already went to this contact in the last hour), skipped_no_contact, skipped_no_campaign (no agent could answer for that contact) or skipped_error. The FAQ is created in every case.
  • Safe to retry. Approving the same task again never creates a second FAQ or sends the answer twice; the response returns the first FAQ with already_approved: true.

See the FAQs API to manage the resulting FAQ.


Next steps