Skip to main content

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; check data.status); otherwise it is proposed (202).

Permissions are shortened without the taskerspro: prefix (for example, read is taskerspro:read). See Authentication and permissions.

Contacts​

MethodRouteWhat it doesPermissionApproval
GET/v1/leadsSearch contacts, most recently updated first. Filters: stage, minScore, createdFrom, createdTo, query (name) and limit (up to 50).readNo
POST/v1/leadsCreate 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.writeNo
GET/v1/leads/{leadId}A contact's profile: stage, score, source, tags, dates and which contact details exist.readNo
PATCH/v1/leads/{leadId}Change the name (name) and add or remove tags (addTags, removeTags). Phone, email and stage can't be changed here.writeNo
GET/v1/leads/{leadId}/activityThe contact's history, newest first: stage changes, bookings, follow-ups, escalations, automations and notes.readNo
POST/v1/leads/{leadId}/notesAdd an internal note (text) to the history. Your team sees it; the customer never does.writeNo
POST/v1/leads/{leadId}/revealReturn the full phone number or email (field: phone or email). Every reveal is logged.contact-detailsNo
POST/v1/leads/{leadId}/stageMove the contact to another pipeline stage (stage). The stage's automations may message the customer.actWhen needed
GET/v1/eventsEvents detected in conversations (price inquiry, booking request, complaint…). Filters: type, leadId, from, to and limit (up to 100).readNo
  • Stages: new, contacted, qualified, scheduled, confirmed, proposal, negotiation, won and lost. scheduled and confirmed are set by bookings: you can't choose them with /stage.
  • Contact details: in the profile, phone and email always come masked (contact only tells you whether they exist); use /reveal to see them in full. Without the contact-details permission, 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 conversations permission, and never when they come from WhatsApp.

Conversations and messages​

MethodRouteWhat it doesPermissionApproval
GET/v1/conversationsRecent conversations with your customers: channel, status, dates and message count. Filters: leadId, channel, from, to and limit (up to 50).readNo
GET/v1/conversations/{sessionId}The most recent messages of a conversation (limit, up to 100), in chronological order.conversationsNo
POST/v1/messagesPropose a text message (leadId, text) on the channel the customer writes to you on (for example, WhatsApp or Telegram).actAlways
POST/v1/messages/templatePropose an approved WhatsApp template (leadId, templateKey, variables in order).actAlways
GET/v1/whatsapp-templatesThe approved WhatsApp templates that can be sent to a contact (leadId), from the number they talk to.readNo
  • 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, user is the customer, assistant is your AI agent and agent is a person from your team. Internal team notes are never included.
  • No message can be proposed to a contact marked "Do not contact".

Bookings​

MethodRouteWhat it doesPermissionApproval
GET/v1/bookingsBookings in a date range (by default, today and the next 30 days; at most 62 days). Filters: from, to, leadId, status and limit.readNo
GET/v1/bookings/availabilityFree slots for a service (service) on a day (date, YYYY-MM-DD), optionally with a professional (professionalId).readNo
POST/v1/bookingsBook an appointment for a contact (leadId) at a free slot (start). TaskersPro sends the confirmation to the customer.actWhen needed
POST/v1/bookings/{bookingId}/reschedulePropose moving an active booking to another free slot (start). Once approved, TaskersPro tells the customer the new time.actAlways
POST/v1/bookings/{bookingId}/cancelPropose cancelling an active booking (optional reason). TaskersPro does not tell the customer: if they should know, propose a message separately.actAlways
  • Use the start returned by /v1/bookings/availability as is, with its time zone.
  • Booking statuses: pending, confirmed, completed, cancelled and no_show.

Content​

MethodRouteWhat it doesPermissionApproval
GET/v1/contentThe most recent ContentTasker pieces. Filters: status and limit (up to 50).readNo
POST/v1/content/draftsSave a piece as a draft for you to review (channel, type, text, hashtags, cta). It is never published or scheduled from here.writeNo
POST/v1/content/{contentId}/publishPropose 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.actAlways
  • Channels: instagram, facebook, linkedin, twitter, tiktok, email and blog.
  • Types: social_post (default), email_nurturing, email_campaign, product_description, blog_post, ad_copy and landing_copy.
  • Statuses: draft, pending_approval, approved, scheduled, published and failed.
  • If a channel has no automatic publishing, the action ends with result.status handed_off: it wasn't published and you're asked to post it by hand.

Business, usage and actions​

MethodRouteWhat it doesPermissionApproval
GET/v1/businessYour 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.readNo
PATCH/v1/businessPropose changes to your Memory: texts (set), new FAQ entries (faqAdd), services (servicesUpsert) and pricing plans (pricingTiersUpsert). Nothing is deleted.actAlways
GET/v1/usageThis month's calls from all your assistants and keys, and your plan's limit (-1 = unlimited).readNo
GET/v1/actions/{actionId}The status of an action proposed by this same key or connection, and its result. See statuses.actNo
  • In PATCH /v1/business, to change a service send its serviceId (the id shown in GET /v1/business); without serviceId a new one is added, and then you must say whether it's in person or by video call (modality: in_person or video).

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"