Testing
Write as a customer
# Write as a customer
Test keys only. A made-up customer writes on the simulator: the `message.received` webhook arrives, and until its `free_text_until` you can answer this number with text. With `type` `voice`, `audio`, `image` or `video` instead of `text`, the customer sends a sample file, a photo or a video with the caption from `caption`, which `GET /v1/media/{id}` downloads.
## Body
- `from` (string, required): The made-up customer's number in E.164, up to 32 characters.
- `type` (string): `text` when left out, or `voice`, `audio`, `image` or `video` for a sample file.
- `text.body` (string): What the customer writes, up to 4,096 characters. Required unless `type` names a file.
- `name` (string): The customer's name, up to 120 characters, or `null`.
- `caption` (string): A caption for a sample photo or video, up to 1,024 characters, or `null`.
## Errors
| Code | HTTP | What it means |
| --- | --- | --- |
| `test_key_required` | 403 | This works with a test key only. |
| `invalid_request` | 422 | The request is not filled in correctly. |
| `invalid_phone` | 422 | Give the number in international format, for example +77011234567. |
## Response 201
```json
{
"id": "0199c5e2-6a29-7b40-8e0d-2f1c3a4b5d6e",
"contact_id": "0199c5e2-1f0a-7a42-8d1e-5b7c9a2e4f10",
"from": "+77011234567",
"name": "Asel",
"channel": "simulator",
"type": "text",
"text": {
"body": "Hello! When will my order be ready?"
},
"received_at": "2026-10-09T09:30:00+00:00",
"free_text_until": "2026-10-10T09:30:00+00:00"
}
```
POST /v1/test/inbound
Test keys onlyTest keys only. A made-up customer writes on the simulator: the message.received webhook arrives, and until its free_text_until you can answer this number with text. With type voice, audio, image or video instead of text, the customer sends a sample file, a photo or a video with the caption from caption, which GET /v1/media/{id} downloads.
Returns the incoming message.
Body
-
fromstring required - The made-up customer's number in E.164, up to 32 characters.
-
typestring textwhen left out, orvoice,audio,imageorvideofor a sample file.-
text.bodystring - What the customer writes, up to 4,096 characters. Required unless
typenames a file. -
namestring - The customer's name, up to 120 characters, or
null. -
captionstring - A caption for a sample photo or video, up to 1,024 characters, or
null.
Errors
| Code | HTTP | What it means |
|---|---|---|
test_key_required | 403 | This works with a test key only. |
invalid_request | 422 | The request is not filled in correctly. |
invalid_phone | 422 | Give the number in international format, for example +77011234567. |
Any request can also get the codes on Errors, such as unauthenticated and rate_limited.