> ## Documentation Index
> Fetch the complete documentation index at: https://developers.lightyshare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Messaging

> Read and answer your conversations

## Write to a tenant

```bash theme={null}
curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Idempotency-Key: welcome-12345" -H "Content-Type: application/json" \
  -d '{"content": "Hello, your request is confirmed."}' \
  https://www.lightyshare.com/api/token-secured/rentals/12345/messages
```

`POST /conversations/{id}/messages` answers in a thread. The API cannot start a conversation with someone you have no thread or rental with.

| Answer | Meaning |
| - | - |
| `201` | Sent |
| `400 message_blocked` | Contains an external link |
| `409 phone_number_confirmation` | Contains contact details: send again with `"contactConfirmed": true`. Renting outside Lightyshare loses the guarantees |
| `429 rate_limited` | Limit reached, see `detail` and `Retry-After` |

## Read

* `GET /conversations?page=1`
* `GET /conversations/{id}/messages?after={messageId}`: reading marks nothing as read
* `POST /conversations/{id}/read`: marks the thread as read
* `GET /saved-replies`: your saved replies


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.