--- title: Quickstart | API Docs description: Send your first message in under 5 minutes. --- This guide walks you through sending your first message with the Linq Partner API. ## Prerequisites Before you begin, make sure you have: - A **bearer token** from your Linq representative - At least one **phone number** provisioned on your account - A recipient phone number in **E.164 format** (e.g., `+15556667777`) ## 1. Install an SDK (optional) - [TypeScript](#tab-panel-0) - [Python](#tab-panel-1) - [cURL](#tab-panel-2) Terminal window ``` npm install @linqapp/sdk ``` Terminal window ``` pip install linq-python ``` No installation needed — use `curl` from your terminal. ## 2. Send your first message Create a chat and send a message in a single request: - [cURL](#tab-panel-3) - [TypeScript](#tab-panel-4) - [Python](#tab-panel-5) Terminal window ``` curl -X POST https://api.linqapp.com/api/partner/v3/chats \ -H "Authorization: Bearer $LINQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "+12223334444", "to": ["+15556667777"], "message": { "parts": [ { "type": "text", "value": "Hello from Linq!" } ] } }' ``` ``` import LinqAPIV3 from '@linqapp/sdk'; const client = new LinqAPIV3({ apiKey: process.env.LINQ_API_KEY, }); const chat = await client.chats.create({ from: '+12223334444', to: ['+15556667777'], message: { parts: [ { type: 'text', value: 'Hello from Linq!' } ], }, }); console.log('Chat created:', chat.id); console.log('Message ID:', chat.last_message?.id); ``` ``` import os from linq import LinqAPIV3 client = LinqAPIV3(api_key=os.environ["LINQ_API_KEY"]) chat = client.chats.create( from_="+12223334444", to=["+15556667777"], message={ "parts": [ {"type": "text", "value": "Hello from Linq!"} ] }, ) print(f"Chat created: {chat.id}") print(f"Message ID: {chat.last_message.id}") ``` You’ll receive a response with the chat details and message status: ``` { "id": "550e8400-e29b-41d4-a716-446655440000", "is_group": false, "last_message": { "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "parts": [ { "type": "text", "value": "Hello from Linq!" } ], "sent_at": "2026-02-05T19:52:17.219Z", "service": "iMessage" } } ``` ## 3. Send a follow-up message Once you have a chat ID, send additional messages to the same conversation: - [cURL](#tab-panel-6) - [TypeScript](#tab-panel-7) - [Python](#tab-panel-8) Terminal window ``` curl -X POST https://api.linqapp.com/api/partner/v3/chats/{chat_id}/messages \ -H "Authorization: Bearer $LINQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "parts": [ { "type": "text", "value": "Following up!" } ] }' ``` ``` const message = await client.chats.messages.send(chat.id, { parts: [ { type: 'text', value: 'Following up!' } ], }); ``` ``` message = client.chats.messages.send( chat.id, parts=[{"type": "text", "value": "Following up!"}], ) ``` ## 4. Set up webhooks To receive real-time notifications when messages are delivered, read, or received, create a webhook subscription: - [cURL](#tab-panel-9) - [TypeScript](#tab-panel-10) - [Python](#tab-panel-11) Terminal window ``` curl -X POST https://api.linqapp.com/api/partner/v3/webhook-subscriptions \ -H "Authorization: Bearer $LINQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "target_url": "https://your-server.com/webhook?version=2026-02-03", "subscribed_events": [ "message.sent", "message.received", "message.delivered", "message.read", "message.failed" ] }' ``` ``` const subscription = await client.webhookSubscriptions.create({ target_url: 'https://your-server.com/webhook?version=2026-02-03', subscribed_events: [ 'message.sent', 'message.received', 'message.delivered', 'message.read', 'message.failed', ], }); ``` ``` subscription = client.webhook_subscriptions.create( target_url="https://your-server.com/webhook?version=2026-02-03", subscribed_events=[ "message.sent", "message.received", "message.delivered", "message.read", "message.failed", ], ) ``` > **Tip:** If no version is specified, the subscription uses the latest available version at creation time. Pass `?version=YYYY-MM-DD` explicitly to pin a specific payload format. See [Webhooks → Versioning](/guides/webhooks#webhook-versioning/index.md) and [Signature verification](/guides/webhooks#signature-verification/index.md). ## Next steps - [Sending Messages](/guides/messaging/sending-messages/index.md) — Text, media, threading, and effects - [Attachments](/guides/messaging/attachments/index.md) — Send images, videos, and documents - [Webhooks](/guides/webhooks/index.md) — Signature verification and event handling - [Group Chats](/guides/chats/group-chats/index.md) — Multi-participant conversations - [Error Codes](/error/index.md) — Troubleshooting API errors - [API Reference](/api/index.md) — Complete endpoint specification