Welcome to the documentation for the public API of Ventia CRM module.
Ventia has differents module and the module who have available API are:
- CRM
- Sales Manager
- People
All request on Ventia require a valid API Key passed as query string on the request.
Example:
https://api.getventia.com/api/v1.0/contact?api-key=AAAAAAA-BBBBBBB-CCCCCCC-DDDDDDD
Authentication error response
If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.
To ensure the best possible performance and availability for all our users, we have implemented rate and usage limits on our API. These limits are designed to prevent any single user from consuming excessive resources and negatively impacting the experience for others.
Maximum Requests Per Minute
Our API enforces a maximum limit of 200 requests per minute (RPM). This means that you can make up to 200 requests within a one-minute time frame. If you exceed this limit, your requests will be throttled, and you will receive an HTTP 429 "Too Many Requests" response.
Please note that the rate limit is applied on a per-account basis, so all API keys associated with a single account will share the same limit.
When fetching a endpoint who has a list, pagination is used by default.
To controll the pagination use on the url on the querystring :
?page=0
to controll the page you'r viewing
?limit=100
to controll the page size
Need some help?
If you need support you can use our support via email or support chat on Ventia
Response samples
- 200
[- {
- "_id": "621e8a5463c02a8bd532ff8c",
- "company": "609b3cff61ffd5f1e446d234",
- "firstName": "Agustin",
- "lastName": "Suarez",
- "origin": "local",
- "phones": [
- "+59897123678"
], - "agent": "6234da84259c59d9a555c498",
- "agentAssigned": "2022-03-01T21:04:20.611Z",
- "archivingReason": "",
- "status": "closed",
- "emails": [ ],
- "detail": "",
- "createdAt": "2022-03-01T21:04:20.617Z",
- "updatedAt": "2022-05-20T16:00:00.004Z",
- "__v": 0,
- "lastInteraction": "2022-05-20T16:00:00.004Z",
- "archivingReasonText": "",
- "agentFullName": "Agente Uno"
}
]
Response samples
- 200
{- "_id": "621e8a5463c02a8bd532ff8c",
- "company": "609b3cff61ffd5f1e446d234",
- "firstName": "Agustin",
- "lastName": "Suarez",
- "origin": "local",
- "phones": [
- "+59897123456"
], - "agent": "6234da84259c59d9a555c498",
- "agentAssigned": "2022-03-01T21:04:20.611Z",
- "archivingReason": "",
- "status": "closed",
- "emails": [ ],
- "detail": "",
- "createdAt": "2022-03-01T21:04:20.617Z",
- "updatedAt": "2022-05-20T16:00:00.004Z",
- "__v": 0,
- "lastInteraction": "2022-05-20T16:00:00.004Z",
- "archivingReasonText": "",
- "agentFullName": "Agente"
}
Modify contact
Authorizations:
path Parameters
idcontact required | string |
Request Body schema: application/jsonrequired
firstName required | string |
lastName required | string |
emails required | Array of strings |
phones required | Array of strings |
detail required | string |
origin required | string |
Responses
Request samples
- Payload
{- "firstName": "Agustin",
- "lastName": "Suarez",
- "emails": [
- "agustin@example.com"
], - "phones": [
- "+59897444666"
], - "detail": "",
- "origin": "store"
}
Response samples
- 200
{- "_id": "621e8a5463c02a8bd532ff8c",
- "company": "609b3cff61ffd5f1e446d234",
- "firstName": "Agustin",
- "lastName": "Perez",
- "origin": "local",
- "phones": [
- "+59897444666"
], - "archivingReason": "",
- "status": "new",
- "emails": [
- "agustin@example.com"
], - "detail": "",
- "createdAt": "2022-03-01T21:04:20.617Z",
- "updatedAt": "2023-05-23T20:20:25.420Z",
- "__v": 1,
- "lastInteraction": "2023-05-23T20:20:25.418Z",
- "archivingReasonText": "",
- "assignedGroups": [ ],
- "attention": "not_actions",
- "channels": [ ],
- "databaseUploded": false,
- "reminder": "2023-05-23T20:25:02.561Z"
}
List interactions from one contact
Authorizations:
path Parameters
idcontact required | string |
Responses
Response samples
- 200
[- {
- "_id": "6287bb00d81dc586b61dc64f",
- "content": {
- "reminderDate": null
}, - "company": "609b3cff61ffd5f1e446d234",
- "contact": "621e8a5463c02a8bd532ff8c",
- "status": "started",
- "via": "server",
- "type": "reminder",
- "createdAt": "2022-05-20T16:00:00.006Z",
- "updatedAt": "2022-05-20T16:00:00.006Z",
- "__v": 0
}
]
Request samples
- Payload
{ "firstName": "Agustin", "lastName": "Suarez", "emails": ["agustin@example.com"], "phones": ["+59897444666"], "detail": "", "origin": "store" } }
Response samples
- 200
{- "company": "609b3cff61ffd5f1e446d234",
- "firstName": "Agustin",
- "lastName": "Suarez",
- "origin": "local",
- "originText": "Local",
- "phones": [
- "+59894444666"
], - "agent": "609d8512ee84d2388bde2353",
- "agentFullName": "Agent Name",
- "firstAgent": "609d8512ee84d2388bde2353",
- "firstAgentFullName": "Agent Name",
- "agentAssigned": "2023-05-18T17:55:17.559Z",
- "archivingReason": "",
- "archivingReasonText": "",
- "status": "new",
- "attention": "not_actions",
- "emails": [
- "agustin@example.com"
], - "detail": "",
- "stats": {
- "visits": 0
}, - "createdCoords": {
- "active": false
}, - "contactLocation": {
- "location": false
}, - "databaseUploded": false,
- "channels": [ ],
- "assignedGroups": [ ],
- "_id": "64666685696358053f46c33a",
- "lastInteraction": "2023-05-18T17:55:17.560Z",
- "createdAt": "2023-05-18T17:55:17.561Z",
- "updatedAt": "2023-05-18T17:55:17.561Z",
- "__v": 0
}
Create lead
Add Lead
This endpoint allows you to create campaing leads.
Campaing leads are created as contacts if they dosen't exist on the database, but if it exists, ventia notifiys the agent owner of the contact with a note.
Authorizations:
Request Body schema: application/jsonrequired
firstName required | string |
lastName required | string |
emails required | Array of strings |
phones required | Array of strings |
detail required | string |
origin required | string |
agent required | string |
Responses
Request samples
- Payload
{- "firstName": "Agustin",
- "lastName": "Suarez",
- "emails": [
- "agustin@example.com"
], - "phones": [
- "+59894444666"
], - "detail": "",
- "origin": "local",
- "agent": "609d8512ee84d2388bde2353"
}
Response samples
- 200
{- "company": "609b3cff61ffd5f1e446d234",
- "firstName": "Agustin",
- "lastName": "Suarez",
- "origin": "local",
- "originText": "Local",
- "phones": [
- "+59894444666"
], - "agent": "609d8512ee84d2388bde2353",
- "agentFullName": "Agent Name",
- "firstAgent": "609d8512ee84d2388bde2353",
- "firstAgentFullName": "Agent Name",
- "agentAssigned": "2023-05-18T17:55:17.559Z",
- "archivingReason": "",
- "archivingReasonText": "",
- "status": "new",
- "attention": "not_actions",
- "emails": [
- "agustin@example.com"
], - "detail": "",
- "stats": {
- "visits": 0
}, - "createdCoords": {
- "active": false
}, - "contactLocation": {
- "location": false
}, - "databaseUploded": false,
- "channels": [ ],
- "assignedGroups": [ ],
- "_id": "64666685696358053f46c33a",
- "lastInteraction": "2023-05-18T17:55:17.560Z",
- "createdAt": "2023-05-18T17:55:17.561Z",
- "updatedAt": "2023-05-18T17:55:17.561Z",
- "__v": 0
}
Response samples
- 200
[- {
- "_id": "624b480631ea46a2248a85ad",
- "content": {
- "body": "this is a note"
}, - "company": "609b3cff61ffd5f1e446d234",
- "agent": "6234da84259c59d9a555c498",
- "contact": "624b2c9631ea46a22486c6a6",
- "status": "started",
- "via": "web",
- "type": "note",
- "createdAt": "2022-04-04T19:33:26.303Z",
- "updatedAt": "2022-04-04T19:33:26.303Z",
- "__v": 0
}
]
Create note
Authorizations:
path Parameters
idcontact required | string |
Request Body schema: application/jsonrequired
body required | string |
Responses
Request samples
- Payload
{- "body": "He will buy"
}
Response samples
- 200
{- "note": {
- "content": {
- "body": "He will buy"
}, - "_id": "646d122d060377fdcd48c418",
- "company": "609b3cff61ffd5f1e446d234",
- "agent": "6234da84259c59d9a555c498",
- "contact": "621e8a5463c02a8bd532ff8c",
- "status": "started",
- "via": "api",
- "createdCoords": {
- "active": false
}, - "type": "note",
- "createdAt": "2023-05-23T19:21:17.107Z",
- "updatedAt": "2023-05-23T19:21:17.107Z",
- "__v": 0
}
}
Archive contact
Authorizations:
path Parameters
idcontact required | string |
Request Body schema: application/jsonrequired
reason required | string |
Responses
Request samples
- Payload
{- "reason": "sintrabajo"
}
Response samples
- 200
{- "archive": {
- "content": {
- "from": "",
- "to": "notclient"
}, - "_id": "646d13f254f8f1d196927794",
- "company": "609b3cff61ffd5f1e446d234",
- "agent": "6234da84259c59d9a555c498",
- "contact": "621e8a5463c02a8bd532ff8c",
- "status": "started",
- "via": "api",
- "createdCoords": {
- "active": false
}, - "type": "archiving",
- "createdAt": "2023-05-23T19:28:50.867Z",
- "updatedAt": "2023-05-23T19:28:50.867Z",
- "__v": 0
}
}
Transfer contact
Authorizations:
path Parameters
idcontact required | string |
Request Body schema: application/jsonrequired
to required | string |
Responses
Request samples
- Payload
{- "to": "6234da84259c59d9a555c498"
}
Response samples
- 200
{- "transfer": {
- "content": {
- "fromUser": "63c85c877b9c7691b9b4e066",
- "toUser": "6234da84259c59d9a555c498"
}, - "_id": "646d130e060377fdcd48dfe1",
- "company": "609b3cff61ffd5f1e446d234",
- "agent": "63c85c877b9c7691b9b4e066",
- "contact": "621e8a5463c02a8bd532ff8c",
- "status": "started",
- "via": "api",
- "createdCoords": {
- "active": false
}, - "type": "transfer",
- "createdAt": "2023-05-23T19:25:02.561Z",
- "updatedAt": "2023-05-23T19:25:02.561Z",
- "__v": 0
}
}
Create reminder
Authorizations:
path Parameters
idcontact required | string |
Request Body schema: application/jsonrequired
reminderDate required | string |
Responses
Request samples
- Payload
{- "reminderDate": "2023-05-23T20:25:02.561Z"
}
Response samples
- 200
{- "message": "Reminder created",
- "reminder": {
- "content": {
- "reminderDate": "2023-05-23T20:25:02.561Z"
}, - "_id": "646d13b754f8f1d196927187",
- "company": "609b3cff61ffd5f1e446d234",
- "agent": "6234da84259c59d9a555c498",
- "contact": "621e8a5463c02a8bd532ff8c",
- "status": "started",
- "via": "api",
- "createdCoords": {
- "active": false
}, - "type": "reminder",
- "createdAt": "2023-05-23T19:27:51.406Z",
- "updatedAt": "2023-05-23T19:27:51.406Z",
- "__v": 0
}
}
Response samples
- 200
[- {
- "_id": "609d8512ee84d2388bde2353",
- "roles": [
- "user"
], - "name": "Agustin",
- "lastname": "Suarez",
- "email": "agustin@example.com",
- "phone_work": "097123456",
- "group": "609b3cff61ffd5f1e446d234",
- "firstLogin": true
}
]
Create user
Creates a new user in the system with the provided details.
Authorizations:
Request Body schema: application/jsonrequired
name required | string [ 2 .. 32 ] characters The user's first name |
lastname required | string non-empty The user's last name |
email required | string <email> The user's email address |
password required | string >= 4 characters The user's password |
phone_work | string or null The user's work phone number |
roles | Array of strings Default: ["user"] Items Enum: "user" "comercial" "super" The user's roles |
Responses
Request samples
- Payload
{- "name": "John",
- "lastname": "Doe",
- "email": "john.doe@example.com",
- "password": "mySecurePassword123",
- "phone_work": "+1234567890",
- "roles": [
- "user",
- "comercial"
]
}
Response samples
- 200
{- "_id": "64b7654c3f3ae9b9d1e7c5d8",
- "name": "John",
- "lastname": "Doe",
- "email": "john.doe@example.com",
- "phone_work": "+1234567890",
- "group": "64b7654c3f3ae9b9d1e7c5d7",
- "roles": [
- "user",
- "comercial"
], - "firstLogin": true
}
Get a user by ID
Retrieves a user by the id
parameter. Only active users belonging to the authenticated group or its descendant groups are returned.
Authorizations:
path Parameters
id required | string The ID of the user to retrieve |
header Parameters
X-API-KEY required | string The API key used to authenticate the request |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "_id": "64b7654c3f3ae9b9d1e7c5d8",
- "name": "John",
- "lastname": "Doe",
- "email": "john.doe@example.com",
- "phone_work": "+1234567890",
- "firstLogin": "2024-01-01T12:00:00Z",
- "group": "64b7654c3f3ae9b9d1e7c5d7",
- "roles": [
- "user",
- "super"
]
}
Partially update an existing user
Updates one or more fields of a user identified by the id
parameter.
Authorizations:
path Parameters
id required | string The ID of the user to be updated |
Request Body schema: application/jsonrequired
name | string [ 2 .. 32 ] characters The user's first name |
lastname | string non-empty The user's last name |
string <email> The user's email address | |
phone_work | string or null The user's work phone number |
roles | Array of strings Items Enum: "user" "comercial" "super" The user's roles |
Responses
Request samples
- Payload
{- "name": "Jane",
- "lastname": "Doe",
- "email": "jane.doe@example.com",
- "phone_work": "+9876543210",
- "roles": [
- "comercial"
]
}
Response samples
- 200
{- "_id": "64b7654c3f3ae9b9d1e7c5d8",
- "name": "Jane",
- "lastname": "Doe",
- "email": "jane.doe@example.com",
- "phone_work": "+9876543210",
- "group": "64b7654c3f3ae9b9d1e7c5d7",
- "roles": [
- "comercial"
]
}
Fully update or replace an existing user
Replaces the entire user identified by the id
parameter.
Authorizations:
path Parameters
id required | string The ID of the user to be updated |
Request Body schema: application/jsonrequired
name | string [ 2 .. 32 ] characters The user's first name |
lastname | string non-empty The user's last name |
string <email> The user's email address | |
phone_work | string or null The user's work phone number |
roles | Array of strings Items Enum: "user" "comercial" "super" The user's roles |
Responses
Request samples
- Payload
{- "name": "John",
- "lastname": "Doe",
- "email": "john.doe@example.com",
- "phone_work": "+1234567890",
- "roles": [
- "user",
- "super"
]
}
Response samples
- 200
{- "_id": "64b7654c3f3ae9b9d1e7c5d8",
- "name": "John",
- "lastname": "Doe",
- "email": "john.doe@example.com",
- "phone_work": "+1234567890",
- "group": "64b7654c3f3ae9b9d1e7c5d7",
- "roles": [
- "user",
- "super"
]
}
Response samples
- 200
[- {
- "_id": "609b3cff61ffd5f1e446d234",
- "descendants": [
- "609ecaec8e2966c543cce9d0"
], - "ancestors": [ ],
- "name": "Company Amazing",
- "displayName": "Amazing",
- "businessName": "Amazing SAS",
- "country": "uy",
- "archivingReasons": [
- {
- "name": "Not work",
- "code": "notwork",
- "active": true,
- "type": "normal",
- "_id": "62a8e944ce93810e2941ceee"
}
], - "origins": [
- {
- "name": "Store",
- "code": "store",
- "active": false,
- "ghost": false,
- "_id": "6369166819c8b5ece25fcb75"
}
], - "visitResults": [
- {
- "name": "Talked with owner",
- "code": "ownertalk",
- "type": "done",
- "active": true,
- "ghost": false,
- "group": "609b3cff61ffd5f1e446d234",
- "_id": "62e8232ee1ba4d62b8917e22"
}
], - "additionalDataFields": [
- {
- "name": "House name",
- "code": "housename",
- "type": "string",
- "active": true,
- "required": true,
- "ghost": false,
- "group": "609b3cff61ffd5f1e446d234",
- "options": [ ],
- "_id": "62f190b984d30b2740f7c372"
}
], - "statusTags": [ ]
}
]
Get sales data
Retrieves sales data filtered with pagination.
Authorizations:
query Parameters
page | integer >= 1 Default: 1 Page number for pagination. |
limit | integer [ 1 .. 100 ] Default: 50 Number of items per page. |
Responses
Response samples
- 200
- 401
- 404
{- "data": [
- {
- "_id": "string",
- "company": "string",
- "user": {
- "name": "string",
- "lastname": "string"
}, - "createdAt": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "totalItems": 0,
- "totalPages": 0,
- "currentPage": 0
}
}
Create a new sale
Creates a new sale record in the system.
Authorizations:
Request Body schema: application/jsonrequired
status required | string The status of the sale to match in system. |
ticket_id required | string ID of the ticket. |
ticket_sale_id | string ID of the ticket sale. |
date_sale | string <date> Sale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd. |
date | string <date> Sale date. Accepted format: yyyy/mm/dd or yyyy-mm-dd. |
type | string Type of sale. |
phone required | string Customer's phone number. |
name | string Customer's name. |
gov_id | string Customer's government ID. |
user required | string ID of the user making the sale. |
Responses
Request samples
- Payload
{- "status": "SOLD",
- "ticket_id": "ticket-5678",
- "ticket_sale_id": "sale-5678",
- "date_sale": "2024-02-24",
- "date": "2024-02-24",
- "type": "online",
- "phone": "+12345678900",
- "name": "John Doe",
- "gov_id": "12345678",
- "user": "abcd1234efgh5678ijkl9012"
}
Response samples
- 200
- 400
- 401
- 404
- 500
{- "ticket_id": "ticket-5678",
- "ticket_sale_id": "sale-5678",
- "date": "2024-02-24T15:00:00.000Z",
- "date_sale": "2024-02-24T15:00:00.000Z",
- "name": "John Doe",
- "phone": "+12345678900",
- "secondary_phones": [ ],
- "gov_id": "12345678",
- "status": "SOLD",
- "status_lock": false,
- "sold": true,
- "cancel": false,
- "lock": false,
- "user": "abcd1234efgh5678ijkl9012",
- "user_string": "John Doe",
- "user_lock": false,
- "user_edit": false,
- "company": "abcd1234efgh5678ijkl9012",
- "importation": "Public API",
- "value": 0,
- "remove_from_goal": false,
- "comissions": [
- { }
], - "_id": "abcd1234efgh5678ijkl9012",
- "createdAt": "2024-10-23T20:02:13.887Z",
- "updatedAt": "2024-10-23T20:02:13.887Z",
- "__v": 0
}
Get sale by ID
Retrieves a specific sale by its unique ID.
Authorizations:
path Parameters
id required | string The unique ID of the sale. |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "_id": "string",
- "company": "string",
- "user": {
- "name": "string",
- "lastname": "string"
}, - "createdAt": "2019-08-24T14:15:22Z"
}
Modify sale by ID
Updates fields of an existing sale by its unique ID.
Authorizations:
path Parameters
id required | string The unique ID of the sale to be updated. |
Request Body schema: application/jsonrequired
status | string Status of the sale. |
date_sale | string <date> Date when the sale occurred. |
user | string ID of the user associated with the sale. |
Responses
Request samples
- Payload
{- "status": "sold",
- "date_sale": "2024-01-01",
- "user": "60d0fe4f5311236168a109ca"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "_id": "string",
- "user": "string",
- "user_string": "string",
- "status": "string",
- "date_sale": "2019-08-24",
- "sold": true
}
Upsert sale by ID
Updates an existing sale by its unique ID or creates a new one if it doesn't exist.
Authorizations:
path Parameters
id required | string The unique ID of the sale to be upserted. |
Request Body schema: application/jsonrequired
status | string Status of the sale. |
ticket_id | string ID of the ticket related to the sale. |
ticket_sale_id | string Optional ID for ticket sale. |
date_sale | string <date> Optional sale date. |
date | string <date> Optional date of the sale record. |
type | string Type of sale. |
phone | string Phone number associated with the sale. |
name | string Optional name associated with the sale. |
product | string Optional product related to the sale. |
gov_id | string Optional government ID associated with the sale. |
user | string ID of the user responsible for the sale. |
importation | string Optional importation method. |
Responses
Request samples
- Payload
{- "status": "sold",
- "ticket_id": "123456",
- "date_sale": "2024-01-01",
- "phone": "+1234567890",
- "user": "60d0fe4f5311236168a109ca"
}
Response samples
- 200
- 400
- 401
- 403
- 404
- 500
{- "_id": "string",
- "status": "string",
- "date_sale": "2019-08-24",
- "phone": "string",
- "name": "string",
- "user": "string",
- "product": "string"
}
Create a new lead entry
Validates and creates a new lead entry based on the received data.
Authorizations:
path Parameters
code required | string The unique code of the lead entry form |
Request Body schema: application/jsonrequired
firstName | string |
lastName | string Default: "" |
phones | Array of strings |
emails | Array of strings <email> [ items <email > ] Default: [] |
detail | string Default: "" |
action_id | string |
object Default: {} |
Responses
Request samples
- Payload
{- "firstName": "string",
- "lastName": "",
- "phones": [
- "string"
], - "emails": [ ],
- "detail": "",
- "action_id": "string",
- "additionalData": { }
}
Response samples
- 200
- 400
- 401
- 404
- 500
{- "_id": "string",
- "firstName": "string",
- "lastName": "string",
- "phones": [
- "string"
], - "emails": [
- "user@example.com"
], - "detail": "string",
- "action_id": "string",
- "additionalData": {
- "property1": "string",
- "property2": "string"
}
}
Send message
This documentation provides guidelines for sending messages through the official WhatsApp API, with Ventia acting as an intermediary. It covers the supported message types, integration details, and best practices to ensure a seamless messaging experience. The supported message types align with those in the Facebook API. For more details, refer to the official Facebook documentation at https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages/. Some message types are still in development, so please check the documentation below to verify the available types.
Authorizations:
path Parameters
channelId required | string Unique identifier of the communication channel as registered on the Ventia platform. |
contactId required | string Unique identifier of the recipient contact as registered on the Ventia platform. |
Request Body schema: application/jsonrequired
preview_url | string Indicates whether a preview of the link will be generated in the WhatsApp message. If present and enabled, WhatsApp will attempt to fetch a preview of the link's content. |
required | object |
Responses
Request samples
- Payload
{- "preview_url": "string",
- "message": {
- "type": "text",
- "text": {
- "body": "string"
}, - "image": {
- "link": "string",
- "id": "string",
- "caption": "string"
}, - "video": {
- "link": "string",
- "id": "string",
- "caption": "string"
}, - "document": {
- "link": "string",
- "id": "string",
- "caption": "string",
- "filename": "string"
}, - "audio": {
- "link": "string",
- "id": "string"
}, - "interactive": {
- "type": "button",
- "body": {
- "text": "string"
}, - "action": {
- "buttons": [
- {
- "type": "reply",
- "reply": {
- "id": "string",
- "title": "string"
}
}
]
}
}, - "location": {
- "longitude": "string",
- "latitude": "string",
- "name": "string",
- "address": "string"
}, - "template": {
- "name": "string",
- "language": {
- "code": "string"
}, - "components": [
- {
- "type": "header",
- "parameters": [
- {
- "type": "video",
- "text": "string",
- "video": {
- "link": "string",
- "id": "string"
}, - "image": {
- "link": "string",
- "id": "string"
}, - "document": {
- "link": "string",
- "id": "string"
}, - "location": {
- "longitude": "string",
- "latitude": "string",
- "name": "string",
- "address": "string"
}, - "date_time": {
- "timestamp": 0
}
}
]
}
]
}
}
}
Response samples
- 200
- 400
- 409
- 500
{- "success": true,
- "messaging_product": "whatsapp",
- "contacts": [
- {
- "input": "598xxxxxxxxxx",
- "wa_id": "598xxxxxxxxxx"
}
], - "messages": [
- {
- "id": "WHATSAPP_MESSAGE_ID"
}
]
}
Response samples
- 200
- 401
- 500
{- "success": true,
- "result": [
- {
- "_id": "67bca48d5fc32659c854f83c",
- "name": "Webhook Test",
- "topics": [
- "interactions.official_whatsapp"
], - "active": true,
}
], - "paging": {
- "totalCount": 1
}
}
Create webhook
Authorizations:
Request Body schema: application/jsonrequired
active required | boolean Indicates whether the configuration is active. |
name required | string [ 1 .. 64 ] characters Identifier name. Must be between 1 and 255 characters. |
callbackUrl required | string^https://.* Secure URL (HTTPS) where related events will be sent. |
topics | Array of strings Items Enum: "interactions.official_whatsapp" "interactions.official_whatsapp_statuses" List of subscribed topics. Only specific values are allowed. |
Responses
Request samples
- Payload
{- "active": true,
- "name": "string",
- "callbackUrl": "string",
- "topics": [
- "interactions.official_whatsapp"
]
}
Response samples
- 200
- 400
- 401
- 500
{- "success": true,
- "id": "67bca48d5fc32659c854f83c"
}
Update webhook by ID
Authorizations:
path Parameters
id required | string Unique identifier of the webhook. |
Request Body schema: application/jsonrequired
active | boolean |
name | string [ 1 .. 64 ] characters |
callbackUrl | string |
topics | Array of strings Items Enum: "interactions.official_whatsapp" "interactions.official_whatsapp_statuses" |
Responses
Request samples
- Payload
{- "active": true,
- "name": "string",
- "callbackUrl": "string",
- "topics": [
- "interactions.official_whatsapp"
]
}
Response samples
- 200
- 400
- 401
- 500
{- "success": true
}
Get webhook by ID
Authorizations:
path Parameters
id required | string Unique identifier of the webhook. |
Responses
Response samples
- 200
- 401
- 500
{- "success": true,
- "result": {
- "_id": "67bca48d5fc32659c854f83c",
- "name": "Webhook Test",
- "topics": [
- "interactions.official_whatsapp"
], - "active": true,
}
}