Media
Start a media upload
- Base URL
https://api.polymorfa.com- Required permission
messages:write
Start a resumable upload. Pass file_name, file_length and file_type as query parameters; returns { id: "upload:<SESSION_ID>" } whose id is the path of the subsequent append call.
Path parameters
versionstringrequiredSpecifies version for this path parameter.
appIdstringrequiredIdentifier of the connected application.
Query parameters
file_namestringHuman-readable file name for this query parameter.
file_lengthstringSpecifies file length for this query parameter.
file_typestringIANA media type that matches the uploaded file.
Media type: IANA
type/subtypevalue matching the payload, such asapplication/pdf,text/plain, orapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
Responses
200Upload session created (Meta response, forwarded verbatim)
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<appId>/uploads" \
-H "Authorization: Bearer YOUR_API_KEY"nullGet media
- Base URL
https://api.polymorfa.com- Required permission
media:read
Path parameters
versionstringrequiredSpecifies version for this path parameter.
objectIdstringrequiredIdentifier for the object.
Responses
200Media metadata
messaging_productstringrequiredMessaging product associated with this Graph API object.
urlstringrequiredURL associated with this resource.
mime_typestringrequiredIANA media type that matches the media payload.
Media type: IANA
type/subtypevalue matching the payload, such asimage/jpeg,video/mp4,audio/ogg, orapplication/pdf
sha256stringrequiredSpecifies sha256 for this graph graph media info response.
file_sizenumberrequiredSpecifies file size for this graph graph media info response.
idstringrequiredIdentifier for this resource.
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<objectId>" \
-H "Authorization: Bearer YOUR_API_KEY"{
"messaging_product": "string",
"url": "string",
"mime_type": "string",
"sha256": "string",
"file_size": 0,
"id": "string"
}Upload media bytes
- Base URL
https://api.polymorfa.com- Required permission
messages:write
Append the raw file bytes to a resumable upload session. The request body is the binary file contents (no multipart wrapper); send file_offset: 0 on the first call. Returns { h: "<FILE_HANDLE>" } on success.
Path parameters
versionstringrequiredSpecifies version for this path parameter.
objectIdstringrequiredIdentifier for the object.
Body
Responses
200File handle (Meta response, forwarded verbatim)
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<objectId>" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary @<file_path>nullUpload media
- Base URL
https://api.polymorfa.com- Required permission
media:manage
Path parameters
versionstringrequiredSpecifies version for this path parameter.
phoneNumberIdstringrequiredIdentifier for the phone number.
Body
messaging_productstringrequiredMessaging product associated with this Graph API object.
typestringType discriminator for this object.
filestring (binary)Specifies file for this graph graph media upload request.
Responses
200Media uploaded
idstringrequiredIdentifier for this resource.
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<phoneNumberId>/media" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F 'messaging_product=whatsapp' \
-F 'type=<type>' \
-F 'file=@<file_path>'{
"id": "string"
}Download uploaded media
- Base URL
https://api.polymorfa.com- Required permission
media:read
Path parameters
versionstringrequiredSpecifies version for this path parameter.
mediaIdstringrequiredIdentifier for the media.
Responses
200Media bytes
Content type
application/octet-streamShow 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<mediaId>/download" \
-H "Authorization: Bearer YOUR_API_KEY"Content type application/octet-stream
No example for this content type
Delete uploaded media
- Base URL
https://api.polymorfa.com- Required permission
media:manage
Path parameters
versionstringrequiredSpecifies version for this path parameter.
objectIdstringrequiredIdentifier for the object.
Responses
200Deleted
successbooleanrequiredWhether the request succeeded.
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X DELETE "https://api.polymorfa.com/graph/whatsapp/v26.0/<objectId>" \
-H "Authorization: Bearer YOUR_API_KEY"{
"success": true
}