---
title: "Incoming message received"
method: POST
path: "incomingMessage"
tags: ["Webhooks"]
---

# Incoming message received

`POST incomingMessage` (webhook)

Telerivet sends this webhook when incoming message received.

**Setup:** Create a Webhook service in your project, or use the REST API to create a service with `service_type: webhook`.

**Request format:** POST with `application/x-www-form-urlencoded` body.

## Acknowledgement `200`

Webhook processed successfully. Optionally return JSON to send autoreplies or update variables.

- WebhookResponse: Optional JSON response your webhook can return to send autoreplies or update variables
  - `messages` object[]: Array of messages to send as autoreplies
    - `content` string, required: Message text to send
    - `to_number` string: Recipient phone number (defaults to sender of incoming message)
    - `message_type` 'sms' | 'ussd': Type of message to send
    - `route_id` string: Phone/route ID to send from (defaults to receiving phone)
    - `status_url` string: Webhook URL for delivery status updates
    - `status_secret` string: Secret for status webhook verification
  - `variables` object: Variables to update in Rules Engine (e.g., contact.name, state.id, $foo)

---

[API](https://skmtc.dev/telerivet/apis/telerivet-api.md) · [All operations](https://skmtc.dev/telerivet/apis/telerivet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/telerivet/apis/telerivet-api/revisions/4e14b1c8d917?raw)
