Create a new WhatsApp Inbox


Create a new WhatsApp Inbox inside an account.

  • This endpoint allows you to add a WhatsApp Inbox to your online account.

  • This endpoint does not create new WhatsApp number, this only assign your existing WhatsApp Number to a new Inbox in your account.

  • You can only use WhatsApp number ('whatsapp_number' parameter) for numbers that are available to use as inbox (meaning, there are no other inboxes created for this WhatsApp number). To see the available list you can go to the Partners API endpoint - WhatsApp -> Get WhatsApp Numbers and look for the value of 'isOnline'.


Settings:

URL

https://partners.99digital.co.il/api/online/createInbox

Method

JSON via POST

Header

Authorization: Bearer {{access_token}}

*The access_token can be received from settings->get access token API.


Body:

Parameter

Description / Example

Maximum length

Mandatory

Example

inbox_type

whatsapp

8

Yes

'whatsapp'

fixed value

inbox_name

The name of the WhatsApp Inbox

50

Yes

"My WhatsApp Inbox"

whatsapp_number

The WhatsApp Number that you wish to connect to an inbox

- This number must not be part of an inbox already.

- This number must be a working WhatsApp V2 API number.

- This number must be international format without '+'.

- This number must be a number under your partner account (look for Partners API->WhatsApp->get WhatsApp Numbers)

20

Yes

972501234567

account_id

The account ID you wish to add the new WhatsApp Inbox to

7

Yes

8

server

The server subdomain of the account id

50

yes

online

reference

Any reference value (text/numbers only) you wish to receive back on the webhook. this is for your use only so you can recognize your inbox

50

no


import_history

If the whatsapp_number you want to create inbox is coexistence account, you can ask the system to import all history (if available) to the newly created inbox.

1 - to move history

0 - not to move history

** history will only move to the inbox if this is coexistence onboarding and the end user allowed history to be shared.

default is 0

1

no

1


Important notice - one WhatsApp number per inbox:

After you create a new inbox with this WhatsApp number, the inbox will be created inside the relevant online account and will be ready to use. you will not be able to create a new inbox with the same WhatsApp number unless you delete the inbox from the Delete WhatsApp Inbox endpoint first. 


Response:


{
"status": "OK",
"reason": 1
"account_id": 8,
"inbox_id": 100,
"server": "online,
"whatsapp": "972501234567"
}


Response-Explain:

Parameter

Description

status

OK or FAIL

"OK" means the request was successful.

"Fail" means error.

account_id

The account ID you used

inbox_id

The newly created inbox ID, the WhatsApp is now connected to this inbox

server

The server subdomain that this inbox created on https://{{server}}.99digital.co.il

whatsapp

The WhatsApp number belongs to that new inbox

reason

'reason' is the status explanation in case of FAIL

1

not FAIL. the status is OK

2

Wrong credentials

3

Access token does not exist or expired, please generate another one from Settings - Get access token API

13

you need to use POST method.

20

reference is invalid

31

Error on creating an inbox, please try again or contact support

33

account_id is invalid or wrong

34

server is invalid or wrong

43

inbox_type is invalid or wrong

44

inbox_name is invalid or wrong

45

whatsapp_number is invalid or do not exist under your account