Send a WhatsApp video
Send one video from a ChatGPT attachment (file) or an existing HTTPS link (url) to a one-to-one chat on the QR account, with an optional caption.
- Key permissions
- Read chats and messages + Send messages + Files, reactions, edits and polls
- Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work
How it works
- Only invoke for explicit user intent.
- Provide exactly one of file or url.
- For documents, provide
fileNameunless file includesfile_name. - With several numbers, it goes from the number given as
fromNumber, otherwise the one number the chat is on; when that is not clear, nothing is sent and the result hasdraft_link. - Uses shared send limits; acceptance is not delivery.
- If it will not be sent (sending turned off, the daily send limit used, or the daily limit for people this number never chatted with), the result has
draft_linkinstead.
Body parameters
idempotencyKeystringbody or headerA fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action.
phoneNumberstringrequiredFull international phone number, including country code.
urlstring · urioptionalAn existing HTTPS file link. Omit when using file.
fileobjectoptionalA file attached in ChatGPT. ChatGPT supplies its temporary download link; never publish the file to get a URL.
captionstringoptionalSee the example and input schema for this value.
fromNumberstringoptionalWhich of the account's WhatsApp numbers acts, with country code, as listed in whatsapp_numbers from get_account_context. Only matters when the account has several numbers. Omit to send from the one number the chat is on; for a new person, or a chat on several numbers, nothing is sent until fromNumber says which.
Conditions and pagination
- Use a unique idempotency key for each intended action. Reuse the same key and exactly the same input on a retry. The body key takes precedence over Idempotency-Key.
Response
The response wraps tool-specific data in result. Save operation_id and inspect get_operation with operationId if the outcome is uncertain. completed means the operation completed; it does not prove message delivery or Meta approval. An uncertain operation returns HTTP 409 with error.operation_id. When it will not go out it returns an error, never a 200: new_people_limit (429, the limit on people the number never chatted with, with Retry-After), daily_limit_reached (429, until 00:00 UTC), sending_off (409, the owner turned sending off) or from_number_required (422, several numbers and no fromNumber). error.sent is false; error.draft_link opens WhatsApp with the message filled in, for a person to send by hand.
Every response includes X-Request-Id. Errors use the shared error format and retry rules.
Schemas
Input JSON Schema
{
"type": "object",
"properties": {
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9._:-]{8,128}$",
"description": "A fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action."
},
"phoneNumber": {
"type": "string",
"pattern": "^[1-9]\\d{6,14}$"
},
"url": {
"type": "string",
"format": "uri",
"maxLength": 2048,
"description": "An existing HTTPS file link. Omit when using file."
},
"file": {
"type": "object",
"properties": {
"download_url": {
"$ref": "#/properties/url"
},
"file_id": {
"type": "string",
"minLength": 1,
"maxLength": 250
},
"mime_type": {
"type": "string",
"maxLength": 100
},
"file_name": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"download_url",
"file_id"
],
"additionalProperties": false,
"description": "A file attached in ChatGPT. ChatGPT supplies its temporary download link; never publish the file to get a URL."
},
"caption": {
"type": "string",
"maxLength": 1024
},
"fromNumber": {
"type": "string",
"minLength": 7,
"maxLength": 30,
"description": "Which of the account's WhatsApp numbers acts, with country code, as listed in whatsapp_numbers from get_account_context. Only matters when the account has several numbers. Omit to send from the one number the chat is on; for a new person, or a chat on several numbers, nothing is sent until fromNumber says which."
}
},
"required": [
"idempotencyKey",
"phoneNumber"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Response JSON Schema
{
"type": "object",
"properties": {
"operation_id": {
"type": "string",
"format": "uuid"
},
"status": {
"type": "string",
"enum": [
"completed"
]
},
"replayed": {
"type": "boolean"
},
"result": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"provider_message_id": {
"type": [
"string",
"null"
]
},
"delivered": {
"type": "boolean"
}
},
"required": [],
"additionalProperties": true
},
"note": {
"type": [
"string",
"null"
]
}
},
"required": [
"operation_id",
"status",
"result"
],
"additionalProperties": true
}