---
title: Quickstart | API Docs
description: Send your first WhatsApp message and observe its outcome.
---

Your Linq contact gives you an API key during onboarding.

Terminal window

```
export BASE_URL="https://whatsapp.messages.api.linqapp.com"
export API_KEY="sk_live_…"        # use the exact key issued to you
```

Beta, with no SLA

Published wire shapes change additively, but the service has no uptime, latency, support-response, or blanket retention commitment during beta.

## 1. Fetch the contract

The OpenAPI document and individual message-part schemas are public:

Terminal window

```
curl -s "$BASE_URL/v1/openapi.yaml" -o openapi.yaml
curl -s "$BASE_URL/v1/parts/text" | jq .
```

## 2. Start the event stream

Open the stream before sending so you see each transition:

Terminal window

```
curl -N \
  -H "Authorization: Bearer $API_KEY" \
  "$BASE_URL/v1/streams/events"
```

Persist each SSE `id` as a resume cursor. The event envelope contains the chat and the range that moved, not message content; read content from the chat journal. Unknown event kinds must be ignored so additive events do not break your consumer.

## 3. Send a message

`POST /v1/messages` lets Linq select the eligible line and chat for a destination. Supply an idempotency key for every logical send.

Terminal window

```
curl -sS -X POST "$BASE_URL/v1/messages" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: first-message-001" \
  -d '{
    "to": "+15551234567",
    "parts": [{"type": "text", "body": "Hello from Linq"}]
  }' | jq .
```

HTTP `202` means the send is durably accepted. It does not mean delivered. Watch for `message.delivered`, `message.read`, or `message.failed`, then read the addressed range from `GET /v1/chats/{chat}/events`.

## 4. Recover after a disconnect

Resume SSE with `Last-Event-ID`, or page the same durable account sequence:

Terminal window

```
curl -sS \
  -H "Authorization: Bearer $API_KEY" \
  "$BASE_URL/v1/event_log?limit=100" | jq .
```

Use the response’s opaque `next_cursor` on the next request. Keep account-event cursors separate from per-chat sequence cursors.

Next, read [Sending messages](/channel/whatsapp/guides/messaging/sending-messages/index.md) and [Events and recovery](/channel/whatsapp/guides/events/index.md).
