Quickstart
Send your first message in under 5 minutes.
This guide walks you through sending your first message with the Linq Partner API.
Prerequisites
Section titled “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)
Section titled “1. Install an SDK (optional)”npm install @linqapp/sdkpip install linq-pythonNo installation needed — use curl from your terminal.
2. Send your first message
Section titled “2. Send your first message”Create a chat and send a message in a single request:
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 osfrom 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
Section titled “3. Send a follow-up message”Once you have a chat ID, send additional messages to the same conversation:
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
Section titled “4. Set up webhooks”To receive real-time notifications when messages are delivered, read, or received, create a webhook subscription:
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-DDexplicitly to pin a specific payload format. See Webhooks → Versioning and Signature verification.
Next steps
Section titled “Next steps”- Sending Messages — Text, media, threading, and effects
- Attachments — Send images, videos, and documents
- Webhooks — Signature verification and event handling
- Group Chats — Multi-participant conversations
- Error Codes — Troubleshooting API errors
- API Reference — Complete endpoint specification