Skip to Content
Developers

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"    }  }'
FieldTypeRequiredDescription
receiverstringYesThe user's number, digits only, 6 to 15. No +.
messagestringYesThe name of the configured message, up to 128 characters.
paramsobjectNoUp 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

HTTPMeaning
403You may not send from this number.
422Invalid receiver, message or params.
502No configured message with that name, or it could not be built.
503Temporarily unavailable. Retry with backoff.

On this page