Send a test WhatsApp message or collection
curl --request POST \
--url https://api.pineyard.ai/whatsapp/test-send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"toPhone": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({toPhone: '<string>'})
};
fetch('https://api.pineyard.ai/whatsapp/test-send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/test-send"
payload = { "toPhone": "<string>" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"messages": [
{
"id": "<string>",
"direction": "OUTBOUND",
"toPhone": "<string>",
"type": "TEXT",
"body": "<string>",
"status": "QUEUED",
"providerMsgId": "<string>",
"mediaItemId": "<string>",
"collectionId": "<string>",
"callId": "<string>",
"campaignId": "<string>",
"error": "<string>",
"createdAt": "<string>",
"sentAt": "<string>",
"deliveredAt": "<string>",
"readAt": "<string>",
"templateId": "<string>",
"providerErrorReason": "<string>",
"failureReason": "<string>",
"templateValues": {
"headerValues": [
"<string>"
],
"bodyValues": [
"<string>"
],
"name": "<string>",
"templatePurpose": "<string>",
"fileName": "<string>"
},
"conversationId": "<string>",
"contactId": "<string>",
"campaignContactId": "<string>",
"hasMedia": true,
"mediaMimeType": "<string>",
"mediaFileName": "<string>"
}
]
}Messages
Send a test WhatsApp message or collection
POST
/
whatsapp
/
test-send
Send a test WhatsApp message or collection
curl --request POST \
--url https://api.pineyard.ai/whatsapp/test-send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"toPhone": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({toPhone: '<string>'})
};
fetch('https://api.pineyard.ai/whatsapp/test-send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/test-send"
payload = { "toPhone": "<string>" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"messages": [
{
"id": "<string>",
"direction": "OUTBOUND",
"toPhone": "<string>",
"type": "TEXT",
"body": "<string>",
"status": "QUEUED",
"providerMsgId": "<string>",
"mediaItemId": "<string>",
"collectionId": "<string>",
"callId": "<string>",
"campaignId": "<string>",
"error": "<string>",
"createdAt": "<string>",
"sentAt": "<string>",
"deliveredAt": "<string>",
"readAt": "<string>",
"templateId": "<string>",
"providerErrorReason": "<string>",
"failureReason": "<string>",
"templateValues": {
"headerValues": [
"<string>"
],
"bodyValues": [
"<string>"
],
"name": "<string>",
"templatePurpose": "<string>",
"fileName": "<string>"
},
"conversationId": "<string>",
"contactId": "<string>",
"campaignContactId": "<string>",
"hasMedia": true,
"mediaMimeType": "<string>",
"mediaFileName": "<string>"
}
]
}Required scope:
whatsapp.send
Idempotency: an Idempotency-Key header is required when calling with an API key. See Idempotency.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Headers
Unique value (e.g. a UUID) per action, up to 200 printable ASCII characters. Reuse it only to retry the same request; the first response is replayed for 24 hours.
Maximum string length:
200Example:
"f1d2c3b4-0000-4000-8000-000000000000"
Body
application/json
Response
Queued
Show child attributes
Show child attributes

