Add media item by URL
curl --request POST \
--url https://api.pineyard.ai/whatsapp/collections/{id}/items/url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.pineyard.ai/whatsapp/collections/{id}/items/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/collections/{id}/items/url"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"kind": "TEXT",
"fileName": "<string>",
"mimeType": "<string>",
"sizeBytes": 123,
"caption": "<string>",
"isUploaded": true,
"url": "<string>",
"sortOrder": 123,
"createdAt": "<string>"
}Media collections
Add media item by URL
Add an item to a media collection from an https:// URL.
POST
/
whatsapp
/
collections
/
{id}
/
items
/
url
Add media item by URL
curl --request POST \
--url https://api.pineyard.ai/whatsapp/collections/{id}/items/url \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>'})
};
fetch('https://api.pineyard.ai/whatsapp/collections/{id}/items/url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/collections/{id}/items/url"
payload = { "url": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"kind": "TEXT",
"fileName": "<string>",
"mimeType": "<string>",
"sizeBytes": 123,
"caption": "<string>",
"isUploaded": true,
"url": "<string>",
"sortOrder": 123,
"createdAt": "<string>"
}Required scope:
whatsapp.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Collection ID
Body
application/json
Response
Created item.
Available options:
TEXT, IMAGE, DOCUMENT, VIDEO, AUDIO 
