Public API for WhatsApp Cloud Integration
Introduction
The Public Integration API enables you to query certain info from your WhatsApp Cloud Integration, or perform certain actions without the need to operate in the platform UI.
API Endpoint
Please use the following Endpoint URL for the Public API:
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/
NOTE
For example, the endpoint for PUT /whatsapp-message-template:
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/whatsapp-message-template
Authentication
WhatsApp Cloud Access Token
NOTE
The access token from the WhatsApp Cloud channel can be applied to the public APIs except the GET /conversation-analytics, Business Encryption APIs and Flow APIs.
- In "Settings" -> "Channels", click "Edit" to enter the corresponding WhatsApp Cloud channel.
- In "Platform", head to the "Advanced Access".
- Click "Generate" to generate the access token.
- The access token has been generated. The existing access tokens can be managed in the below section.
- The access token should be passed as query parameter accessToken, for example:
curl --location --request GET 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/api/whatsapp-message-templates?accessToken=${ACCESS_TOKEN}&wabaId=${WABA_ID}&first=10'
Payload & Signed Context
NOTE
This authentication method can only be applied to GET /conversation-analytics, GET /whatsapp-displayname-status, Business Encryption APIs and Flow APIs.
To perform authentication for the Public Integration API, it is needed to utilize the corresponding Payload and SignedContext which is required by the integration.
- Payload:
{"app":"appId","appIntegration":"appIntegrationId","channel":"channelId"} - SignedContext:
(signature).{{base64(JSON.stringify(payload))}}
- Obtain the information related to the corresponding WhatsApp Cloud channel by querying the
channelwith Open API.
Request:
query {
apiViewer{
channel(channelId:"696327315430a1f98231dfde"){
appId
environment(envId:"7lQNjrXbDO"){
info
integration{
integrationId
}
appIntegrationSignature
}
}
}
}
Response:
{
"data": {
"apiViewer": {
"channel": {
"appId": "699802d69a73fc555f1c6bc4",
"environment": {
"info": {
"integrationId": "whatsapp-cloud",
"build": 3,
"alias": "dev-whats-app-cloud",
"appIntegrationId": "696327325430a1cbd131dfdf",
"subscribed": true
},
"integration": {
"integrationId": "whatsapp-cloud"
},
"appIntegrationSignature": "1RJ7rKRTHbOBoY95AgtXF5WT2578gy9+b4ekBp727cQ="
}
}
}
}
}
Create Payload with in the following format:
{"app":"appId","appIntegration":"appIntegrationId","channel":"channelId"}
Example Payload:
{"app":"699802d69a73fc555f1c6bc4","appIntegration":"696327325430a1cbd131dfdf","channel":"696327315430a1f98231dfde"}
Encode the Payload
Base64formatCombine the encoded Payload and Signature in order to create the SignedContext in the following format:
(signature).{{base64(JSON.stringify(payload))}}
Example SignedContext
WAIBCzM6tnzboIwkEPAVVyaVq7VGaIKBaQ/Q+gP6qdA=.eyJhcHAiOiI2MjA2MmMwYjcxNzE5NTMyMDE5MmIxOGY3IiwiYXBwSW50ZWdyYXRpb24iOiI2NDIwZmlnMjhlNjViNDY2ZDQ2MDdlYTIiLCJjaGFubmVsIjoiNzIxZjMyYWM0ZTEyMzYzZGUxMjBkMjlkIg==
- Add them to the header as the
X-Woztell-PayloadandX-Woztell-SignedContext.
General APIs
GET /waba-info
This API call could get the WABA-related info including WABA name, Phone Number, WABA Namespace, WABA ID of a channel.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| accessToken | string | Access token generated from the WhatsApp Cloud channel | true |
| channelId | string | Channel ID | either this or wabaID |
| wabaId | string | WABA ID | either this or channelId |
Request
curl --location --request GET '/waba-info?accessToken=${ACCESS_TOKEN}&channelId=${CHANNEL_ID}'
or
curl --location --request GET '/waba-info?accessToken=${ACCESS_TOKEN}&wabaId=${WABA_ID}'
Response
{
"ok": 1,
"result": {
"waId" : "11111111111",
"phoneNumberId" : "123124123232",
"wabaId" : "422126422872292",
"name" : "My Business",
"phoneNumber" : "85212345678",
"phoneNumberCC" : "1",
"formattedPhoneNumber" : "+1 111-111-1111",
"namespace" : "2dwsa4_e24e_42f8_6b5a_110232ae4d5",
"embeddedSignup" : true
}
}
GET /whatsapp-business-profile
This API call could get the business profile of a WhatsApp number.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| accessToken | string | Access token generated from the WhatsApp Cloud channel | true |
| phoneNumberId | string | Phone number ID | true |
Request
curl --location --request GET '/whatsapp-business-profile?accessToken=${ACCESS_TOKEN}&phoneNumberId=${PHONE_NUMBER_ID}'
Response
{
"ok": 1,
"data": {
"about": "Hello this is John!",
"address": "ABC Building",
"description": "Testing 123",
"email": "testemail@woztell.com",
"profile_picture_url": "IMAGE_URL",
"websites": [
"https://woztell.com/"
],
"vertical": "PROF_SERVICES",
"messaging_product": "whatsapp"
}
}
GET /whatsapp-displayname-status
This API call is for retrieving the details related to the WhatsApp number
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| accessToken | string | Access token generated from the WhatsApp Cloud channel | true |
| phoneNumberId | string | Phone number ID | true |
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/whatsapp-displayname-status?phoneNumberId=110765061846704&accessToken=eyAbcGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJBUEkiLCJhcHAiOiI2MzE4MDJkNjlhNzNmYzU1NWYxYzZiYzQiLCJqdGkiOiI3M2VhN2UwOC00N2Q3LTU1MGYtOGQ1Yi1jNmVkYTIwZGU3YjIiLCJpc3MiOiJpbnRlcm5hbCIsImlhdCI6MTcwNzk5MTEwMjgwNX0.vzhViZuPVDafMfD6NpPSvy6ab5Rs-lV63bCLeE9gu5M'
Response
{
"ok": 1,
"data": {
"account_mode": "LIVE",
"verified_name": "WozTell Test",
"code_verification_status": "EXPIRED",
"display_phone_number": "+1 123-321-2652",
"quality_rating": "GREEN",
"is_official_business_account": false,
"messaging_limit_tier": "TIER_1K",
"id": "123465061846704"
}
}
PATCH /whatsapp-business-profile
This API call could update the business profile of a WhatsApp number.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| accessToken | string | Access token generated from the WhatsApp Cloud channel | true |
| phoneNumberId | string | Phone number ID | true |
| profile | object | Content to be updated in the business profile | true |
Profile Object
| Name | Type | Description | Required |
|---|---|---|---|
| messaging_product | string | Only accept whatsapp | true |
| about | string | The "About" text | false |
| address | string | The address of your business | false |
| description | string | The "Description" text | false |
| string | Email address of the your business | false | |
| vertical | string | Industry of the business, please refer to here for the accepted values | false |
| website | array | URL(s) to the website(s) of your business including http:// or https://; 2 websites max. | false |
| profile_picture_url | string | URL to the profile picture | false |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/whatsapp-business-profile
Request Body
{
"accessToken": "ACCESS_TOKEN",
"phoneNumberId": "123456890999",
"profile": {
"about": "This is the about text.",
"address": "Office",
"description": "Testing Text",
"email": "test999@woztell.com",
"profile_picture_url": "IMAGE_URL",
"websites": [
"https://woztell.com/blog/", "https://woztell.com/pricing/"
],
"vertical": "PROF_SERVICES",
"messaging_product": "whatsapp"
}
}
Response
{
"ok": 1
}
PUT /media-id
This API call could upload a media file to WhatsApp server, in order to obtain a media ID.
NOTE
The uploaded media file will be kept in WhatsApp Cloud server for 30 days. After the expiration, users need to upload again to obtain another media ID.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| phoneNumberId | string | Phone number ID | true |
| accessToken | string | Access token generated from the WhatsAp | true |
| type | string | image, audio, video, file | true |
| url | string | Link to the media file | true |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/media-id
Request Body
{
"phoneNumberId": "123164329653069",
"accessToken": "ACCESS_TOKEN",
"type": "image",
"url": "MEDIA_URL",
}
Response
{
"ok": 1,
"mediaId": "5770270532993662",
"fileType": "image"
}
GET /conversation-analytics
This API is for retrieving the conversation analytics within the selected date range.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| from | UNIX Timestamp | The start date for the target date range | Yes |
| to | UNIX Timestamp | The end date for the target ate range | Yes |
| granularity | string | The granularity by which you would like to retrieve the analytics; HALF_HOUR, DAILY or MONTHLY | Yes |
| numbers | array | The list of phone number(s) to get the analytics from | No |
| metric_types | string | List of metrics to retrieve; COST and CONVERSATION | No |
| conversation_types | string | List of conversation; FREE_ENTRY_POINT, FREE_TIER, REGULAR and UNKNOWN | No |
| conversation_directions | string | List of direction of initiating the conversation; business_initiated and uesr_initiated | No |
| dimensions | string | List of breakdown to apply to the analytics; phone, country, conversation_type and conversation_reaction | No |
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/conversation-analytics?from=1651200978632&to=1851220649059&granularity=MONTHLY&numbers=14132521446&metric_types=COST%2CCONVERSATION&conversation_directions=business_initiated%2Cuser_initiated&dimensions=phone%2Ccountry%2Cconversation_type%2Cconversation_direction'
Response
{
"ok": 1,
"conversationAnalytics": {
"data_points": [
{
"start": 1672675200,
"end": 1672761600,
"conversation": 1,
"phone_number": "14132521446",
"country": "HK",
"conversation_type": "FREE_TIER",
"conversation_direction": "USER_INITIATED",
"cost": 0
},
{
"start": 1664899200,
"end": 1664985600,
"conversation": 1,
"phone_number": "14132521446",
"country": "HK",
"conversation_type": "FREE_TIER",
"conversation_direction": "BUSINESS_INITIATED",
"cost": 0
},
{
"start": 1676476800,
"end": 1676563200,
"conversation": 1,
"phone_number": "14132521446",
"country": "HK",
"conversation_type": "FREE_TIER",
"conversation_direction": "USER_INITIATED",
"cost": 0
}
]
}
}
GET /catalogs
This API call could list out the catalogs associated to a specific WABA.
Authentication
The Payload & Signed context are required in the header.
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/catalogs'
Response
{
"ok": 1,
"data": [
{
"id": "1234577510532066",
"name": "test_products"
}
],
"paging": {
"hasPrevious": false,
"hasNext": false
}
}
GET /products
This API call could list out the products under a catalog associated to a specific WABA.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| catalogId | string | ID of the catalog | true |
| fields | string | comma-separated fields of the product to fetch. Please see the availble fields here: https://developers.facebook.com/docs/marketing-api/reference/product-item/#fields . Defaults to name,price,image_url,retailer_id | false |
| limit | integer | number of results to fetch for pagination. Maximum 100. | false |
| after | string | after cursor for pagination | false |
| before | string | before cursor for pagination | false |
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/products?catalogId=1234567510532066'
Response
{
"ok": 1,
"data": [
{
"name": "Test Product 1",
"price": "HK$900.00",
"image_url": "IMAGE_URL_1",
"retailer_id": "a6y7a9y6f0",
"id": "25233996219581593"
},
{
"name": "Test Product 2",
"price": "HK$2,000.00",
"image_url": "IMAGE_URL_2",
"retailer_id": "yu7q27pbg1",
"id": "7887884911230830"
}
],
"paging": {
"cursors": {
"before": "QVFIUjNtVGtsNzNVRF9sTlhla2JOLVhzUGtlbGdSUURvRDFzelB2MVQwZAHpCb3NieHZAvbXhwZADVud09hZA1pwQVhNMHk4NkNwOEw2ZAEt4MFNpZAk4tR05YVTZAB",
"after": "QVFIUmRwOElZAeHVsWHhiUmk2WlJWcTdnY181UTUzUmx0NEpiSDAzSGdJcHFZALURQSXdmSFZALWHI0ekwyMkx1dU4tXzZAXQnppWjc5MTVWZAmNtb0oyOU9KcEhB"
},
"hasPrevious": false,
"hasNext": false
}
}
Message Template APIs
GET /whatsapp-message-templates
This API call could list out the WhatsApp message templates of a specific WABA with pagination and optional filters.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| wabaId | string | Target WABA ID | true |
| first | integer | Number of messages templates; maximum 100 | true |
| after | string | Cursor for getting pagination result of the next page; either "after" or "before" should be specified | false |
| before | string | Cursor for getting pagination result of the previous page. Either "after" or "before" should be specified | false |
| status | string | Array of status to filter out; defaults to: ["APPROVED"], ["PENDING"], ["REJECTED"], ["PENDING_DELETION"], ["DELETED"] if not specified | false |
| category | string | Category of the message template: ["TRANSACTIONAL"], ["MARKETING"] or ["OTP"] | false |
| quality_score | String | Quality rating of the template: GREEN, YELLOW or RED | false |
| language | array | Language of message template; must be in array and in the supported language code such as en_US, es. | false |
| name | string | Name search of the message template | false |
| content | Content | Content search of the message template | false |
| name or content | string | Name or content search of the message templates | false |
Request
curl --location --request GET '/whatsapp-message-templates?accessToken=${ACCESS_TOKEN}&wabaId=${WABA_ID}&first=10&after=MAZDZD&status=["APPROVED"]'
Response
"ok": 1,
"data": [
{
"id": "363730401994967",
"name": "sample_flight_confirmation",
"category": "TICKET_UPDATE",
"languages": [
"pt_BR",
"es",
"id",
"en_US"
],
"statuses": [
{
"language": "pt_BR",
"status": "APPROVED"
},
{
"language": "es",
"status": "APPROVED"
},
{
"language": "id",
"status": "APPROVED"
},
{
"language": "en_US",
"status": "APPROVED"
}
],
"templates": [
{
"language": "pt_BR",
"status": "APPROVED",
"rejected_reason": "NONE",
"components": [
{
"type": "HEADER",
"format": "DOCUMENT"
},
{
"type": "BODY",
"text": "Esta รฉ a sua confirmaรงรฃo de voo para {{1}}-{{2}} em {{3}}."
},
{
"type": "FOOTER",
"text": "Esta mensagem รฉ de uma empresa nรฃo verificada."
}
],
"quality_score": {
"score": "UNKNOWN"
}
},
{
"language": "es",
"status": "APPROVED",
"rejected_reason": "NONE",
"components": [
{
"type": "HEADER",
"format": "DOCUMENT"
},
{
"type": "BODY",
"text": "Confirmamos tu vuelo a {{1}}-{{2}} para el {{3}}."
},
{
"type": "FOOTER",
"text": "Este mensaje proviene de un negocio no verificado."
}
],
"quality_score": {
"score": "UNKNOWN"
}
},
{
"language": "id",
"status": "APPROVED",
"rejected_reason": "NONE",
"components": [
{
"type": "HEADER",
"format": "DOCUMENT"
},
{
"type": "BODY",
"text": "Ini merupakan konfirmasi penerbangan Anda untuk {{1}}-{{2}} di {{3}}."
},
{
"type": "FOOTER",
"text": "Pesan ini berasal dari bisnis yang tidak terverifikasi."
}
],
"quality_score": {
"score": "UNKNOWN"
}
},
{
"language": "en_US",
"status": "APPROVED",
"rejected_reason": "NONE",
"components": [
{
"type": "HEADER",
"format": "DOCUMENT"
},
{
"type": "BODY",
"text": "This is your flight confirmation for {{1}}-{{2}} on {{3}}."
},
{
"type": "FOOTER",
"text": "This message is from an unverified business."
}
],
"quality_score": {
"score": "UNKNOWN"
}
}
]
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MAZDZD"
},
"hasNext": true,
"hasPrevious": false
}
}
PUT /whatsapp-message-template
This API call could create a brand new WhatsApp message template.
NOTE
Each WhatsApp Business account is allowed to create 100 message templates per hour.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| wabaId | string | WABA ID | true |
| accessToken | string | Access token generated from the WhatsApp Cloud channel | true |
| name | string | Name of the message template | true |
| language | string | Language of the message template | true |
| category | string | Category of the message template: TRANSACTIONAL, MARKETING or OTP | true |
| components | array | Content of the message template. Please refer to here for the structure of the component. | true |
NOTES
By inserting the image URL into "example":{"header_handle":["IMAGE_URL"]}, this API will automatically upload the example while creating the message template for you.
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/whatsapp-message-template
Request Body
Sample Request (Image Header)
{
"wabaId": "190787529545503",
"accessToken": "ACCESS_TOKEN",
"name": "test_template",
"language": "en_US",
"category": "MARKETING"
"components": [
{
"type": "BODY",
"text": "Hi there! Are you interested in our latest promotional sale?"
},
{
"type": "HEADER",
"format": "IMAGE",
"example":{"header_handle":["IMAGE_URL"]}
}
]
}
Sample Request (Parameters, Footer and Call to Actions Buttons)
{
"wabaId": "190787529545503",
"accessToken": "ACCESS_TOKEN",
"name": "test_template",
"language": "en_US",
"category": "MARKETING"
"components": [
{
"type": "BODY",
"text": "hello {{1}} this is body template",
"example":{"body_text":[["Test"]]}
},
{
"type": "FOOTER",
"text": "this is footer template"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "PHONE_NUMBER",
"text": "Call",
"phone_number":"+85212769072"
},
{
"type": "URL",
"text": "URL",
"url":"https://www.woztell.com/"
}
]
}
]
}
Sample Request (Parameters and Quick Reply Buttons)
{
"wabaId": "190787529545503",
"accessToken": "ACCESS_TOKEN",
"name": "test_template",
"language": "en_US",
"category": "MARKETING"
"components": [
{
"type": "BODY",
"text": "hello {{1}} this is body template",
"example":{
"body_text":[["Test"]]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "yes"
},
{
"type": "QUICK_REPLY",
"text": "no"
}
]
}
]
}
Response
{
"ok": 1,
"id": "516723536625510",
"language": "en_US"
}
PATCH /whatsapp-message-template
This API call could edit an existing message template.
NOTE
A message template can only be edited once in a 24 hour window, and up to 10 times in a 30 day window.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| wabaId | string | WABA ID | true |
| accessToken | string | Access token generated from the WhatsApp Cloud channel | true |
| messageTemplateName | string | Name of the message template | true |
| messageTemplateLanguage | string | Language of the message template | true |
| messageTemplateId | string | Unique ID of the message template | true |
| components | array | Content to be updated to the message template | true |
NOTES
Each language version of a message template has its own ID. In order edit a message template with PATCH /whatsapp-message-templates, you will need to specify the language version of the template.
Normally, GET /whatsapp-message-templates will only return the ID of the most recent language. Therefore, you should first obtain the ID of a particular language by applying the language filter in GET /whatsapp-message-templates.
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/whatsapp-message-template
Request Body
{
"wabaId": "12986521265530",
"accessToken": "ACCESS_TOKEN",
"messageTemplateLanguage": "en_US",
"messageTemplateName": "test_template",
"messageTemplateId": "1748340935544945",
"components": [
{
"type": "BODY",
"text": "Winter's coming, it's time to check out our latest winter collection!"
}
]
}
Response
{
"ok": 1,
"success": true
}
DEL /whatsapp-message-template
This API call could delete an existing message template.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| wabaId | string | WABA ID | true |
| accessToken | string | Access token generated from the WhatsApp Cloud channel | true |
| name | string | Name of the message template | true |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/whatsapp-message-template
Request Body
{
"wabaId": "12986521265530",
"accessToken": "ACCESS_TOKEN",
"name": "test_template"
}
Response
{
"ok": 1,
"success": true
}
Flow APIs
GET /flow
This API is for retrieving the list of flows.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| limit | integer | Number of flows to get | true |
| after | string | For getting next batch of threads, can be obtained from paging.cursors in the response | No |
| before | string | For getting next batch of threads, can be obtained from paging.cursors in the response | No |
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/flows?limit=10'
Response
{
"ok": 1,
"data": [
{
"label": "TEST FLOW (DRAFT)",
"value": "885692686603466",
"status": "draft",
"assets": [
{
"id": "SIGN_UP",
"label": "Customer Success (SIGN_UP)",
"data": "{}",
"preview": {
"preview_url": "https://business.facebook.com/wa/manage/flows/885692686603466/preview/?token=abdfac6c-1319-4a01-a896-d26482f44659",
"expires_at": "2024-03-08T04:52:37+0000"
}
}
],
"triggerMatchingObject": null
}
],
"paging": {
"cursors": {
"before": "QVFIUnJEbERTSFN1TEM5THFDdkJYNjExaF9xSUxjNjVGazJUWHBWTWV3Ukx0V2JQSFlMYmRzT0RXanpMeUVnd1VnSUlnQVBkamVyNkQ5dW9Ocm5YNVpoY2VR",
"after": "QVFIUnJEbERTSFN1TEM5THFDdkJYNjExaF9xSUxjNjVGazJUWHBWTWV3Ukx0V2JQSFlMYmRzT0RXanpMeUVnd1VnSUlnQVBkamVyNkQ5dW9Ocm5YNVpoY2VR"
},
"hasNext": false,
"hasPrevious": false
}
}
GET /flow-screen-payload
This API is for retrieving the flow screen payload of a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| flowId | string | The unique ID of a flow. | true |
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/flow?flowId=1332875717353551'
Response
{
"ok": 1,
"payload": {
"id": "screen_with_data",
"label": "Feedback With Data (screen_with_data)",
"data": "{\n \"would_recommend\": \"\",\n \"how_to_do_better\": \"\"\n}",
"screens": [
{
"id": "screen_with_data",
"label": "Feedback With Data (screen_with_data)",
"data": "{\n \"would_recommend\": \"\",\n \"how_to_do_better\": \"\"\n}",
"preview": {
"preview_url": "https://business.facebook.com/wa/manage/flows/1332875717353551/preview/?token=ed47bb0a-f749-4a0f-87f3-889f003b53ed",
"expires_at": "2024-03-06T03:56:10+0000"
}
}
]
}
}
GET /flow-preview
This API is for retrieving teh URL to the preview of a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| flowId | string | The unique ID of a flow. | true |
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/flow-preview?flowId=994520121646941'
Response
{
"ok": 1,
"data": {
"preview_url": "https://business.facebook.com/wa/manage/flows/994520121646941/preview/?token=5615e315-899c-4787-b211-a512c35f83aa",
"expires_at": "2024-03-06T03:46:30+0000"
}
}
GET /flow-detail
This API is for retrieving the details of a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| flowId | string | The unique ID of a flow. | true |
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/flow-detail?fields=id%2Cname%2Ccategories%2Cpreview%2Cstatus%2Cvalidation_errors%2Cjson_version%2Cdata_api_version%2Cendpoint_uri%2Cwhatsapp_business_account%2Capplication&flowId=678952344393952'
Response
{
"ok": 1,
"id": "678952344393952",
"name": "Test Flow 2",
"categories": [
"OTHER"
],
"preview": {
"preview_url": "https://business.facebook.com/wa/manage/flows/678952344393952/preview/?token=90fd19f9-edf7-4a6a-8fea-8da4cbb687f7",
"expires_at": "2024-03-06T07:39:50+0000"
},
"status": "DRAFT",
"validation_errors": [],
"json_version": "3.1",
"whatsapp_business_account": {
"id": "619018099309339",
"name": "Test Group Limited (UAT)",
"currency": "USD",
"timezone_id": "42",
"message_template_namespace": "a02e2441_69dd_4ea2_a90b_4aca392f0afa"
},
"application": {
"link": "https://platform.woztell.com/",
"name": "Woztell",
"id": "689996742158814"
}
}
PUT /create-flow
This API is for creating a new flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the new flow. | true |
| categories | array | A list of Flow categories. Multiple values are possible, but at least one is required: SIGN_UP, SIGN_IN, APPOINTMENT_BOOKING, LEAD_GENERATION, CONTACT_US, CUSTOMER_SUPPORT, SURVEY, OTHER | true |
| clone_flow_id | string | ID of the flow to be cloned from | false |
| endpoint_url | string | The URL of the flow endpoint. Do not provide this field if you are cloning a Flow with Flow JSON version below 3.0. | false |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/flow
Request Body
{
"data": {
"name": "Test Flow 2",
"categories": [ "SURVEY" ],
"clone_flow_id": "368669698913502",
"endpoint_url": "https://webhook.site/ff434d70-465c-4c79-90cc-333adfa858b5"
}
}
Response
{
"ok": 1,
"id": "1557286081777970"
}
PATCH /flow-metadata
This API is for updating the metadata of a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| flowId | string | ID of the flow that is being updated | true |
| name | string | New name of the flow | false |
| categories | array | New categories of the flow | false |
| endpoint_url | string | The URL of the WA Flow Endpoint. Do not provide this field if you are updating a Flow with Flow JSON version below 3.0 | false |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/flow-metadata
Request Body
{
"flowId": "1005133727262236",
"data": {
"name": "Test Flow ABC"
},
"endpoint_url": "https://webhook.site/ff434d70-465c-4c79-90cc-333adfa858b5"
}
Response
{
"ok": 1,
"success": true
}
PATCH /flow-json
This API is for updating the JSON of a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the flow | true |
| version | string | Flow JSON version | true |
| screens | JSON | The screens of the flow that can be input in the flow builder in WhatsApp Manager | true |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2-dev/api/flow-json
Request Body
{
"flowId": "910367050421850",
"data": {
"version": "3.1",
"screens": [
{
"id": "PREFERENCES",
"title": "Update Preferences",
"data": {},
"terminal": true,
"layout": {
"type": "SingleColumnLayout",
"children": [
{
"type": "Form",
"name": "form",
"children": [
{
"type": "CheckboxGroup",
"label": "Communication types",
"required": true,
"name": "communicationTypes",
"data-source": [
{
"id": "0",
"title": "Special offers and promotions"
},
{
"id": "1",
"title": "Changes to my subscription"
},
{
"id": "2",
"title": "News and events"
},
{
"id": "3",
"title": "New products"
}
]
},
{
"type": "CheckboxGroup",
"label": "Contact Preferences",
"required": false,
"name": "contactPrefs",
"data-source": [
{
"id": "0",
"title": "Whatsapp"
},
{
"id": "1",
"title": "Email"
},
{
"id": "2",
"title": "SMS"
}
]
},
{
"type": "Footer",
"label": "Done",
"on-click-action": {
"name": "complete",
"payload": {
"communicationTypes": "${form.communicationTypes}",
"contactPrefs": "${form.contactPrefs}"
}
}
}
]
}
]
}
}
]
}
}
Response
{
"ok": 1,
"success": true,
"validation_errors": []
}
DEL /flow
This API is for deleting a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| flowId | string | ID of the flow to be deleted | true |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/flow
Request Body
{
"flowId": "913687770028833"
}
Response
{
"ok": 1,
"success": true
}
POST /publish-flow
This API is for publishing a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| flowId | string | ID of the flow to be published | true |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/publish-flow
Request Body
{
"flowId": "913687770028833"
}
Response
{
"ok": 1,
"success": true
}
POST /deprecate-flow
This API is for deprecating a flow.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| flowId | string | ID of the flow to be deprecated | true |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/api/deprecate-flow
Request Body
{
"flowId": "913687770028833"
}
Response
{
"ok": 1,
"success": true
}
Business Encryption APIs
POST /whatsapp-business-encryption
This API is for setting the business public key.
Authentication
The Payload & Signed context are required in the header.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| publicKey | string | 2048-bit RSA business public key generated. Please refer to here for how to generate the public key | true |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.2/whatsapp-business-encryption
Request Body
{
"publicKey": "-----BEGIN PUBLIC KEY-----\nABCDIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAls1409DedWXmHnt0Pb6s\nIdGkL6pFXxd5vPxrk/CChQssCGLK7jEPQwzhAZ/La7Cg/IvxjxvgC8DD3v8ZniU7\nHu5xPftKm3rEvNRwstRHaoPF+CNxHzHMy2DkgdVxvnBI6qtEjn+yZXdEOHhGHejH\nEf0EfFSMoyCaXea4E3LqvOE8iJ42uNtC7D4TmyeE+dTKudclswNA3QDA0zLH1M+Y\n9Oxv06FgD9S8gmvSwJgn3hfwLc/j5Dj5Qr6NAd9dRMQGLGeFEbg/JJXAVaAAxFlb\nvITHRG1ynRZDcrAri377Z+HS8G43o3TmrPyD0zRXQFbHCu+kOH5DBs3yFRcFjA7L\nwQIDAQAB\n-----END PUBLIC KEY-----"
}
Response
{
"ok": 1
}
GET /whatsapp-business-encryption
This API is for retrieving the business public key.
Authentication
The Payload & Signed context are required in the header.
Request
curl --location 'https://api.whatsapp-cloud.woztell.sanuker.com/v1.2-dev/whatsapp-business-encryption'
Response
{
"ok": 1,
"data": [
{
"business_public_key": "-----BEGIN PUBLIC KEY-----\nABCDIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAls1409DedWXmHnt0Pb6s\nIdGkL6pFXxd5vPxrk/CChQssCGLK7jEPQwzhAZ/La7Cg/IvxjxvgC8DD3v8ZniU7\nHu5xPftKm3rEvNRwstRHaoPF+CNxHzHMy2DkgdVxvnBI6qtEjn+yZXdEOHhGHejH\nEf0EfFSMoyCaXea4E3LqvOE8iJ42uNtC7D4TmyeE+dTKudclswNA3QDA0zLH1M+Y\n9Oxv06FgD9S8gmvSwJgn3hfwLc/j5Dj5Qr6NAd9dRMQGLGeFEbg/JJXAVaAAxFlb\nvITHRG1ynRZDcrAri377Z+HS8G43o3TmrPyD0zRXQFbHCu+kOH5DBs3yFRcFjA7L\nwQIDAQAB\n-----END PUBLIC KEY-----",
"business_public_key_signature_status": "VALID"
}
]
}
Group API
Introduction
The WhatsApp Group API enables you to create and manage WhatsApp groups. This API allows you to create groups, configure settings, and control member participation through your business integration.
Eligibility for Groups API
To qualify for groups features, your business must meet the following requirements:
- Have a messaging limit of at least 100,000 business-initiated conversations in a rolling 24-hour period
- Be an Official Business Account (OBA)
Learn more about Quality Ratings and Messaging Limits
Adding Members to Group
To add members to a WhatsApp group, you need to share the invite link with users. The invite link can be obtained from the GET /group/info endpoint response. Users can then use this link to join the group directly.
Authentication
Context Token
NOTE
Context Token authentication (JWT) is required for all Group API endpoints. The token must be included in the X-Woztell-Context header.
The Group API uses JWT (JSON Web Token) for authentication. You'll need to generate a signed JWT token containing your app and channel context.
Prerequisites
Before generating a context token, you need:
- App ID - Your application identifier
- App Integration ID - Your integration identifier
- App Integration Secret - Secret key for signing the JWT (keep this secure)
- Channel ID - The WhatsApp channel identifier (optional for some endpoints)
- User ID - Your user identifier
To perform authentication for the Group API, you need to generate a JWT (JSON Web Token) and include it in the X-Woztell-Context header.
- Obtain the information related to the corresponding WhatsApp Cloud channel by querying the
channelwith Open API.
Request:
query {
apiViewer {
channel(channelId: "696327315430a1f98231dfde") {
appId
_id
environment(envId: "7lQNjrXbDO") {
id
name
waba
appIntegrations {
edges {
node {
_id
secret
}
}
}
}
}
}
}
Response:
{
"data": {
"apiViewer": {
"channel": {
"appId": "699802d69a73fc555f1c6bc4",
"_id": "696327315430a1f98231dfde",
"environment": {
"id": "7lQNjrXbDO",
"name": "Channel Name",
"waba": "123456789012345",
"appIntegrations": {
"edges": [
{
"node": {
"_id": "696327325430a1cbd131dfdf",
"secret": "your-app-integration-secret"
}
}
]
}
}
}
}
}
}
- Create a JWT Token with the following payload:
Payload Structure:
{
"meta": {
"appId": "699802d69a73fc555f1c6bc4",
"appIntegrationId": "696327325430a1cbd131dfdf",
"userId": "your-user-id",
"channelId": "696327315430a1f98231dfde"
}
}
Encode the Payload Base64 format.
Combine the encoded Payload and Signature in order to create the
Context Tokenin the following format:
Example Context Token:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXRhIjp7ImFwcElkIjoiNjk5ODAyZDY5YTczZmM1NTVmMWM2YmM0IiwiYXBwSW50ZWdyYXRpb25JZCI6IjY5NjMyNzMyNTQzMGExY2JkMTMxZGZkZiIsInVzZXJJZCI6InlvdXItdXNlci1pZCIsImNoYW5uZWxJZCI6IjY5NjMyNzMxNTQzMGExZjk4MjMxZGZkZSJ9LCJqdGkiOiI5MmY3ZTBhMS0zNGJjLTQ5ZGUtOGFiNC1mYzg1ZTY3MTJkMzEiLCJpc3MiOiJXb3p0ZWxsIEluYm94IiwiYXVkIjoiNjk2MzI3MzI1NDMwYTFjYmQxMzFkZmRmIiwiaWF0IjoxNzM1MDM3MDU2LCJleHAiOjE3MzUxMjM0NTZ9.abc123xyz
- Add them to the header as the
X-Woztell-PayloadandX-Woztell-SignedContext.
Security Guidelines
- Never expose your App Integration Secret in client-side code or public repositories
- Store secrets securely using environment variables or secret management services
- Use appropriate token expiration times (typically 1-24 hours)
- Always use HTTPS for all API requests
- Rotate your secrets periodically
Token Expiration
Tokens expire after the specified duration (default 24 hours). When a token expires, you'll receive a 401 Unauthorized response and will need to generate a new token.
PUT /group
Create a new WhatsApp group with the specified settings.
Request Body Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| channelId | string | The ID of the WhatsApp channel | Yes |
| subject | string | The name/title of the group | Yes |
| description | string | Description of the group purpose | No |
| approval_required | boolean | Whether admin approval is required for members to join | No |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group
Request
PUT https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group
Content-Type: application/json
X-Woztell-Context: YOUR_CONTEXT_TOKEN
{
"channelId": "621f29db4e22303de280e29d",
"subject": "TEST G5",
"description": "Some Des",
"approval_required": true
}
Response
{
"success": true,
"groupId": "120363XXXXXXXXXXXXXXXXXXXx@g.us",
"subject": "TEST G5",
"description": "Some Des",
"approval_required": true,
"createdAt": "2024-01-15T10:30:00.000Z"
}
GET /group/info
Get detailed information about a specific WhatsApp group.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| whatsappGroupId | string | The unique identifier of the WhatsApp group | Yes |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/info
Request
GET https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/info?whatsappGroupId=Y2FwaV9ncm91cDoxNTU1NjAwMzk3NjoxMjAzNjM0MjQyMDI1Njk2MzYZD
X-Woztell-Context: YOUR_CONTEXT_TOKEN
Response
{
"ok": 1,
"_id": "60f7a1b2c3d4e5f6g7h8i9j0",
"whatsappGroupId": "Y2FwaV9ncm91cDoxMjM0NTY3ODkwOjEyMDM2MzQyMjMzMjc5MjI1OQ==",
"channelId": "507f1f77bcf86cd799439011",
"createdAt": 1640000000000,
"description": "Welcome to our community group",
"etag": "e-AbC123XyZ456DeF789GhI012",
"inviteLink": "https://chat.whatsapp.com/ABcd1234EFgh5678IjKl",
"subject": "Customer Support Group",
"timestamp": 1640000000,
"updatedAt": 1650000000000,
"profilePicture": {
"next": {
"request_id": "A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6",
"url": "https://s3.example.com/bucket/org-id/channel-id/image-id/profile.jpg"
},
"url": "https://s3.example.com/bucket/org-id/channel-id/image-id/profile.jpg"
},
"participants": [
{
"_id": "60a1b2c3d4e5f6g7h8i9j0k1",
"firstName": "John",
"lastName": "Doe",
"externalId": "1234567890",
"gender": "M",
"locale": "en_US",
"tags": [
"vip_customer",
"premium",
"active"
],
"updatedAt": 1645000000000,
"createdAt": 1635000000000,
"id": "bWVtYmVyOjYwYTFiMmMzZDRlNWY2ZzdoOGk5ajBrMQ=="
},
{
"_id": "70b2c3d4e5f6g7h8i9j0k1l2",
"firstName": "Jane",
"lastName": "Smith",
"externalId": "9876543210",
"gender": "F",
"locale": "en_GB",
"tags": [
"new_member",
"verified"
],
"updatedAt": 1648000000000,
"createdAt": 1638000000000,
"id": "bWVtYmVyOjcwYjJjM2Q0ZTVmNmc3aDhpOWowazFsMg=="
}
],
"id": "Z3JvdXBNZW1iZXI6NjBmN2ExYjJjM2Q0ZTVmNmc3aDhpOWow"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| ok | number | Status indicator (1 = success) |
| _id | string | Internal database ID |
| whatsappGroupId | string | Unique WhatsApp group identifier |
| channelId | string | Associated WhatsApp channel ID |
| subject | string | Group name/title |
| description | string | Group description |
| inviteLink | string | WhatsApp group invite link |
| etag | string | Entity tag for caching |
| timestamp | number | Unix timestamp (in seconds) |
| createdAt | number | Timestamp when record was created (in milliseconds) |
| updatedAt | number | Timestamp when record was last updated (in milliseconds) |
| profilePicture | object | Group profile picture information |
| profilePicture.url | string | Current profile picture URL |
| profilePicture.next | object | Next profile picture information (if updating) |
| participants | array | List of group participants with full member details |
| participants[].firstName | string | Participant's first name |
| participants[].lastName | string | Participant's last name |
| participants[].externalId | string | Participant's phone number |
| participants[].gender | string | Participant's gender (M/F) |
| participants[].locale | string | Participant's locale |
| participants[].tags | array | Tags associated with the participant |
| id | string | Base64 encoded group identifier |
GET /group/members
Search and retrieve members from WhatsApp groups with pagination support.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| size | number | Number of results per page (default: 20) | No |
| firstName | string | Search by member's first name | No* |
| search | number | Search by member's phone number | No* |
*Note: Use firstName when searching with a string, use search when searching with a phone number.
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/members
Request
GET https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/members?size=20&firstName=john
X-Woztell-Context: YOUR_CONTEXT_TOKEN
Or search by phone number:
GET https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/members?size=20&search=1234567890
X-Woztell-Context: YOUR_CONTEXT_TOKEN
Response
{
"ok": 1,
"edges": [
{
"node": {
"_id": "60a1b2c3d4e5f6g7h8i9j0k1",
"firstName": "John",
"lastName": "Doe",
"externalId": "1234567890",
"gender": "M",
"locale": "en_US",
"tags": [
"vip_customer",
"active"
],
"updatedAt": 1645000000000,
"createdAt": 1635000000000,
"id": "bWVtYmVyOjYwYTFiMmMzZDRlNWY2ZzdoOGk5ajBrMQ=="
}
},
{
"node": {
"_id": "70b2c3d4e5f6g7h8i9j0k1l2",
"firstName": "Jane",
"lastName": "Smith",
"externalId": "9876543210",
"gender": "F",
"locale": "en_GB",
"tags": [
"premium",
"verified"
],
"updatedAt": 1648000000000,
"createdAt": 1638000000000,
"id": "bWVtYmVyOjcwYjJjM2Q0ZTVmNmc3aDhpOWowazFsMg=="
}
},
{
"node": {
"_id": "80c3d4e5f6g7h8i9j0k1l2m3",
"firstName": "Alice",
"lastName": null,
"externalId": "5555555555",
"gender": null,
"locale": null,
"tags": [
"new_member"
],
"updatedAt": 1650000000000,
"createdAt": 1640000000000,
"id": "bWVtYmVyOjgwYzNkNGU1ZjZnN2g4aTlqMGsxbDJtMw=="
}
}
],
"pageInfo": {
"hasNextPage": true,
"hasPreviousPage": false,
"endCursor": "MTk="
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| ok | number | Status indicator (1 = success) |
| edges | array | Array of member objects wrapped in node structure |
| edges[].node | object | Member information object |
| edges[].node._id | string | Internal member database ID |
| edges[].node.firstName | string | Member's first name |
| edges[].node.lastName | string | Member's last name (can be null) |
| edges[].node.externalId | string | Member's phone number |
| edges[].node.gender | string | Member's gender (M/F or null) |
| edges[].node.locale | string | Member's locale/language preference |
| edges[].node.tags | array | Array of tags associated with the member |
| edges[].node.updatedAt | number | Timestamp when member was last updated (in milliseconds) |
| edges[].node.createdAt | number | Timestamp when member was created (in milliseconds) |
| edges[].node.id | string | Base64 encoded member identifier |
| pageInfo | object | Pagination information |
| pageInfo.hasNextPage | boolean | Whether more results are available |
| pageInfo.hasPreviousPage | boolean | Whether previous page exists |
| pageInfo.endCursor | string | Cursor for fetching next page |
PATCH /group/invite-link
Refresh or manage the WhatsApp group invite link.
Request Body Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| groupId | string | The unique identifier of the WhatsApp group | Yes |
| action | string | Action to perform (REFRESH) | Yes |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/invite-link
Request
PATCH https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/invite-link
Content-Type: application/json
X-Woztell-Context: YOUR_CONTEXT_TOKEN
{
"groupId": "Y2FwaV9ncm91cDoxNTU1NjAwMzk3NjoxMjAzNjM0MjIzMzI3OTIyNTkZD",
"action": "REFRESH"
}
Response
{
"ok": 1,
"messaging_product": "whatsapp",
"invite_link": "https://chat.whatsapp.com/GR0UbhDUlJfIKSfe3wtN6L"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| ok | number | Status indicator (1 = success) |
| messaging_product | string | Platform identifier (whatsapp) |
| invite_link | string | The new WhatsApp group invite link |
PATCH /group
Remove participants from a WhatsApp group.
Request Body Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| groupId | string | The unique identifier of the WhatsApp group | Yes |
| channelId | string | The ID of the WhatsApp channel | Yes |
| removeParticipants | array | Array of participants to remove | Yes |
| removeParticipants[].user | string | Phone number of the user to remove | Yes |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group
Request
PATCH https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group
Content-Type: application/json
X-Woztell-Context: YOUR_CONTEXT_TOKEN
{
"groupId": "Y2FwaV9ncm91cDoxNTU1NjAwMzk3NjoxMjAzNjM0MjIzMzI3OTIyNTkZD",
"channelId": "621f29db4e22303de280e29d",
"removeParticipants": [
{
"user": "1234567890"
},
{
"user": "9876543210"
}
]
}
Response
{
"ok": 1,
"messaging_product": "whatsapp",
"request_id": "754E22D64F630624AC23519A300AF1AD"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| ok | number | Status indicator (1 = success) |
| messaging_product | string | Platform identifier (whatsapp) |
| request_id | string | Unique identifier for the request |
GET /group/join-requests
Retrieve pending join requests for a WhatsApp group that requires approval.
Query Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| groupId | string | The unique identifier of the WhatsApp group | Yes |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/join-requests
Request
GET https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group/join-requests?groupId=Y2FwaV9ncm91cDoxNTU1NjAwMzk3NjoxMjAzNjM0MjIzMzI3OTIyNTkZD
X-Woztell-Context: YOUR_CONTEXT_TOKEN
Response
{
"ok": 1,
"data": []
}
Or with pending requests:
{
"ok": 1,
"data": [
{
"user": "1234567890",
"requestTime": 1640000000000,
"firstName": "John",
"lastName": "Doe"
},
{
"user": "9876543210",
"requestTime": 1640000500000,
"firstName": "Jane",
"lastName": "Smith"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| ok | number | Status indicator (1 = success) |
| data | array | Array of pending join requests (empty if no requests) |
| data[].user | string | Phone number of the user requesting to join |
| data[].requestTime | number | Timestamp when the request was made (in milliseconds) |
| data[].firstName | string | First name of the requesting user |
| data[].lastName | string | Last name of the requesting user |
DELETE /group
Delete a WhatsApp group permanently.
Request Body Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| groupId | string | The unique identifier of the WhatsApp group | Yes |
Endpoint
https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group
Request
DELETE https://api.whatsapp-cloud.woztell.sanuker.com/v1.1/group
Content-Type: application/json
X-Woztell-Context: YOUR_CONTEXT_TOKEN
{
"groupId": "Y2FwaV9ncm91cDoxNTU1NjAwMzk3NjoxMjAzNjM0MjI3Nzc0NDA3ODYZD"
}
Response
{
"ok": 1,
"messaging_product": "whatsapp",
"request_id": "6D4E72C7DDAF5C11356C58C2675155A4"
}
Response Fields
| Field | Type | Description |
|---|---|---|
| ok | number | Status indicator (1 = success) |
| messaging_product | string | Platform identifier (whatsapp) |
| request_id | string | Unique identifier for the request |
warning
Deleting a group is a permanent action and cannot be undone. All group data, messages, and settings will be lost.





