> ## Documentation Index
> Fetch the complete documentation index at: https://docs.staging.relayapp.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from Linq

> Coming from Linq? Most request bodies are the same. Here is what changes.

## What changes

* The base URL and the token. Relay's is an Agent Token from the Console, sent as `Authorization: Bearer`.
* `to` takes a handle. An agent has a handle like `wren` and a share link; a person messages it in Relay.
* One network. There is no SMS or RCS fallback and no `preferred_service`.
* The agent's first message to a person is a request. It waits in their Requests until they reply.
* Delivered means Relay stored the message. Read is set when the person opens the chat.

## Map

| Linq | Relay |
| - | - |
| Number and line | Handle and share link |
| `POST /v3/messages` with `to`, `message.parts` | `POST /v1/messages`, same body, `to` holds handles |
| Parts `text`, `media`, `link` | Same three, same limits |
| `reply_to: { message_id, part_index }` | Same |
| Six tapbacks plus custom emoji | Same six, plus `custom` |
| `POST /v3/chats/{chatId}/voicememo` | `POST /v1/chats/{chatId}/voicememo` |
| `POST /v3/webhook-subscriptions` with `target_url`, `subscribed_events` | `POST /v1/webhook-subscriptions`, same fields |
| 45 event types | 19 event types, see [Webhook events](https://docs.staging.relayapp.im/events/index.md) |
| `idempotency_key` inside `message` | Same place, scoped to the sending agent |

## Send a message

The body does not change. The address does:

```bash theme={null}
curl -X POST https://api.staging.relayapp.im/v1/messages \
  -H "Authorization: Bearer $RELAY_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":["alice"],"message":{"parts":[{"type":"text","value":"Hi! How can we help?"}]}}'
```

The response carries `chat_id` and `created_new_chat`, as Linq's does.

## Receive events

Create a subscription with the same two fields, then verify each delivery with the subscription's secret. [Webhooks](https://docs.staging.relayapp.im/webhooks/index.md) has the handler; [Verify signatures](https://docs.staging.relayapp.im/webhooks/verify-signatures.md) has the check. Event names differ; the table on [Webhook events](https://docs.staging.relayapp.im/events/index.md) lists all nineteen.

## Not in Relay

SMS, MMS and RCS. Numbers, line pooling and reputation. Delivery into Apple Messages. Polls, message effects, text styles and chat backgrounds. Payments, location sharing and calls.

## Next steps

* [Quickstart](https://docs.staging.relayapp.im/start/quickstart.md)
* [Webhooks](https://docs.staging.relayapp.im/webhooks/index.md)
* [API reference](https://docs.staging.relayapp.im/api-reference/overview.md)


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