Create a media collection
curl --request POST \
--url https://api.pineyard.ai/whatsapp/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tag": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tag: '<string>'})
};
fetch('https://api.pineyard.ai/whatsapp/collections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/collections"
payload = { "tag": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"tag": "<string>",
"description": "<string>",
"caption": "<string>",
"itemCount": 123,
"items": [
{
"id": "<string>",
"kind": "TEXT",
"fileName": "<string>",
"mimeType": "<string>",
"sizeBytes": 123,
"caption": "<string>",
"isUploaded": true,
"url": "<string>",
"sortOrder": 123,
"createdAt": "<string>"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"templateId": "<string>",
"templateHeaderItemId": "<string>",
"templateSendMode": "SINGLE"
}Media collections
Create a media collection
POST
/
whatsapp
/
collections
Create a media collection
curl --request POST \
--url https://api.pineyard.ai/whatsapp/collections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tag": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tag: '<string>'})
};
fetch('https://api.pineyard.ai/whatsapp/collections', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/collections"
payload = { "tag": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"tag": "<string>",
"description": "<string>",
"caption": "<string>",
"itemCount": 123,
"items": [
{
"id": "<string>",
"kind": "TEXT",
"fileName": "<string>",
"mimeType": "<string>",
"sizeBytes": 123,
"caption": "<string>",
"isUploaded": true,
"url": "<string>",
"sortOrder": 123,
"createdAt": "<string>"
}
],
"createdAt": "<string>",
"updatedAt": "<string>",
"templateId": "<string>",
"templateHeaderItemId": "<string>",
"templateSendMode": "SINGLE"
}Required scope:
whatsapp.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json
Response
Created
Show child attributes
Show child attributes
Available options:
SINGLE, ALL 
