Configured messages
Send a message prepared for your number, filling only its placeholders.
POST
/v1/numbers/{phone_number}/commands/simplified-sendReference →
WhaPiù can store ready-made messages on your number, for example an order confirmation. You send one by name and pass only the values for its placeholders.
curl -X POST "$WAPIU_API/v1/numbers/$WAPIU_NUMBER/commands/simplified-send" \ -H "Authorization: Bearer $WAPIU_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "receiver": "393331112222", "message": "order_confirmation", "params": { "name": "Mario", "order": "A1234" } }'| Field | Type | Required | Description |
|---|---|---|---|
receiver | string | Yes | The user's number, digits only, 6 to 15. No +. |
message | string | Yes | The name of the configured message, up to 128 characters. |
params | object | No | Up to 50 values. Keys are letters, digits and _. Values are strings, numbers or booleans. Strings cannot contain { } [ ] \. |
{ "status": "ok" }200 means the message was built and queued. The messaging window applies unless the configured message is a template.
Errors
| HTTP | Meaning |
|---|---|
| 403 | You may not send from this number. |
| 422 | Invalid receiver, message or params. |
| 502 | No configured message with that name, or it could not be built. |
| 503 | Temporarily unavailable. Retry with backoff. |