Download OpenAPI specification:Download
API used for managing instances owned by get.chat Partners.
For configuring an existing instance, please see WhatsApp Integration API docs.
For white-labeling a front-end (in an iframe, or after redirect), please see Query Parameters section of open-sourced front-end repository.
This endpoint is an alias to the same function as /
endpoint.
No authorization needed.
{- "status": "healthy"
}
Deploys a new instance.
This endpoint will create a new instance containing inbox and integration API. It will allocate new cloud resources and will expose a new API bound to this instance. Note that allocation usually takes about 2-5 minutes until the instance (and API) is ready to use.
You can create a new instance in various ways. Here are the top 3 recommended methods.
Example 2 is the most recommended, and is best suited for automations.
Example 1 is good for a quick start.
If you have no automation set up yet, you can use generate_activation
parameter.
When generate_activation
is set to true, the admin account activation URL will be pre-generated and returned
in the response to this request.
Pre-generated means the activation URL will be provided to you immediately after processing this request,
but the activation URL is not yet ready to use. You need to await the health_check
returned.
For example:
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer LRoWRCjm1bdwlqDjfdYw" \
-X POST \
https://api.inbox.platform.get.chat/v1/instances \
--data '{"subdomain": "mycompany-test", "channel_id": "ChAnElCH", "generate_activation": true}'
Above request will create a new instance for channel ChAnElCH
, on subdomain mycompany-test
, and
a will pre-generate a new activation URL.
The response should look similar to:
{
"id": "167c42d61ed64feb97d3a32508d811a8",
"base_domain": "mycompany-test.inbox.platform.get.chat",
"health_check": "https://mycompany-test.inbox.platform.get.chat/api/v1/status/health",
"channel_id": "sAnDbCH",
"partner_id": "sdBoXPA",
"activation_url": "https://mycompany-test.inbox.platform.get.chat/confirm_account?c=a0a08b0e-f79c-4ec7-bbd4-a1697502bff0"
}
When received, you should await the provided health_check
, to get to know when the instance is created,
and ready to use.
When the health check returns 200
status code, you can open the activation_url
in web browser, and:
Done! Your password is now ready to use on the inbox admin panel and web frontend!
Additional notes:
Configurator User is an Admin user that should be used for configuring your integration. It is a service account that has several differences with other Admin users:
Configurator user:
Configurator User allows you to create a new instance in a fully automated way.
To do that, provide configurator
parameter with all needed sub-params:
user_name
(required), webhook_url
(required), webhook_headers
(optional).
For example:
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer LRoWRCjm1bdwlqDjfdYw" \
-X POST \
https://api.inbox.platform.get.chat/v1/instances \
--data '{"subdomain": "mycompany-test", "channel_id": "ChAnElCH", "configurator": {"user_name": "service_account", "webhook_url": "https://example.com/webhook"}}'
Above request will create a new instance for channel ChAnElCH
, on subdomain mycompany-test
, and
a new Configurator User named service_account
.
When instance will be ready to use, a webhook will be sent to https://example.com/webhook
URL
with following data:
{"token": "YOUR_TOKEN"}
where YOUR_TOKEN
value contains a new Auth Token bound to your new Configurator User of
this specific instance. See
Integration API documentation
for more information about Auth Token.
After receiving the Auth Token, your automation can act as the Configurator User,
by interacting with API endpoints available under https://mycompany-test.inbox.platform.get.chat/api
.
For the most convenient approach, you can make use of admin_email
.
When provided, an e-mail will be sent to this address as soon as the instance is ready to use. E-mail message contains an activation link. You can activate your inbox admin user (instance admin user) by clicking on activation link.
For example:
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer LRoWRCjm1bdwlqDjfdYw" \
-X POST \
https://api.inbox.platform.get.chat/v1/instances \
--data '{"subdomain": "mycompany-test", "channel_id": "ChAnElCH", "admin_email": "example@example.com"}'
Above request will create a new instance for channel ChAnElCH
, on subdomain mycompany-test
, and
an admin account named "example@example.com"
.
When instance will be ready to use, an e-mail message will be sent to "example@example.com"
, with a title:
"WhatsApp Inbox Activation".
In the e-mail message, there will be a sentence with link:
- Click here to activate your inbox and set your password: Activate
Click on the "Activate" link in the e-mail message, and then:
Done! Your password is now ready to use on the inbox admin panel and web frontend!
Additional notes:
We presented a few ways of creating a new instance via Partner API.
Example 1 focuses on providing to you a quick start, but presented workflow is not recommended when managing large volumes of clients.
Example 2 is the most recommended approach, fully utilizing potential of webhooks and your automation.
Example 3 is another convenience feature, that can be potentially useful when creating a new instance on behalf of your client, and when secure isolation of access to messaging is important.
channel_id | string (Channel Id) <= 10 characters [a-zA-Z0-9]+ (This parameter is required if 360Dialog channel ID to connect. Our platform will collect a new 360Dialog API Key for this channel ID, and will connect a new instance to this channel ID. IMPORTANT: Previous 360Dialog API Key for this channel ID will stop working! |
d360_api_key | string (D360 Api Key) <= 50 characters [a-zA-Z0-9]+ (This parameter is required if Existing 360Dialog API Key that you want to use to deploy a new instance |
subdomain | string (Subdomain) <= 63 characters ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a... Optional sub-domain of a public base domain at which the instance will be available. Leave blank to use auto-generated instance ID. For example, Max length is 63, because of RFC 1035: each label in a domain has a limit of 63 characters. If subdomain is already in use, 422 status code is returned from API and following payload:
|
admin_email | string <email> (Admin Email) Optionally provide an e-mail address that will be used as admin user name. When provided, an e-mail will be sent to this address as soon as the instance is ready to use. E-mail message contains an activation link. You can activate your inbox user (instance user) by clicking on activation link, and setting your password. |
generate_activation | boolean (Generate Activation) Default: false When set to Pre-generated means the activation URL will be provided to you immediately after processing this request, but the activation URL is not yet ready to use. You need to await the When any of those two happens, it means the instance is ready to use, and activation URL can be opened (requested). Note that you don't need to pre-generate the activation URL in following cases:
|
object (ConfiguratorModel) Parameters of a new Configurator User that will be created when creating this new instance. Configurator User is an Admin user that should be used for configuring your integration. It is a service account that has several differences with other Admin users: Configurator user:
(Click "configurator" on the left, for details) | |
max_number_of_seats | integer (Max Number Of Seats) Default: 5 Configures a limit of maximum number of parallel agent seats on this instance. |
{- "channel_id": "sAnDbCH",
- "d360_api_key": "string",
- "subdomain": "sandbox",
- "admin_email": "user@example.com",
- "generate_activation": false,
- "configurator": {
- "user_name": "service_account",
- "webhook_headers": {
- "Authorization": "Webhook 1234567890",
- "Content-Type": "application/json"
}
}, - "max_number_of_seats": 5
}
{- "id": "167c42d61ed64feb97d3a32508d811a8",
- "base_domain": "sandbox.inbox.platform.get.chat",
- "channel_id": "sAnDbCH",
- "d360_api_key": "000111aaabbbcccddd222",
- "partner_id": "sdBoXPA",
}