Legacy Device API

Messages

Send text and media through a connected QR device. Every request must include instance_id.

POST /messages/text Public https://app.washeej.com/device-api/v1/messages/text

Send a text message via a connected QR device.

Parameter Type Required Description
instance_id string required Device instance ID (always required).
to string required Recipient with country code, no +.
text string required Message body (max 4096).
cURL
curl -X POST https://app.washeej.com/device-api/v1/messages/text \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "instance_id": "YOUR_INSTANCE_ID",
    "to": "966500000000",
    "text": "Hello via QR device"
  }'
Notes
  • Every Device API call requires instance_id.
API v1 equivalent Prefer POST /v1/messages with device whatsapp_account_id for new integrations. Open API v1 docs →
POST /messages/image Public https://app.washeej.com/device-api/v1/messages/image

Send an image with optional caption.

Parameter Type Required Description
instance_id string required Device instance ID.
to string required Recipient phone.
image_url url required Direct image URL.
caption string optional Optional caption.
cURL
curl -X POST https://app.washeej.com/device-api/v1/messages/image \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"instance_id":"YOUR_INSTANCE_ID","to":"966500000000","image_url":"https://example.com/a.jpg","caption":"Photo"}'
POST /messages/video Public https://app.washeej.com/device-api/v1/messages/video

Send a video. Same shape as image, use video_url.

Parameter Type Required Description
instance_id string required Device instance ID.
to string required Recipient phone.
video_url url required Direct video URL.
caption string optional Optional caption.
cURL
curl -X POST https://app.washeej.com/device-api/v1/messages/video \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"instance_id":"YOUR_INSTANCE_ID","to":"966500000000","video_url":"https://example.com/a.mp4"}'
POST /messages/document Public https://app.washeej.com/device-api/v1/messages/document

Send a document (PDF preview when filename ends with .pdf).

Parameter Type Required Description
instance_id string required Device instance ID.
to string required Recipient phone.
document_url url required Document URL.
filename string required Display filename with extension.
caption string optional Optional caption.
cURL
curl -X POST https://app.washeej.com/device-api/v1/messages/document \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"instance_id":"YOUR_INSTANCE_ID","to":"966500000000","document_url":"https://example.com/invoice.pdf","filename":"invoice.pdf"}'
POST /messages/audio Public https://app.washeej.com/device-api/v1/messages/audio

Send an audio / voice file.

Parameter Type Required Description
instance_id string required Device instance ID.
to string required Recipient phone.
audio_url url required Direct audio URL.
cURL
curl -X POST https://app.washeej.com/device-api/v1/messages/audio \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"instance_id":"YOUR_INSTANCE_ID","to":"966500000000","audio_url":"https://example.com/note.ogg"}'
POST /messages/location Public https://app.washeej.com/device-api/v1/messages/location

Send a location pin.

Parameter Type Required Description
instance_id string required Device instance ID.
to string required Recipient phone.
latitude number required Latitude (-90 to 90).
longitude number required Longitude (-180 to 180).
name string optional Place name.
address string optional Address text.
cURL
curl -X POST https://app.washeej.com/device-api/v1/messages/location \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "X-Api-Secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"instance_id":"YOUR_INSTANCE_ID","to":"966500000000","latitude":24.7136,"longitude":46.6753,"name":"Riyadh"}'
GET /messages/{message_id}/status Public https://app.washeej.com/device-api/v1/messages/{message_id}/status

Lookup delivery status for a previously sent message ID.

Parameter Type Required Description
message_id path string required Message ID returned from send endpoints.
cURL
curl -H "X-Api-Key: YOUR_API_KEY" \
     -H "X-Api-Secret: YOUR_API_SECRET" \
     https://app.washeej.com/device-api/v1/messages/MESSAGE_ID/status
Notes
  • Status tracking may be limited depending on device channel capabilities.