API reference
Every route hangs from https://api.taskerpro.ai/v1. Here is what each one does, which
permission it needs and whether it waits for your approval. The detail of every field (types,
limits, allowed values) is in the OpenAPI catalog:
openapi.json.
In the Approval column:
- No: happens when called (queries and internal changes that don't reach your customers).
- Always: it is proposed (
202) until you approve it (on your CoachTasker Telegram or in the app). - When needed: happens when called if the contact already wrote to your business on their
channel (answers
200; checkdata.status); otherwise it is proposed (202).
Permissions are shortened without the taskerspro: prefix (for example, read is
taskerspro:read). See Authentication and permissions.
Contacts
| Method | Route | What it does | Permission | Approval |
|---|---|---|---|---|
GET | /v1/leads | Search contacts, most recently updated first. Filters: stage, minScore, createdFrom, createdTo, query (name) and limit (up to 50). | read | No |
POST | /v1/leads | Create a contact with name and, optionally, phone (international format), email, tags and note. It never messages them or triggers new-contact automations. If one with that phone or email already exists, it is returned unchanged. | write | No |
GET | /v1/leads/{leadId} | A contact's profile: stage, score, source, tags, dates and which contact details exist. | read | No |
PATCH | /v1/leads/{leadId} | Change the name (name) and add or remove tags (addTags, removeTags). Phone, email and stage can't be changed here. | write | No |
GET | /v1/leads/{leadId}/activity | The contact's history, newest first: stage changes, bookings, follow-ups, escalations, automations and notes. | read | No |
POST | /v1/leads/{leadId}/notes | Add an internal note (text) to the history. Your team sees it; the customer never does. | write | No |
POST | /v1/leads/{leadId}/reveal | Return the full phone number or email (field: phone or email). Every reveal is logged. | contact-details | No |
POST | /v1/leads/{leadId}/stage | Move the contact to another pipeline stage (stage). The stage's automations may message the customer. | act | When needed |
GET | /v1/events | Events detected in conversations (price inquiry, booking request, complaint…). Filters: type, leadId, from, to and limit (up to 100). | read | No |
- Stages:
new,contacted,qualified,scheduled,confirmed,proposal,negotiation,wonandlost.scheduledandconfirmedare set by bookings: you can't choose them with/stage. - Contact details: in the profile, phone and email always come masked (
contactonly tells you whether they exist); use/revealto see them in full. Without thecontact-detailspermission, the ones inside names, tags and texts are hidden too. - History texts: notes and text that comes from a conversation are included only with the
conversationspermission, and never when they come from WhatsApp.
Conversations and messages
| Method | Route | What it does | Permission | Approval |
|---|---|---|---|---|
GET | /v1/conversations | Recent conversations with your customers: channel, status, dates and message count. Filters: leadId, channel, from, to and limit (up to 50). | read | No |
GET | /v1/conversations/{sessionId} | The most recent messages of a conversation (limit, up to 100), in chronological order. | conversations | No |
POST | /v1/messages | Propose a text message (leadId, text) on the channel the customer writes to you on (for example, WhatsApp or Telegram). | act | Always |
POST | /v1/messages/template | Propose an approved WhatsApp template (leadId, templateKey, variables in order). | act | Always |
GET | /v1/whatsapp-templates | The approved WhatsApp templates that can be sent to a contact (leadId), from the number they talk to. | read | No |
- WhatsApp: the text of WhatsApp conversations is never shared. The conversation shows up in the list, but with no preview and no messages.
- 24-hour window: on WhatsApp, a free-text message only goes out if the customer wrote to you in the last 24 hours. Outside that window, use a template.
- Who's talking: in messages,
useris the customer,assistantis your AI agent andagentis a person from your team. Internal team notes are never included. - No message can be proposed to a contact marked "Do not contact".
Bookings
| Method | Route | What it does | Permission | Approval |
|---|---|---|---|---|
GET | /v1/bookings | Bookings in a date range (by default, today and the next 30 days; at most 62 days). Filters: from, to, leadId, status and limit. | read | No |
GET | /v1/bookings/availability | Free slots for a service (service) on a day (date, YYYY-MM-DD), optionally with a professional (professionalId). | read | No |
POST | /v1/bookings | Book an appointment for a contact (leadId) at a free slot (start). TaskersPro sends the confirmation to the customer. | act | When needed |
POST | /v1/bookings/{bookingId}/reschedule | Propose moving an active booking to another free slot (start). Once approved, TaskersPro tells the customer the new time. | act | Always |
POST | /v1/bookings/{bookingId}/cancel | Propose cancelling an active booking (optional reason). TaskersPro does not tell the customer: if they should know, propose a message separately. | act | Always |
- Use the
startreturned by/v1/bookings/availabilityas is, with its time zone. - Booking statuses:
pending,confirmed,completed,cancelledandno_show.
Content
| Method | Route | What it does | Permission | Approval |
|---|---|---|---|---|
GET | /v1/content | The most recent ContentTasker pieces. Filters: status and limit (up to 50). | read | No |
POST | /v1/content/drafts | Save a piece as a draft for you to review (channel, type, text, hashtags, cta). It is never published or scheduled from here. | write | No |
POST | /v1/content/{contentId}/publish | Propose publishing a piece now on its channel. It counts toward your monthly publishing quota. If the piece is edited after it was proposed, it isn't published. | act | Always |
- Channels:
instagram,facebook,linkedin,twitter,tiktok,emailandblog. - Types:
social_post(default),email_nurturing,email_campaign,product_description,blog_post,ad_copyandlanding_copy. - Statuses:
draft,pending_approval,approved,scheduled,publishedandfailed. - If a channel has no automatic publishing, the action ends with
result.statushanded_off: it wasn't published and you're asked to post it by hand.
Business, usage and actions
| Method | Route | What it does | Permission | Approval |
|---|---|---|---|---|
GET | /v1/business | Your Business Memory: what you sell (services, prices, durations), opening hours, location, FAQ, brand voice, policies and goals. It's what your agents use with your customers. | read | No |
PATCH | /v1/business | Propose changes to your Memory: texts (set), new FAQ entries (faqAdd), services (servicesUpsert) and pricing plans (pricingTiersUpsert). Nothing is deleted. | act | Always |
GET | /v1/usage | This month's calls from all your assistants and keys, and your plan's limit (-1 = unlimited). | read | No |
GET | /v1/actions/{actionId} | The status of an action proposed by this same key or connection, and its result. See statuses. | act | No |
- In
PATCH /v1/business, to change a service send itsserviceId(theidshown inGET /v1/business); withoutserviceIda new one is added, and then you must say whether it's in person or by video call (modality:in_personorvideo).
Examples
The examples use the TASKERSPRO_API_KEY variable with your key.
Search qualified contacts
curl "https://api.taskerpro.ai/v1/leads?stage=qualified&limit=10" \
-H "Authorization: Bearer $TASKERSPRO_API_KEY"
Response (trimmed):
{
"data": {
"leads": [
{
"id": "…",
"name": "Beto Ramírez",
"stage": "qualified",
"score": 72,
"source": "whatsapp",
"channel": "whatsapp",
"tags": ["wholesale"],
"contact": { "hasPhone": true, "email": null }
}
],
"count": 1
}
}
Add a note to a contact
curl -X POST "https://api.taskerpro.ai/v1/leads/$LEAD_ID/notes" \
-H "Authorization: Bearer $TASKERSPRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Asked for a quote for 50 units from the online store."}'
{ "data": { "added": true, "leadId": "…" } }
Propose a message to a customer
curl -X POST "https://api.taskerpro.ai/v1/messages" \
-H "Authorization: Bearer $TASKERSPRO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"leadId": "'"$LEAD_ID"'", "text": "Hi Beto! Your order is on its way."}'
It answers 202: the message waits for your approval.
{
"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)…"
}
}
Then check how it's going:
curl "https://api.taskerpro.ai/v1/actions/$ACTION_ID" \
-H "Authorization: Bearer $TASKERSPRO_API_KEY"