Upload template header media
curl --request POST \
--url https://api.pineyard.ai/whatsapp/templates/{id}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.pineyard.ai/whatsapp/templates/{id}/media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/templates/{id}/media"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"headerKind": "<string>",
"mediaUrl": "<string>",
"reviewReady": true,
"reviewIssue": "<string>"
}Templates
Upload template header media
Upload the header attachment (image, document or video) for a media-header template. Send the file as file; optional fileName sets the display name.
POST
/
whatsapp
/
templates
/
{id}
/
media
Upload template header media
curl --request POST \
--url https://api.pineyard.ai/whatsapp/templates/{id}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-fileconst form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.pineyard.ai/whatsapp/templates/{id}/media', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/templates/{id}/media"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"headerKind": "<string>",
"mediaUrl": "<string>",
"reviewReady": true,
"reviewIssue": "<string>"
}Required scope:
whatsapp.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Template ID

