Whatsapp

List WhatsApp services.

Retrieve a collection of WhatsApp services.

GEThttps://HOSTNAME:8887/api/whatsapp
Query parameters
Response

OK

Body
countinteger (int64)

Total number of resource.

Example: 100
itemsarray of object
Request
const response = await fetch('https://HOSTNAME:8887/api/whatsapp', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "count": 100,
  "items": [
    {
      "id": {},
      "name": "text",
      "enabled": true,
      "phone_number": "text",
      "phone_number_id": "text",
      "provider_id": {},
      "provider_name": "text",
      "provider_brand": "text",
      "provider_hostname": {},
      "webhook": "text"
    }
  ]
}

Create WhatsApp service

Create WhatsApp service.

POSThttps://HOSTNAME:8887/api/whatsapp
Body
name*string

The name of WhatsApp service.

enabledboolean

The flag for whether the WhatsApp service is enabled.

provider_id*all of

The unique ID of trunk.

phone_numberstring

The phone number of WhatsApp service.

phone_number_id*string

The phone number id of WhatsApp service.

token*string

The token of WhatsApp service.

Response

Created

Body
idall of

The unique ID of WhatsApp service.

Request
const response = await fetch('https://HOSTNAME:8887/api/whatsapp', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text",
      "provider_id": {},
      "phone_number_id": "text",
      "token": "text"
    }),
});
const data = await response.json();
Response
{
  "id": {}
}

Retrieve a WhatsApp service

Retrieve a WhatsApp service.

GEThttps://HOSTNAME:8887/api/whatsapp/{id}
Path parameters
id*all of

The unique ID of WhatsApp service.

Response

OK

Body
idall of

The unique ID of WhatsApp service.

namestring

The name of WhatsApp service.

enabledboolean

The flag for whether the WhatsApp service is enabled.

phone_numberstring

The phone number of WhatsApp service.

phone_number_idstring

The phone number id of WhatsApp service.

provider_idall of

The unique ID of trunk.

provider_namestring

The name of the trunk.

provider_brandstring

The brand of trunk.

provider_hostnameall of

The hostname of trunk.

webhookstring

The Universal Resource Locator of some resource.

Request
const response = await fetch('https://HOSTNAME:8887/api/whatsapp/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "id": {},
  "name": "text",
  "enabled": true,
  "phone_number": "text",
  "phone_number_id": "text",
  "provider_id": {},
  "provider_name": "text",
  "provider_brand": "text",
  "provider_hostname": {},
  "webhook": "text"
}

Update the WhatsApp service

Update the WhatsApp service.

POSThttps://HOSTNAME:8887/api/whatsapp/{id}
Path parameters
id*all of

The unique ID of WhatsApp service.

Body
namestring

The name of WhatsApp service.

enabledboolean

The flag for whether the WhatsApp service is enabled.

phone_numberstring

The phone number of WhatsApp service.

phone_number_idstring

The phone number id of WhatsApp service.

tokenstring

The token of WhatsApp service.

Response

OK

Request
const response = await fetch('https://HOSTNAME:8887/api/whatsapp/{id}', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();