Skip to main content

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.
  • POST and PATCH: data goes in a JSON body (Content-Type: application/json). These routes don't accept a query string.
  • Path parameters (like the leadId in /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-DD or 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 POST or PATCH;
  • 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​

StatuscodeWhat 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).
400invalid_inputInvalid 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.
401missing_token / invalid_tokenThe 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.
403insufficient_scopeYour key or connection lacks the permission the route needs.
403planThe account's current plan doesn't include the API.
403unavailableThe feature isn't available for this account right now.
404not_foundThe route doesn't exist. A contact or conversation that doesn't exist doesn't give a 404: see below.
405method_not_allowedThe route exists, but with another method (for example, GET instead of POST).
429rate_limitedYou 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.
429quotaYour plan's monthly calls are used up. They come back next month, or upgrade your plan.
500errorInternal 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 200 with the action already resolved: check data.status (executed if it went well, failed if not; look at failure and uncertain). 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:

statusWhat it means
pending_approvalWaiting for your approval. Nothing has been sent or changed yet.
scheduledApproved to go out when your business opens (runAt). Nothing has been sent yet.
executingApproved and running. Check again in a moment.
executedDone. Its result is in result.
failedIt couldn't be completed; the reason is in failure. If it has uncertain: true, read below.
deniedYou rejected it. Don't propose the same thing again.
expiredNobody approved it in time (proposals expire after 48 hours) and it wasn't done.
cancelledCancelled: the key was disconnected or the action no longer applied.

Other details:

  • simulated: true on 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.status is handed_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 400 until 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 500 or 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:

LimitCapWindow
Calls from the account (all its connections)600per minute
Writes from one connection30per minute
New contacts from one connection200per day
Content drafts from one connection50per day
Proposals waiting for approval, from one connection30per hour
Bookings or stage changes that run without approval, from one connection20per hour (then they're proposed)

Your plan's monthly calls are separate: when they run out, 429 with quota.