Simulate an incoming message
Pretends a person wrote to your workspace from a reserved test address, so you can build and test replies without a real phone. Works only with a test key (vl_test_…). The conversation is marked test: true: every reply in it — yours and your agent's — is delivered to a simulated carrier, never a real one, and costs nothing.
Test addresses: +15550100 to +15550199 for SMS and WhatsApp, test-1, test-2, … for Telegram and Discord, any address at test.vlayers.ai for email.
You don't need a phone number: when your workspace has no sender on the channel, the message arrives on its free test sender, made on first use. The test sender has no agent, so its conversations start with the controller api (your code answers).
Requires an API key with the messages:send scope.
apiKeyAuthorizationBearer <token>A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.
application/json- body
channel*stringThe channel the message arrives on: sms, whatsapp, telegram, discord or email.
1 <= length <= 64from*stringA reserved test address: +15550100 to +15550199, test-<n>, or an address at test.vlayers.ai.
1 <= length <= 320to?stringWhich of your senders receives it (a phone number, account address or mailbox). Leave it out to use your one sender on the channel, or your free test sender when you have none.
1 <= length <= 320text*stringWhat the person writes, up to 4,096 characters.
1 <= length <= 4096The simulated message was received
application/json- response
conversationId*stringuuidmessageId*|uuidtest*booleanAlways true: the conversation is stamped test.
curl -X POST https://api.vlayers.ai/v1/test/inbound \ -H "Authorization: Bearer $VOICELAYER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "channel": "sms", "from": "+15550123", "text": "Do you have a table for two tonight?" }'{ "conversationId": "0192f5b0-7c3e-7a51-9b2d-4e8f1a6c3d21", "messageId": "0192f5b0-8d1f-7b62-8c3e-5f9a2b7d4e32", "test": true}