iMessage
A customer texts your Linq line "What is your return policy?" from an iPhone, and the agent answers over iMessage. The linq connector does this.
Answer on iMessage
You need a Linq API token, and your line's number in E.164. Setup takes four steps:
Subscribe at Linq
Pick a name for your Linq account, such as acme-linq. At Linq, create a webhook subscription for the message.received event to $STREAM_ACCELERATION_URL/v1/connectors/events/linq/acme-linq?version=2026-02-03. $STREAM_ACCELERATION_URL is your router's URL. Keep the subscription's signing secret. It starts with whsec_.
You can create the subscription with Linq's API and your Linq API token:
curl -X POST "https://api.linqapp.com/api/partner/v3/webhook-subscriptions" \
-H "Authorization: Bearer $LINQ_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"target_url": "$STREAM_ACCELERATION_URL/v1/connectors/events/linq/acme-linq?version=2026-02-03", "subscribed_events": ["message.received"]}'Linq returns the subscription's signing_secret.
Save your Linq account
Give Stream the name and the signing secret:
curl -fsSL https://getstream.io/cli.sh | bash # get the CLI
echo "$LINQ_SIGNING_SECRET" | getstream agents connectors client set linq --provider-app-id acme-linq --signing-secret -The CLI prints Saved the provider app for linq.
Connect the line
Create the connection with your line's number and the Linq API token:
echo "$LINQ_API_TOKEN" | getstream agents connections create linq --label acme-imessage --input phone_number=+12025550100 -H Authorization=-The CLI prints Connected: linq / acme-imessage, with the connection's id.
Add it to the agent
If you don't have an agent named support yet, create one in Creating an agent. Add the connection by its label:
getstream agents connectors bind support linq --connection acme-imessageThe command adds this to agents/support/agent.yaml and syncs the agent. See a full agent.yaml for the rest of the file.
# ...
connectors:
- name: linq
connection: acme-imessageFrom an iPhone, text "What is your return policy?" to your Linq line. The reply comes back in the same chat.
Conversations
- Each chat is one conversation. Text "My name is Ana", then "What is my name?", and the agent answers "Your name is Ana."
- Stream Chat keeps the conversation in one channel per chat, with the person's messages and the agent's replies.
- A photo reaches the agent. Send a photo with "What is in this photo?", and the agent answers about the photo.
- If photos do not reach the agent, save the Linq token again. On the connection's page, choose Replace token and enter the Linq API token again.
Keywords
Stream handles these, not the agent:
- HELP: Stream answers with its help text, "Reply STOP to unsubscribe."
- STOP: the person is opted out. They get no confirmation, and nothing more is sent to them until they send START.
- START: the person is opted back in. Stream answers "You are subscribed again. Reply STOP to unsubscribe.", and the agent answers their next message.