/me The workspace this key belongs to
Its WhatsApp numbers and, if it is charged, its balance. A quick way to check a key works.
Returns Workspace Statuses 200 · 401 · 403
Generated from the OpenAPI file the application itself honours, so this page cannot describe an API we do not have. Use your browser's find.
A key from Settings → API, sent as Authorization: Bearer tvk_live_.... The file is at
/openapi.yaml if you would rather generate a client than read this.
Reference
/me Its WhatsApp numbers and, if it is charged, its balance. A quick way to check a key works.
Returns Workspace Statuses 200 · 401 · 403
/messages A template (anyone, any time) or a free-form text (only inside the 24-hour window after the person last wrote). Handed to WhatsApp while the request is open, so the answer says whether it went.
A marketing template records the person's consent with the source api. Somebody who opted out is never sent anything — the answer is opted_out, with the date.
Idempotency-Key header | Field | Type | Needed | What it is |
|---|---|---|---|
| Idempotency-Key | header | optional | Up to 100 characters. The same key and body within 24 hours returns the first answer instead of acting twice. |
to string required template string required language string variables Variables media Media media.default on the template). from string | Field | Type | Needed | What it is |
|---|---|---|---|
| to | string | required | |
| template | string | required | |
| language | string | optional | Needed only when the template exists in more than one language. |
| variables | Variables | optional | The template's {{1}}, {{2}}… in order. A list fills the body; an object fills header and body separately. In a broadcast, a value may also be a contact field with a fallback. |
| media | Media | optional | The photo, video or PDF at the top of a template that has one — an invoice, a ticket, an offer's banner. WhatsApp fetches the link when it sends, so it has to open without signing in; a signed link that lasts an hour is enough. talkv does not keep the file or the link. Left out, the sample the template was written with in talkv is sent, if it has one (media.default on the template). |
| from | string | optional | Which of the workspace's numbers. Needed only when it has more than one. |
to string required text string required from string | Field | Type | Needed | What it is |
|---|---|---|---|
| to | string | required | |
| text | string | required | |
| from | string | optional |
{
"to": "+91 98250 12345",
"template": "order_shipped",
"variables": [
"Ravi",
"#4521"
]
} {
"to": "9825012345",
"template": "festival_sale",
"language": "hi",
"variables": {
"header": [
"Diwali"
],
"body": [
"Ravi"
]
}
} {
"to": "9825012345",
"template": "invoice_ready",
"variables": [
"Ravi",
"INV-1042"
],
"media": {
"link": "https://shop.example/invoices/INV-1042.pdf",
"filename": "INV-1042.pdf"
}
} {
"to": "+919825012345",
"text": "We will call you at 4."
} Returns Message Statuses 201 · 400 · 401 · 402 · 403 · 409 · 422 · 429 · 502
/messages/{id} id path required | Field | Type | Needed | What it is |
|---|---|---|---|
| id | path | required |
Returns Message Statuses 200 · 404
/broadcasts page query | Field | Type | Needed | What it is |
|---|---|---|---|
| page | query | optional |
Returns Broadcast Statuses 200
/broadcasts To a list of numbers (to) or to a group kept in talkv (group). The answer comes back before anything is sent and already lists who will be left out from to and why; the rest is decided as the broadcast is built, and appears in /broadcasts/{id}/recipients.
Numbers in to are recorded as having consented (source api) unless they opted out. People in a group keep the consent they have in talkv, and anybody without a recorded opt-in is skipped.
Idempotency-Key header | Field | Type | Needed | What it is |
|---|---|---|---|
| Idempotency-Key | header | optional | Up to 100 characters. The same key and body within 24 hours returns the first answer instead of acting twice. |
name string required template string required language string variables Variables media Media media.default on the template). to array group. group integer /groups. Give this or to. from string send_at date-time | Field | Type | Needed | What it is |
|---|---|---|---|
| name | string | required | |
| template | string | required | |
| language | string | optional | |
| variables | Variables | optional | The template's {{1}}, {{2}}… in order. A list fills the body; an object fills header and body separately. In a broadcast, a value may also be a contact field with a fallback. |
| media | Media | optional | The photo, video or PDF at the top of a template that has one — an invoice, a ticket, an offer's banner. WhatsApp fetches the link when it sends, so it has to open without signing in; a signed link that lasts an hour is enough. talkv does not keep the file or the link. Left out, the sample the template was written with in talkv is sent, if it has one (media.default on the template). |
| to | array | optional | Numbers to send to. Give this or group. |
| group | integer | optional | A group's id from /groups. Give this or to. |
| from | string | optional | |
| send_at | date-time | optional | Schedule it. Nothing is blocked from the balance until it runs. |
Statuses 202 · 400 · 402 · 403 · 409 · 422
/broadcasts/{id} id path required | Field | Type | Needed | What it is |
|---|---|---|---|
| id | path | required |
Returns Broadcast Statuses 200 · 404
/broadcasts/{id}/recipients Kept for 18 months after the broadcast finishes; the figures on the broadcast are kept for good.
id path required status query page query | Field | Type | Needed | What it is |
|---|---|---|---|
| id | path | required | |
| status | query | optional | |
| page | query | optional |
Returns Recipient Statuses 200 · 404
/broadcasts/{id}/cancel Nothing more is sent. Messages already sent are not recalled, and only the delivered ones are charged.
id path required | Field | Type | Needed | What it is |
|---|---|---|---|
| id | path | required |
Returns Broadcast Statuses 200 · 404 · 422
/contacts updated_since query page query | Field | Type | Needed | What it is |
|---|---|---|---|
| updated_since | query | optional | Only contacts changed at or after this time |
| page | query | optional |
Returns Contact Statuses 200
/contacts/{phone} Returns Contact Statuses 200 · 404
/contacts/{phone} Only the fields you send are changed. consent: opted_in is refused with opted_out for somebody who opted out — only they can undo that.
name string first_name string last_name string email string city string state string postal_code string company string birthday string anniversary string fields object people PersonOnNumber[] add_tags array remove_tags array add_to_groups array remove_from_groups array consent string | Field | Type | Needed | What it is |
|---|---|---|---|
| name | string | optional | |
| first_name | string | optional | |
| last_name | string | optional | |
| string | optional | ||
| city | string | optional | |
| state | string | optional | |
| postal_code | string | optional | |
| company | string | optional | |
| birthday | string | optional | 1990-09-20, or --09-20 without a year. 20/09/1990 is read day first. |
| anniversary | string | optional | |
| fields | object | optional | Your own fields by key, as set up in talkv. An unknown key is refused. |
| people | PersonOnNumber[] | optional | Everybody else who uses this number — a family on one phone. The whole list: anybody left out is removed. A broadcast chosen by birthday greets whoever's day it is; any other reaches the number once. |
| add_tags | array | optional | Created if they do not exist. |
| remove_tags | array | optional | |
| add_to_groups | array | optional | Group ids or names. A new name creates the group. |
| remove_from_groups | array | optional | |
| consent | string | optional | opted_in · opted_out |
Returns Contact Statuses 200 · 201 · 400 · 422
/contacts/{phone}/opt-out For an unsubscribe that reached your system rather than WhatsApp. Permanent unless the person writes START.
Returns Contact Statuses 200
/opt-outs since query page query | Field | Type | Needed | What it is |
|---|---|---|---|
| since | query | optional | Only opt-outs at or after this time |
| page | query | optional |
Statuses 200
/templates status query page query | Field | Type | Needed | What it is |
|---|---|---|---|
| status | query | optional | |
| page | query | optional |
Returns Template Statuses 200
/groups page query | Field | Type | Needed | What it is |
|---|---|---|---|
| page | query | optional |
Statuses 200
What the endpoints above hand back. Every success is
{"data": …}; a list adds meta.
Times are ISO 8601 in the workspace's timezone, and phone numbers always
come back as E.164.
id integer name string country string timezone string numbers array billing object | Field | Type | Needed | What it is |
|---|---|---|---|
| id | integer | optional | |
| name | string | optional | |
| country | string | optional | Numbers without a country code are read in this country. |
| timezone | string | optional | |
| numbers | array | optional | |
| billing | object | optional | Null when talkv does not charge this workspace. |
id integer to string from string type string template object text string status string error object charged boolean created_at date-time sent_at date-time delivered_at date-time read_at date-time | Field | Type | Needed | What it is |
|---|---|---|---|
| id | integer | optional | |
| to | string | optional | |
| from | string | optional | |
| type | string | optional | template · text |
| template | object | optional | |
| text | string | optional | What the person sees, with the variables filled in. |
| status | string | optional | sent · delivered · read · failed |
| error | object | optional | |
| charged | boolean | optional | Whether this message is charged once delivered. Templates are; replies are not. |
| created_at | date-time | optional | |
| sent_at | date-time | optional | |
| delivered_at | date-time | optional | |
| read_at | date-time | optional |
id integer name string status string status_reason stringnull template object from string counts object charged stringnull send_at date-time started_at date-time completed_at date-time created_at date-time | Field | Type | Needed | What it is |
|---|---|---|---|
| id | integer | optional | |
| name | string | optional | |
| status | string | optional | scheduled · queueing · running · paused · completed · cancelled · failed |
| status_reason | stringnull | optional | Why it paused or failed, in words. |
| template | object | optional | |
| from | string | optional | |
| counts | object | optional | |
| charged | stringnull | optional | What it cost, once settled. Null while running or when the workspace is not charged. |
| send_at | date-time | optional | |
| started_at | date-time | optional | |
| completed_at | date-time | optional | |
| created_at | date-time | optional |
to string status string reason stringnull sent_at date-time delivered_at date-time read_at date-time | Field | Type | Needed | What it is |
|---|---|---|---|
| to | string | optional | |
| status | string | optional | pending · queued · sending · sent · delivered · read · failed · skipped |
| reason | stringnull | optional | For skipped and failed, in words. |
| sent_at | date-time | optional | |
| delivered_at | date-time | optional | |
| read_at | date-time | optional |
phone string name stringnull first_name stringnull last_name stringnull email stringnull city stringnull state stringnull postal_code stringnull company stringnull birthday stringnull anniversary stringnull fields object people PersonOnNumber[] tags array groups array consent object last_message_from_them_at date-time created_at date-time updated_at date-time | Field | Type | Needed | What it is |
|---|---|---|---|
| phone | string | optional | |
| name | stringnull | optional | |
| first_name | stringnull | optional | |
| last_name | stringnull | optional | |
| stringnull | optional | ||
| city | stringnull | optional | |
| state | stringnull | optional | |
| postal_code | stringnull | optional | |
| company | stringnull | optional | |
| birthday | stringnull | optional | ISO 8601; --09-20 when the year is not known. |
| anniversary | stringnull | optional | |
| fields | object | optional | Your own fields, by key. |
| people | PersonOnNumber[] | optional | Everybody else who uses this number, each with their own birthday. |
| tags | array | optional | |
| groups | array | optional | |
| consent | object | optional | |
| last_message_from_them_at | date-time | optional | Opens the 24-hour window. |
| created_at | date-time | optional | |
| updated_at | date-time | optional |
name string language string category string status string sendable boolean variables object text string media object | Field | Type | Needed | What it is |
|---|---|---|---|
| name | string | optional | |
| language | string | optional | |
| category | string | optional | MARKETING · UTILITY · AUTHENTICATION |
| status | string | optional | APPROVED · PENDING · REJECTED · PAUSED · DISABLED |
| sendable | boolean | optional | |
| variables | object | optional | |
| text | string | optional | The body, with {{1}} placeholders. |
| media | object | optional |
id string required type string required created_at date-time required data object required {message: Message}; message.received → {message: {id, from, type, text, received_at}, contact: Contact}; contact.* → {contact: Contact}; broadcast.finished → {broadcast: Broadcast}; template.* → {template: Template, reason}.| Field | Type | Needed | What it is |
|---|---|---|---|
| id | string | required | |
| type | string | required | message.sent · message.delivered · message.read · message.failed · message.received · contact.opted_out · contact.opted_in · broadcast.finished · template.approved · template.rejected · webhook.test |
| created_at | date-time | required | |
| data | object | required | message.* → {message: Message}; message.received → {message: {id, from, type, text, received_at}, contact: Contact}; contact.* → {contact: Contact}; broadcast.finished → {broadcast: Broadcast}; template.* → {template: Template, reason}. |
Every refusal has the same shape and the
message is a sentence you can put in front of a person — "this person asked not to
be messaged on 3 October", not error 131050. Branch on
code, never on the words.
invalid_request HTTP 400 fields says whichunauthenticated HTTP 401 insufficient_balance HTTP 402 api_not_enabled HTTP 403 workspace_suspended HTTP 403 message says whynot_found HTTP 404 idempotency_conflict HTTP 409 Idempotency-Key was used with a different bodyopted_out HTTP 422 since says wheninvalid_number HTTP 422 window_closed HTTP 422 template_not_found HTTP 422 template_not_sendable HTTP 422 message says whichmissing_variable HTTP 422 missing_media HTTP 422 mediaunsupported_template HTTP 422 number_not_ready HTTP 422 not_cancellable HTTP 422 rate_limited HTTP 429 Retry-After secondswhatsapp_error HTTP 502 message is its reason in plain words| HTTP | Code | What it means |
|---|---|---|
| 400 | invalid_request | A field is missing or wrong; fields says which |
| 401 | unauthenticated | No key, or a key that was revoked or never existed |
| 402 | insufficient_balance | The balance does not cover it; top up in Billing |
| 403 | api_not_enabled | The API is not switched on for this workspace |
| 403 | workspace_suspended | Sending is stopped; message says why |
| 404 | not_found | No such message, broadcast, contact, template or group |
| 409 | idempotency_conflict | That Idempotency-Key was used with a different body |
| 422 | opted_out | The person opted out; since says when |
| 422 | invalid_number | Not a phone number, or not on WhatsApp |
| 422 | window_closed | A free-form reply outside the 24-hour window; send a template |
| 422 | template_not_found | No approved template by that name (and language) |
| 422 | template_not_sendable | The template is pending, rejected or paused; message says which |
| 422 | missing_variable | The template needs more values than were given |
| 422 | missing_media | The template has a photo, video or PDF at the top; send it as media |
| 422 | unsupported_template | The template has a map location at the top, which talkv cannot send yet |
| 422 | number_not_ready | The WhatsApp number cannot send yet; see Setup in talkv |
| 422 | not_cancellable | The broadcast has already finished, so there is nothing to stop |
| 429 | rate_limited | Too many requests; wait Retry-After seconds |
| 502 | whatsapp_error | WhatsApp refused it; message is its reason in plain words |
Next: the events talkv sends back to you.
Webhooks