API for 360 Partner Hub

Partners can now perform routine operations programmatically using the 360dialog Partner API.

post
Authorization

https://hub.360dialog.io/v1/token
This endpoint allows you retrieve an access token.
Request
Response
Request
Body Parameters
username
required
string
Your 360dialog hub email
password
required
string
Your 360dialog hub password
Response
200: OK
Access token successfully retrieved.
{
"access_token": "xxx",
"expires_in": 86400,
"refresh_token": "xx",
"token_type": "Bearer"
}

get
List All Partner Channels

https://hub.360dialog.io/v1/partners/{partner_id}/channels
Return a list of Clients.
Request
Response
Request
Path Parameters
partner_id
required
string
Response
200: OK
application/json
{
"count": 1,
"filters": {
"integration.parameters.organisation": "devtests"
},
"limit": 1000,
"offset": 0,
"sort": [
"id"
],
"total": 1,
"partner_channels": [
{
"id": "CH2",
"type": "whatsapp",
"partner_id": "P1",
"client_id": "C2",
"project_id": "PRO2",
"status": "created",
"integration_id": "I1",
"waba_account_id": "WA1",
"external_id": "E2",
"profile_info": {
"picture_url": "url",
"about_text": "about",
"business_vertical": "1000",
"timezone": "pl",
"business_description": "business desc",
"use_case_description": "use case desc"
},
"setup_info": {
"phone_number": "49200200200",
"verification_method": "voice",
"default_language": "de",
"was_in_use": false,
"ivr": true,
"certificate": "cert 002"
},
"modified_by": {
"user_id": "U100",
"user_name": "Test User"
},
"created_by": {
"user_id": "U100",
"user_name": "Test User"
},
"created_at": "$NOW()$",
"modified_at": "$NOW()$",
"client": {
"id": "C2",
"contact_info": null,
"contact_user": null,
"created_by": {},
"meta_info": {
"use_case": "api"
},
"modified_by": {},
"name": "Client B",
"organisation": "org_b",
"status": "active",
"created_at": "$NOW()$",
"modified_at": "$NOW()$"
},
"project": {
"id": "PRO2",
"app_id": "100",
"client_id": "C2",
"inbox": false,
"license_model": "cloud",
"name": "Project B",
"partner_id": "P1",
"status": "active",
"created_at": "$NOW()$",
"created_by": {},
"modified_at": "$NOW()$",
"modified_by": {}
},
"integration": {
"id": "I1",
"app_id": "100",
"parameters": {
"organisation": "devtests"
},
"stack_id": "0",
"state": "created",
"type": "0",
"created_at": "$NOW()$",
"created_by": {},
"modified_at": "$NOW()$",
"modified_by": {}
},
"waba_account": {
"id": "WA1",
"client_id": "P1",
"external_id": null,
"name": "0",
"partner_id": "P1",
"status": "created",
"created_at": "$NOW()$",
"created_by": {},
"modified_at": "$NOW()$",
"modified_by": {}
},
"payment_connection": {
"approved_at": null,
"channel_id": "0fEnQuCH",
"client_id": "DSMcGlMTCL",
"created_at": "2021-04-19T20:27:03Z",
"created_by": {
"user_id": "system",
"user_name": "system"
},
"discount": 0.0,
"finish_date": null,
"id": "payment_connection_id",
"modified_at": "2021-04-19T20:27:03Z",
"modified_by": {
"user_id": "system",
"user_name": "system"
},
"partner_id": "partner_id",
"products": {
"hosting": true
},
"start_date": "2021-04-19T22:26:00Z",
"type": "partner"
}
}
]
}

To use the following endpoints you will need your partner_id. This can be found in the Partner Hub URL when you log in.

Partner Template API

post
Create Template

https://hub.360dialog.io/v1/partners/{partner_id}/waba_accounts/{waba_id}/waba_templates
Create a WhatsApp Template using the API.
Request
Response
Request
Path Parameters
partner_id
required
string
waba_id
required
string
Response
200: OK
No response example.

Example Schema:

{
"name": "some_name",
"category": "some category",
"components": [
{
"type": "BODY",
"body": "Template message here."
},
{
"type": "HEADER",
"format": "TEXT",
"text": "your-header-text {{1}}",
"example": {
"header_text": [
"your-header-example"
]
}
},
{
"type": "FOOTER",
"text": "your-footer-text"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "PHONE_NUMBER",
"text": "your-phone-button-text",
"phone_number": "+1(650) 555-1111"
},
{
"type": "URL",
"text": "your-url-button-text",
"url": "https://www.website.com/{{1}}",
"example": [
"https://www.website.com/dynamic-url-example"
]
}
]
}
],
"language": "en_US"
}

post
Submit WABA Template

https://hub.360dialog.io/v1/partners/{partner_id}/waba_accounts/{waba_id}/waba_templates/{id}/control/submit
When you create a Template you must then submit it to Facebook for review.
Request
Response
Request
Path Parameters
partner_id
required
string
waba_id
required
string
id
required
string
Template id
Response
200: OK