Requests and responses
Building a request
GET: data goes in the query string (?stage=qualified&limit=10). Numbers and booleans are written as text (limit=10,true/false), and a list is written comma-separated.POSTandPATCH: data goes in a JSON body (Content-Type: application/json). These routes don't accept a query string.- Path parameters (like the
leadIdin/v1/leads/{leadId}): go in the URL, encoded like any URL segment. Don't repeat them in the query or the body. - Dates:
YYYY-MM-DDor ISO 8601 (2026-11-12T10:00:00-06:00). Booking times always include a time zone. - The ids the API returns (contacts, conversations, bookings, templates…) are opaque: use them as they are, without interpreting them.
The API is strict so that a typo never goes unnoticed. You get a 400 if you:
- send a parameter or field the route doesn't know;
- repeat a query parameter (
?stage=new&stage=won); - send the same field in two places (in the path and in the body, for example);
- send a query string on a
POSTorPATCH; - send a value with the wrong type or format.
Responses
Every response is JSON and carries Cache-Control: no-store: don't keep them in
intermediate caches.
Success (200): the result comes inside data.
{
"data": {
"leads": [{ "id": "…", "name": "Beto Ramírez", "stage": "qualified", "score": 72 }],
"count": 1
}
}
Waiting for approval (202): also inside data; see
below.
Error: comes inside error, with a stable code for your logic and a human-readable
message for your logs.
{
"error": {
"code": "insufficient_scope",
"message": "This endpoint needs the taskerspro:act permission."
}
}
One exception: if the body isn't valid JSON, the 400 is returned before reaching the API
and doesn't use the { "error": … } format. Treat any 400 as "check your request".
Status codes
| Status | code | What it means and what to do |
|---|---|---|
200 | — | Done. The result is in data. For an action, check data.status. |
202 | — | The action was proposed and waits for your approval (on your CoachTasker Telegram or in the app). |
400 | invalid_input | Invalid data, or something that can't be done (unknown contact, marked "Do not contact", too many pending proposals…). Read message, fix it and don't repeat it as is. |
401 | missing_token / invalid_token | The credential is missing, invalid or disconnected (for example, whoever created the key left the team or changed their password). If the message says retry shortly, it's temporary (we couldn't verify the session): retry in a few minutes, the key is still valid. |
403 | insufficient_scope | Your key or connection lacks the permission the route needs. |
403 | plan | The account's current plan doesn't include the API. |
403 | unavailable | The feature isn't available for this account right now. |
404 | not_found | The route doesn't exist. A contact or conversation that doesn't exist doesn't give a 404: see below. |
405 | method_not_allowed | The route exists, but with another method (for example, GET instead of POST). |
429 | rate_limited | You hit a rate limit. Some are per minute and others per hour or per day (see Rate limits): wait according to the limit before retrying. |
429 | quota | Your plan's monthly calls are used up. They come back next month, or upgrade your plan. |
500 | error | Internal failure. For a query, retry. For a write, it may have happened: check before repeating it (see Retries). |
Things that aren't found. If you look up a record that doesn't exist, the query answers
200 with an empty result (for example, GET /v1/leads/{leadId} returns "found": false).
If you try to change a record that doesn't exist, or look up an action that doesn't exist or
that your key didn't propose with GET /v1/actions/{actionId}, you get 400.
Actions waiting for your approval (202)
Anything that reaches your customers or changes what your agents tell them doesn't happen when the API is called: it is proposed and reaches you as a card, with the full content and your key's name, on your CoachTasker Telegram (with the button to approve it); you also see it in Approvals, inside the app. This is how it works:
- Always with approval: sending a message or a WhatsApp template, moving or cancelling a booking, publishing content and changing your Business Memory.
- With approval only when needed: booking an appointment or changing a contact's stage
happen right away if that contact already wrote to your business on their channel;
otherwise they are proposed. When they happen right away, the response is
200with the action already resolved: checkdata.status(executedif it went well,failedif not; look atfailureanduncertain). If the same key does many in a short time (more than 20 per hour), the next ones are proposed (202) even if the contact already wrote to you.
The 202 response carries the action id:
{
"data": {
"actionId": "xa_…",
"operation": "messages_send",
"status": "pending_approval",
"message": "Waiting for the business owner to approve it (in their CoachTasker Telegram or the TaskersPro app)…"
}
}
Check its status whenever you want with GET /v1/actions/{actionId} (you only see the actions
proposed by the same key or connection). The possible statuses:
status | What it means |
|---|---|
pending_approval | Waiting for your approval. Nothing has been sent or changed yet. |
scheduled | Approved to go out when your business opens (runAt). Nothing has been sent yet. |
executing | Approved and running. Check again in a moment. |
executed | Done. Its result is in result. |
failed | It couldn't be completed; the reason is in failure. If it has uncertain: true, read below. |
denied | You rejected it. Don't propose the same thing again. |
expired | Nobody approved it in time (proposals expire after 48 hours) and it wasn't done. |
cancelled | Cancelled: the key was disconnected or the action no longer applied. |
Other details:
simulated: trueon a done action means your account is in test mode: it was approved, but nothing was actually sent, booked, published or changed.- When publishing content, if
result.statusishanded_off, it was NOT published: that channel has no automatic publishing and you were asked to post it by hand. - If an action fails with
failure: "needs_approval", the contact no longer allows running it without approval: call the same route again to propose it. - There can be at most 20 pending proposals per key or connection. Beyond that you get a
400until you decide the existing ones.
Uncertain outcomes (uncertain: true)
Sometimes it can't be confirmed whether something happened: the provider (WhatsApp, the
social network) didn't answer or the run was interrupted halfway. In that case the action
ends as failed with uncertain: true, which means "it may have happened".
Don't retry it blindly: you could send the message twice or publish the same thing twice. First check in the app (the conversation, the calendar or the social network) whether it already happened, and only if it didn't, propose it again.
Retrying without duplicates
- Queries (
GET): retrying is always safe. - Creating a contact: if one with that phone or email already exists, it is returned with
"created": false. If you send a phone or email, retrying is safe. - Adding a note and proposing actions (messages, bookings, publications, Memory): the same
call repeated within the same 10-minute clock block (for example, 10:00 to 10:09:59) returns
the same thing: the same note or the same action (the same
actionId), not another card. A retry that crosses the block boundary (10:09:59 and 10:10:01) is treated as a new call and may duplicate. - After a
500or a network drop on a write: it may have happened. Don't repeat it blindly: check first (the contact, its notes,GET /v1/actions/{actionId}if you have the id, or the app) and repeat it only if it didn't happen. 429: wait according to the limit you hit; repeating right away doesn't help.
Rate limits
Besides the account limit, each connection (each key or assistant) has its own caps. When you go
over them, the API answers 429 with rate_limited until the window frees up:
| Limit | Cap | Window |
|---|---|---|
| Calls from the account (all its connections) | 600 | per minute |
| Writes from one connection | 30 | per minute |
| New contacts from one connection | 200 | per day |
| Content drafts from one connection | 50 | per day |
| Proposals waiting for approval, from one connection | 30 | per hour |
| Bookings or stage changes that run without approval, from one connection | 20 | per hour (then they're proposed) |
Your plan's monthly calls are separate: when they run out, 429 with quota.