Before you start
The API lives at https:/. Everything for an account sits under /, and it takes and returns JSON.
Each customer connects their own account, and your tool stores each one's details. What you need from each customer:
- Their account number, the one in the dashboard address (
/).app/ accounts/ 42/ … - The access token of an administrator of that account.
- A connected official WhatsApp API number and, to write to people who have not written, templates approved by Meta.
- The plan boxes your integration uses.
42 is the account number, 7 its WhatsApp inbox, 129 a contact and 27 a conversation.Authentication
Every request carries the token in the api_access_token header. Authorization: Bearer with the same token works too.
The token is in the Conectta dashboard: your profile → Profile settings → Access token. Use an account administrator's token: creating webhooks and inbound webhooks requires that role.
curl https://conectta.me/api/v1/accounts/42/inboxes \
-H "api_access_token: YOUR_TOKEN"
When something goes wrong
Rely on the HTTP status and the code field: the error text may come in the account's language.
Invalid Access TokenYou are not authorized to access this accountYou are not authorized to do this actioncuenta_sin_planapi_no_incluidaconexiones_no_incluidasResource could not be foundmessage, attributesSend WhatsApp messages
WhatsApp only allows free text during the 24 hours after the customer's last message. Outside that window, or to someone who has never written, you send a template approved by Meta.
1. The WhatsApp inbox and its templates
GET / returns the account's inboxes; the official WhatsApp API one has channel_type equal to Channel::Whatsapp. Its templates, with their status, come from this call. Use only the APPROVED ones.
GET/
curl https://conectta.me/api/v1/accounts/42/inboxes/7/message_templates \
-H "api_access_token: YOUR_TOKEN"
{
"payload": [
{
"name": "pedido_confirmado",
"language": "es",
"status": "APPROVED",
"category": "UTILITY",
"parameter_format": "POSITIONAL",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, recibimos tu pedido {{2}} por {{3}}. Te avisamos cuando salga."
}
]
}
]
}
2. To a new customer: contact and template
First the contact, with the phone number in international format (with + and country code):
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/contacts \
-H "api_access_token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inbox_id": 7,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com"
}'
{
"payload": {
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com"
},
"contact_inbox": {
"source_id": "573001234567"
}
}
}
422 ("Phone number has already been taken"). Look it up with GET /contacts/search?q=%2B573001234567 and use its id.Then open the conversation by sending the template:
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/conversations \
-H "api_access_token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inbox_id": 7,
"contact_id": 129,
"message": {
"content": "Hola Ana, recibimos tu pedido PED-1042 por $89.900. Te avisamos cuando salga.",
"template_params": {
"name": "pedido_confirmado",
"category": "UTILITY",
"language": "es",
"processed_params": {
"body": {
"1": "Ana",
"2": "PED-1042",
"3": "$89.900"
}
}
}
}
}'
contenttemplate_params.nametemplate_params.languagees, pt_BR…).template_params.categoryUTILITY, MARKETING…).processed_params.body{"1": "Ana", "2": "PED-1042"}. If the template uses named variables, the key is the name.processed_params.header{"media_url": "https://…", "media_type": "image"} .processed_params.buttons[{"type": "url", "parameter": "PED-1042"}].The response is the conversation. Keep its id (here, 27): it is the number you use to write later.
{
"id": 27,
"inbox_id": 7,
"status": "open",
"can_reply": false
}
3. Text in an open conversation
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/conversations/27/messages \
-H "api_access_token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "All set, Ana! Your order PED-1042 has shipped. It arrives tomorrow."
}'
It only goes out if the customer wrote in the last 24 hours. The conversation's can_reply field tells you; it is in GET / and in the webhooks.
4. How to know it arrived
The response only says Conectta accepted the message: sending it to WhatsApp happens right after. The result arrives in the message_updated webhook. The status is in conversation. (sent, delivered, read or failed) and, if it failed, the reason is in content_attributes..
You can also ask with GET /: each message has its status, and its source_id is the message ID on WhatsApp.
Receive webhooks
Conectta sends a POST to your URL every time something happens in the account: a message, a sale, an appointment, an order that changes stage. You choose the events. The customer can also create the webhook in the dashboard, under Automation → Webhook.
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/webhooks \
-H "api_access_token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"webhook": {
"name": "My tool",
"url": "https://tu-herramienta.com/conectta/avisos",
"subscriptions": [
"message_created",
"message_updated",
"sale_created",
"sale_updated",
"appointment_booked",
"order_status_changed"
]
}
}'
{
"payload": {
"webhook": {
"id": 3,
"name": "My tool",
"url": "https://tu-herramienta.com/conectta/avisos",
"account_id": 42,
"subscriptions": [
"message_created",
"message_updated",
"sale_created",
"sale_updated",
"appointment_booked",
"order_status_changed"
],
"secret": "kD8sQ2mW5xP9rT3vZ6nB1cF4"
}
}
}
Keep the secret: you use it to check the webhook comes from Conectta. An event that does not exist returns 422, and each URL can appear only once per account.
/webhooks /webhooks/{id} /webhooks/{id} /webhooks/{id}/prueba {"evento": "sale_created"}. It arrives with made-up data and "test": true.The events
Business events
They need the "Outgoing business events" box in the plan. They all have the same shape: event, account and data.
sale_createdsale_updatedpending, confirmed, refunded, voided). With cash on delivery, this is when it gets paid or falls through.appointment_bookedappointment_updatedconfirmed, rescheduled, cancelled, attended, no_show).order_status_changedreceived, preparing, shipped, delivered and cancelled). It carries source and, if a connected tool sent the order, its reference in external_reference along with the conversation it belongs to.kanban_stage_changedfrom, to and board_id, the board if it is a custom one (null in the sales funnel). from arrives as null if the card had no saved stage yet.contact_opted_outconversation_ai_toggledai_enabled says how it ended up and origin who did it (agent, tool, assignment, keyword or automation).{
"event": "sale_created",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"id": 80,
"amount": 89900.0,
"currency": "COP",
"product": {
"id": 7,
"name": "Aromatherapy kit"
},
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": []
},
"conversation_id": 68,
"conversation_display_id": 27,
"closed_by": "Laura Méndez",
"created_at": "2026-10-27T11:38:25Z"
}
}
See an example of each business event
{
"event": "sale_updated",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"id": 80,
"from": "pending",
"to": "confirmed",
"amount": 89900.0,
"currency": "COP",
"product": {
"id": 7,
"name": "Aromatherapy kit"
},
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": []
},
"conversation_id": 68,
"conversation_display_id": 27,
"at": "2026-10-29T15:02:11Z"
}
}
{
"event": "appointment_booked",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"id": 31,
"starts_at": "2026-10-30T15:00:00Z",
"ends_at": "2026-10-30T15:30:00Z",
"calendar": {
"id": 2,
"name": "Main calendar"
},
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": []
},
"conversation_id": 68,
"conversation_display_id": 27,
"created_at": "2026-10-27T11:41:01Z"
}
}
{
"event": "appointment_updated",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"id": 31,
"from": "confirmed",
"to": "cancelled",
"starts_at": "2026-10-30T15:00:00Z",
"calendar": {
"id": 2,
"name": "Main calendar"
},
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": []
},
"conversation_id": 68,
"conversation_display_id": 27,
"at": "2026-10-28T09:12:40Z"
}
}
{
"event": "order_status_changed",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"id": 12,
"code": "PED-1042",
"from": "preparing",
"to": "shipped",
"source": "conexion",
"external_reference": "PED-1042",
"total": 89900.0,
"currency": "COP",
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": []
},
"conversation_id": 68,
"conversation_display_id": 27,
"at": "2026-10-28T10:05:00Z"
}
}
{
"event": "kanban_stage_changed",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"conversation_id": 68,
"conversation_display_id": 27,
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": []
},
"from": "en_atendimiento",
"to": "humano",
"board_id": null
}
}
{
"event": "contact_opted_out",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": [
"no_contactar"
]
},
"motivo": "stop_keyword"
}
}
{
"event": "conversation_ai_toggled",
"account": {
"id": 42,
"name": "Ana's Store"
},
"data": {
"conversation_id": 68,
"conversation_display_id": 27,
"contact": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com",
"custom_attributes": {},
"tags": []
},
"ai_enabled": false,
"origin": "tool",
"changed_by": {
"type": "tool",
"id": 5,
"name": "My tool"
},
"assignee": {
"id": 3,
"name": "Laura Méndez"
},
"at": "2026-11-24T16:20:00Z"
}
}
conversation_display_id is the API number: use it to call /conversations/{id} . conversation_id is an internal ID; it still arrives so nothing already connected breaks.Chat events
The whole object arrives (the message, the conversation or the contact) with event at the top. Here, conversation. is the API number.
message_createdmessage_type is incoming or outgoing).message_updatedconversation_createdconversation_status_changedconversation_updatedchanged_attributes says what changed.contact_createdcontact_updatedconversation_typing_onconversation_typing_offinbox_createdinbox_updatedwebwidget_triggered{
"event": "message_created",
"id": 339,
"message_type": "incoming",
"content": "Can you send it today?",
"content_type": "text",
"private": false,
"source_id": "wamid.HBgMNTczMDAxMjM0NTY3FQIAEhgg",
"created_at": "2026-10-27T11:48:09.278Z",
"sender": {
"id": 129,
"name": "Ana Gómez",
"phone_number": "+573001234567",
"email": "ana@ejemplo.com"
},
"inbox": {
"id": 7,
"name": "WhatsApp"
},
"account": {
"id": 42,
"name": "Ana's Store"
},
"conversation": {
"id": 27,
"inbox_id": 7,
"status": "open",
"can_reply": true,
"contact_inbox": {
"source_id": "573001234567"
},
"messages": [
{
"id": 339,
"status": "sent"
}
]
}
}
{
"event": "conversation_updated",
"id": 27,
"inbox_id": 7,
"status": "open",
"changed_attributes": [
{
"custom_attributes": {
"previous_value": {
"kanban_stage": "en_atendimiento"
},
"current_value": {
"kanban_stage": "convertido"
}
}
}
]
}
Signature and retries
Every webhook carries three headers. Check the signature before trusting what it brings:
X-Conectta-Signaturesha256= and the HMAC-SHA256, in hex, of {timestamp}.{body} (the raw body) with the webhook secret.X-Conectta-TimestampX-Conectta-DeliveryCompute the signature over the body exactly as it arrived, before parsing it as JSON (with Express, express.). And reject webhooks older than 5 minutes.
const crypto = require('crypto');
function isValidConecttaEvent(rawBody, headers, secret) {
const timestamp = headers['x-conectta-timestamp'];
const signature = headers['x-conectta-signature'] || '';
if (!timestamp || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex');
const a = Buffer.from(signature);
const b = Buffer.from(expected);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
import hashlib
import hmac
import time
def is_valid_conectta_event(raw_body: bytes, headers, secret: str) -> bool:
timestamp = headers.get('X-Conectta-Timestamp', '')
signature = headers.get('X-Conectta-Signature', '')
if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > 300:
return False
message = timestamp.encode() + b'.' + raw_body
expected = 'sha256=' + hmac.new(secret.encode(), message, hashlib.sha256).hexdigest()
return hmac.compare_digest(signature, expected)
Retries
- Reply with a
2xxright away and process later. Conectta waits about 5 seconds for the response. - If it times out, cannot connect or you reply
408,429or5xx, it retries after 30 seconds, 2 minutes and 10 minutes. - Any other
4xxis a "no" and is not repeated. X-Conectta-Deliveryrepeats across retries: store it and drop what you already processed.- Do not rely on arrival order: a retry can arrive after a newer webhook.
- Webhooks only go out while the account has an active plan or trial.
Send orders to Conectta
With an inbound webhook, your tool passes each order to Conectta and Conectta writes to the buyer with a template, even if they have never written before. Sending orders does not need the token: the URL carries its own key.
1. Create the inbound webhook
The customer creates it in the dashboard (Automation → Webhook → Inbound webhooks), or your tool does with the API:
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/conectta_inbound_webhooks \
-H "api_access_token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inbound_webhook": {
"name": "Orders from My tool",
"secret": "a-long-secret-key"
}
}'
{
"id": 1,
"name": "Orders from My tool",
"status": "inactive",
"configured": false,
"has_secret": true,
"url": "https://conectta.me/webhooks/entrada/3f6b1c2e-8a4d-4e7b-9c1a-5d2e7f8a9b0c"
}
It starts inactive. The secret is optional, but without it anyone who knows the URL can send WhatsApp messages on the customer's behalf.
2. Listening mode: send a sample order
With POST / the webhook waits. The next order that arrives is stored as a sample: it is not processed, sends nothing and needs no signature. Read it in sample_payload with GET / and map the fields on that real data.
curl -X POST https://conectta.me/api/v1/accounts/42/conectta_inbound_webhooks/1/listen \
-H "api_access_token: YOUR_TOKEN"
3. Map the fields and activate it
Paths use dots to go down levels. For this order from your tool…
{
"pedido": {
"codigo": "PED-1042",
"producto": "Aromatherapy kit",
"total": 89900,
"moneda": "COP"
},
"cliente": {
"nombre": "Carlos Ruiz",
"telefono": "300 765 4321",
"email": "carlos@ejemplo.com"
}
}
…this is the configuration:
curl -X PATCH https://conectta.me/api/v1/accounts/42/conectta_inbound_webhooks/1 \
-H "api_access_token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inbound_webhook": {
"status": "active",
"config": {
"template_name": "pedido_confirmado",
"lang_code": "es",
"phone_field": "cliente.telefono",
"country_code": "57",
"order_id_field": "pedido.codigo",
"body_fields": [
"@{cliente.nombre}",
"@{pedido.codigo}",
"$@{pedido.total}"
],
"name_field": "cliente.nombre",
"email_field": "cliente.email",
"record_sale": true,
"amount_field": "pedido.total",
"currency_field": "pedido.moneda",
"open_conversation": true
}
}
}'
template_namelang_codees if not set).phone_fieldcliente.telefono ).country_code57).order_id_fieldbody_fields@{ruta} inside (ruta is the path).name_fieldemail_fieldrecord_saleamount_fieldcurrency_fieldCOP if missing).open_conversationkanban_stageconvertido if not set). Needs open_conversation.inbox_id4. Send each order
A POST to the URL with the order as JSON. If you set a secret, sign the body: X-Conectta-Signature is the HMAC-SHA256 of the raw body with the secret, in Base64. It is not the same signature as the outgoing webhooks.
const crypto = require('crypto');
const URL = 'https://conectta.me/webhooks/entrada/3f6b1c2e-8a4d-4e7b-9c1a-5d2e7f8a9b0c';
const SECRET = 'a-long-secret-key';
async function sendOrder(order) {
const body = JSON.stringify(order);
const signature = crypto.createHmac('sha256', SECRET).update(body).digest('base64');
const response = await fetch(URL, {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-Conectta-Signature': signature },
body,
});
return response.json();
}
import base64
import hashlib
import hmac
import json
import urllib.request
URL = 'https://conectta.me/webhooks/entrada/3f6b1c2e-8a4d-4e7b-9c1a-5d2e7f8a9b0c'
SECRET = 'a-long-secret-key'
def send_order(order: dict) -> dict:
body = json.dumps(order).encode()
signature = base64.b64encode(hmac.new(SECRET.encode(), body, hashlib.sha256).digest()).decode()
request = urllib.request.Request(URL, data=body, method='POST', headers={
'Content-Type': 'application/json',
'X-Conectta-Signature': signature,
})
with urllib.request.urlopen(request) as response:
return json.load(response)
{"status": "queued"}{"status": "sample_stored"}{"status": "inactive"}UnauthorizedNot FoundPOST /conectta_inbound_webhooks/{id}/cambiar_url .Too Many RequestsBad RequestConectta returns 200 even if something fails later, so your tool does not mark the URL as broken. Each order's result is in GET /: send_status is sent, failed or skipped, with the reason in error.
What Conectta does with each order
- Checks the account has an active plan and the "Inbound webhooks" box. If not, it logs it as skipped.
- Reads the phone number and adds the country code if needed.
- If that reference was already confirmed, it skips it. A retry does not write to the buyer twice.
- Sends the template through the account's WhatsApp, even if the buyer has never written.
- Creates the contact or completes the existing one (name and email, if missing).
- If you asked for it, opens the conversation, records the sale as confirmed by the payment gateway and moves the card to "Converted". The
sale_createdandkanban_stage_changedwebhooks go out.
Connected tools
If your tool is in Conectta's catalog, like Luja, the customer doesn't have to give you their token or set up webhooks. They go to Settings → Connected tools, choose your tool and click "Connect". In one step, Conectta creates a key just for your tool, the webhook to your address and an address for your orders, and hands it all over in a code the customer pastes into your tool.
If you're not in the catalog, the customer chooses "Another tool" and enters the name, your webhook address and the events themselves. Everything else is the same, except that your orders are not signed.
1. Read the connection code
It starts with cnx_. The rest is JSON in URL-safe Base64 (with - and _ instead of + and /) and without the = padding. It is not encrypted: keep it like a password. The customer only sees it once; if they lose it, they generate a new key.
cnx_eyJ2IjoxLCJoZXJyYW1pZW50YSI6Imx1amEiLCJhcGkiOiJodHRwczovL2NvbmVjdHRhLm1lIiwiY3VlbnRhIjo0MiwiYmFuZGVqYSI6NywiY2xhdmUiOiJYazdwUTJtTjl2UjR0Vzh5QjNjRjZoSjEiLCJwZWRpZG9zIjoiaHR0cHM6Ly9jb25lY3R0YS5tZS93ZWJob29rcy9lbnRyYWRhLzNmNmIxYzJlLThhNGQtNGU3Yi05YzFhLTVkMmU3ZjhhOWIwYyIsInNlY3JldG8iOiJjM2Y5YTFlN2IyZDg0ZjZhOWUwYzViN2QxZjNhOGUyYzRiNmQ5ZjBhMWUzYzViN2QifQ
This is what's inside:
{
"v": 1,
"herramienta": "luja",
"api": "https://conectta.me",
"cuenta": 42,
"bandeja": 7,
"clave": "Xk7pQ2mN9vR4tW8yB3cF6hJ1",
"pedidos": "https://conectta.me/webhooks/entrada/3f6b1c2e-8a4d-4e7b-9c1a-5d2e7f8a9b0c",
"secreto": "c3f9a1e7b2d84f6a9e0c5b7d1f3a8e2c4b6d9f0a1e3c5b7d"
}
v1.herramientaluja). It is null if the customer connected it as "Another tool".api/. The account API is at {api}/api/v1/accounts/{cuenta} .cuentabandejanull if the account has no WhatsApp.claveapi_access_token header.pedidossecretoTo read it:
function readConnectionCode(code) {
const text = code.trim();
if (!text.startsWith('cnx_')) throw new Error('Not a Conectta connection code');
return JSON.parse(Buffer.from(text.slice(4), 'base64url').toString('utf8'));
}
const connection = readConnectionCode(pastedCode);
const baseUrl = `${connection.api}/api/v1/accounts/${connection.cuenta}`;
const headers = { api_access_token: connection.clave, 'Content-Type': 'application/json' };
import base64
import json
def read_connection_code(code: str) -> dict:
text = code.strip()
if not text.startswith('cnx_'):
raise ValueError('Not a Conectta connection code')
data = text[4:]
return json.loads(base64.urlsafe_b64decode(data + '=' * (-len(data) % 4)))
connection = read_connection_code(pasted_code)
base_url = f"{connection['api']}/api/v1/accounts/{connection['cuenta']}"
headers = {'api_access_token': connection['clave'], 'Content-Type': 'application/json'}
2. What your key can do
It goes in the api_access_token header, like a token. The key belongs to your tool, not to a person: what you send shows up in the chat under its name, and the customer can remove it without touching anyone else's key. It only opens these routes; any other returns 401.
/contacts /contacts/search?q={texto} /contacts/{id} /contacts inbox_id it's ready to be written to through that inbox./contacts/{id} /contacts/{id}/contact_inboxes {"inbox_id": 7}./contacts/{id}/labels /contacts/{id}/labels {"labels": ["cliente"]}./conversations inbox_id and contact_id and, if you like, the first message./conversations/{id} /conversations/{id} priority)./conversations/{id}/toggle_status {"status": "resolved"}./conversations/{id}/custom_attributes custom_attributes. They are added to the ones it already has./conversations/{id}/messages /conversations/{id}/messages /conversations/{id}/labels /conversations/{id}/labels /conversations/{id}/toggle_ai {"enabled": false} pauses it (the funnel and follow-ups too, and the card moves to «humano»); {"enabled": true} gives it back. Assigning it to a person does not pause it, unless the account has that turned on./conversations/{id}/assignments assignee_id) or a team (team_id)./inboxes/{id} message_templates.403 with conexiones_no_incluidas; if the account has no active plan or trial, 402 with cuenta_sin_plan. If the customer disconnects your tool or generates a new key, the old one stops working right away (401).The key can't list conversations: keep the id that POST / returns, or take it from conversation. in the chat webhooks.
3. Write to a new number
First the contact, with inbox_id (the bandeja in the code) so it's ready to be written to through that WhatsApp:
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/contacts \
-H "api_access_token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"inbox_id": 7,
"name": "Ana Gómez",
"phone_number": "+573001234567"
}'
422. Look it up with GET /contacts/search?q=%2B573001234567 and continue with its id.Then open the conversation:
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/conversations \
-H "api_access_token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"inbox_id": 7,
"contact_id": 129
}'
{
"id": 27,
"inbox_id": 7
}
And send the message. To someone who has never written to you, with an approved template (the fields are the ones in "Send WhatsApp messages"):
POST/
curl -X POST https://conectta.me/api/v1/accounts/42/conversations/27/messages \
-H "api_access_token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Hola Ana, recibimos tu pedido PED-1042 por $89.900. Te avisamos cuando salga.",
"template_params": {
"name": "pedido_confirmado",
"category": "UTILITY",
"language": "es",
"processed_params": {
"body": {
"1": "Ana",
"2": "PED-1042",
"3": "$89.900"
}
}
}
}'
Once the customer replies, you can send them free text for 24 hours.
4. Send your orders
With a JSON POST to the pedidos address in the code. Unless your tool's catalog entry says otherwise, this is the format:
{
"id": "PED-1042",
"status": "paid",
"phase": "received",
"total": 59900,
"currency": "COP",
"customer": {
"name": "Ana Gómez",
"phone": "+573001234567",
"email": "ana@ejemplo.com"
},
"items": [
{
"name": "Alitas x12",
"quantity": 1,
"price": 27500,
"notes": [
"Salsa tártara"
]
},
{
"name": "Limonada",
"quantity": 2,
"price": 16200
}
],
"delivery": {
"type": "delivery",
"address": "Calle 10 # 5-20",
"city": "Medellín",
"scheduled_at": "2026-11-24T15:00:00-05:00"
},
"payment_method": "Efectivo",
"notes": "Sin cebolla"
}
idstatus"paid" does the sale go into the sales book. With any other value, the contact and the conversation are saved, nothing else.phasereceived, preparing, shipped, delivered or cancelled. accepted, on_the_way, completed and rejected are also accepted. Send the order again every time it changes: with the same id the same order moves, and the buyer gets the notice the business has set for that stage. It is optional; without it no order is created.total59900).currencyCOP if missing).customer.namecustomer.phone+573001234567). It's the only required field; without it, the order is marked as failed.customer.emailitemsname, quantity, price (the price of one) and, if any, notes with what the customer asked for that product. Optional.delivery.typepickup if the buyer collects it, delivery if it is sent to an address. With pickup Conectta does not ask for an address.delivery.addressdelivery.citydelivery.scheduled_at2026-11-24T15:00:00-05:00).payment_methodCash, Card). Conectta shows it as is.notesWith that format, Conectta saves the contact, opens the conversation with the buyer (or continues the one already open) and, if status is "paid", records the sale as confirmed by the payment gateway. It doesn't send them any WhatsApp message: you do that with your key.
If your tool is in the catalog, sign each order with the secreto: X-Conectta-Signature is the HMAC-SHA256 of the raw body, in Base64, as in step 4 of "Send orders". Without a signature, or with one that doesn't match, it returns 401. "Another tool" doesn't sign: its address is already secret.
If the customer generates a new key or reconnects your tool, the pedidos address changes too and the old one returns 404: always use the one from the latest code.
Don't mix up the two signatures. Both go in X-Conectta-Signature and use the same secreto, but they are computed differently:
sha256= and the HMAC-SHA256, in hex, of {timestamp}.{body} . They come with X-Conectta-Timestamp and X-Conectta-Delivery.5. The webhooks
They arrive at your webhook address with the events the customer chose, signed with the secreto and with the usual retries. Business events arrive even if the plan doesn't include "Outgoing business events": "Connected tools" is enough.
What the account's plan needs
Each account has its plan, and these boxes decide what your integration can use. If a customer is missing one, they can change plans or write to us.
403 with api_no_incluida.403 with conexiones_no_incluidas. The plan also caps the number of connected tools.402.402 with cuenta_sin_plan and no webhook goes out.Frequently asked questions
No. It connects to each customer's account with that account's token, and each customer pays for their own plan. To test, create a free trial account.
It is almost always WhatsApp's 24-hour window. If the customer has not written in the last 24 hours, free text does not go out; you have to send an approved template. The reason arrives in the message_updated webhook.
Conectta retries each webhook after 30 seconds, 2 minutes and 10 minutes. If your server is still down after the last attempt, that webhook is lost.
Yes. "Send a test" sends a sample of any event to your URL, with the same shape as the real one, made-up data and "test" set to true.
They click "New key" in Settings → Connected tools and paste you the new code. The old key and secret stop working at that moment.