# Linq

> Connect Linq to automate messaging, crm systems workflows.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/linq

## Actions

### Add a participant to a chat

Add a participant to a chat.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat
- Handle (`handle`, text, required): Phone number (E.164 format) or email address of the participant to add

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "message": "example",
    "status": "example",
    "trace_id": "example"
  }
}
```

### Add or remove a reaction to a message

Add or remove a reaction to a message.

**Inputs**

- Message id (`message_id`, text, required): Unique identifier of the message to react to
- Operation (`operation`, text, required): Whether to add or remove the reaction. One of: `add`, `remove`.
- Type (`type`, text, required): Type of reaction. Standard iMessage tapbacks are love, like, dislike, laugh, emphasize, question. Custom emoji reactions have type "custom" with the actual emoji in the custom_emoji field. Sticker reactions have type "sticker" with sticker attachment details in the sticker field. One of: `love`, `like`, `dislike`, `laugh`, `emphasize`, `question`, `custom`, `sticker`.
- Custom emoji (`custom_emoji`, text): Custom emoji string. Required when type is "custom". This is a **tapback**. the emoji sits in the tapback bubble on the corner of the message. To peel an emoji onto the message as a draggable sticker instead, use type "sticker" with `emoji`.
- Emoji (`emoji`, text): A single emoji to peel onto the message as a sticker. Only valid when type is "sticker". Exactly one of `emoji`, `url` or `attachment_id` is required when type is "sticker". Not to be confused with `custom_emoji`, which produces a tapback.
- Url (`url`, text): Linq attachment URL of the sticker image. the `download_url` returned by `POST /v3/attachments`. Only valid when type is "sticker". The image must already be stored with us. To send a sticker from elsewhere, upload it with `POST /v3/attachments` first and pass `attachment_id`. Exactly one of `emoji`, `url` or `attachment_id` is required when type is "sticker".
- Attachment id (`attachment_id`, text): Reference to a sticker image pre-uploaded via `POST /v3/attachments`. Only valid when type is "sticker". Exactly one of `emoji`, `url` or `attachment_id` is required when type is "sticker".
- Part index (`part_index`, number): Optional index of the message part to react to. If not provided, reacts to the entire message (part 0).
- Placement (`placement`, object): Optional position, size and rotation of a sticker on the target bubble. Only valid when type is "sticker". Every field is independent and optional. omit the object entirely, or any field within it, to keep the default (centred, default size, unrotated).

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "message": "example",
    "status": "example",
    "trace_id": "example"
  }
}
```

### Check iMessage capability

Check iMessage capability.

**Inputs**

- Address (`address`, text, required): The recipient address to check. `check_imessage` accepts an E.164 phone number or an email address; `check_rcs` accepts an E.164 phone number only and rejects an email with a `400`, since RCS has no email addressing.
- From value (`from_value`, text): Optional sender phone number. If omitted, an available phone from your pool is used automatically.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "address": "example",
    "available": false,
    "reason": "not_supported",
    "selected_service": "example"
  }
}
```

### Check RCS capability

Check RCS capability.

**Inputs**

- Address (`address`, text, required): The recipient address to check. `check_imessage` accepts an E.164 phone number or an email address; `check_rcs` accepts an E.164 phone number only and rejects an email with a `400`, since RCS has no email addressing.
- From value (`from_value`, text): Optional sender phone number. If omitted, an available phone from your pool is used automatically.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "address": "example",
    "available": false,
    "reason": "not_supported",
    "selected_service": "example"
  }
}
```

### Create a new chat

Create a new chat.

**Inputs**

- From value (`from_value`, text, required): Sender phone number in E.164 format. Must be a phone number that the authenticated partner has permission to send from.
- To (`to`, list, required): Array of recipient handles (phone numbers in E.164 format or email addresses). For individual chats, provide one recipient. For group chats, provide multiple.
- Override optout (`override_optout`, true/false): Send even though the recipient asked you to stop (`403`, error code `2024`). Applies to this request only: the opt-out stays in place, so the next send without this flag is rejected again. Every override is recorded against your API key.
- Message text (`message_text`, text): Text to send. Provide text, media URLs, or uploaded attachment IDs.
- Media urls (`media_urls`, list): HTTPS URLs of images or files to send with the message.
- Attachment ids (`attachment_ids`, list): IDs from Pre-upload a file, for files already uploaded to Linq.

**Outputs**: Result returned by the service.

- `response` (object): Response for creating a new chat with an initial message

**Example output**

```json
{
  "response": {
    "chat": {
      "display_name": "example",
      "handles": [],
      "health_status": {
        "doc_url": {},
        "status": {},
        "updated_at": {}
      },
      "id": "example-id",
      "is_group": false,
      "message": {
        "created_at": {},
        "delivered_at": {},
        "delivery_status": {},
        "effect": {},
        "from_handle": {},
        "id": {},
        "is_read": {},
        "parts": {},
        "preferred_service": {},
        "reply_to": {},
        "sent_at": {},
        "service": {}
      },
      "service": {}
    }
  }
}
```

### Delete a message from system

Delete a message from system.

**Inputs**

- Message id (`message_id`, text, required): Unique identifier of the message to delete

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {}
}
```

### Edit the content of a message part

Edit the content of a message part.

**Inputs**

- Message id (`message_id`, text, required): Unique identifier of the message to edit
- Part index (`part_index`, number): Index of the message part to edit. Defaults to 0.
- Text (`text`, text, required): New text content for the message part

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "chat_id": "example",
    "created_at": "2026-10-25T12:00:00Z",
    "delivered_at": "2026-10-25T12:00:00Z",
    "delivery_status": "pending",
    "effect": {
      "name": {},
      "type": {}
    },
    "from": "example",
    "from_handle": {
      "handle": {},
      "id": {},
      "is_me": {},
      "joined_at": {},
      "left_at": {},
      "line_type": {},
      "service": {},
      "status": {}
    },
    "id": "example-id",
    "is_delivered": false,
    "is_from_me": false,
    "is_read": false,
    "parts": [],
    "preferred_service": "example",
    "read_at": "2026-10-25T12:00:00Z",
    "reconciled_at": "2026-10-25T12:00:00Z",
    "reply_to": {
      "message_id": {},
      "part_index": {}
    },
    "sent_at": "2026-10-25T12:00:00Z",
    "service": "example",
    "updated_at": "2026-10-25T12:00:00Z"
  }
}
```

### Get a chat by ID

Get a chat by ID.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "created_at": "2026-10-25T12:00:00Z",
    "display_name": "example",
    "group_chat_icon": "example",
    "handles": [],
    "health_status": {
      "doc_url": "example",
      "status": "example",
      "updated_at": "2026-10-25T12:00:00Z"
    },
    "id": "example-id",
    "is_archived": false,
    "is_group": false,
    "service": "example",
    "updated_at": "2026-10-25T12:00:00Z"
  }
}
```

### Get a message by ID

Get a message by ID.

**Inputs**

- Message id (`message_id`, text, required): Unique identifier of the message to retrieve

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "chat_id": "example",
    "created_at": "2026-10-25T12:00:00Z",
    "delivered_at": "2026-10-25T12:00:00Z",
    "delivery_status": "pending",
    "effect": {
      "name": {},
      "type": {}
    },
    "from": "example",
    "from_handle": {
      "handle": {},
      "id": {},
      "is_me": {},
      "joined_at": {},
      "left_at": {},
      "line_type": {},
      "service": {},
      "status": {}
    },
    "id": "example-id",
    "is_delivered": false,
    "is_from_me": false,
    "is_read": false,
    "parts": [],
    "preferred_service": "example",
    "read_at": "2026-10-25T12:00:00Z",
    "reconciled_at": "2026-10-25T12:00:00Z",
    "reply_to": {
      "message_id": {},
      "part_index": {}
    },
    "sent_at": "2026-10-25T12:00:00Z",
    "service": "example",
    "updated_at": "2026-10-25T12:00:00Z"
  }
}
```

### Get all messages in a thread

Get all messages in a thread.

**Inputs**

- Message id (`message_id`, text, required): ID of any message in the thread (can be originator or any reply)
- Cursor (`cursor`, text): Pagination cursor from previous next_cursor response
- Limit (`limit`, number): Maximum number of messages to return. From 1 to 100.
- Order (`order`, text): Sort order for messages (asc = oldest first, desc = newest first). One of: `asc`, `desc`.

**Outputs**: Result returned by the service.

- `response` (object): Response containing messages in a thread with pagination

**Example output**

```json
{
  "response": {
    "messages": [],
    "next_cursor": "example"
  }
}
```

### Get attachment metadata

Get attachment metadata.

**Inputs**

- Attachment id (`attachment_id`, text, required): Unique identifier of the attachment

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "content_type": "image/jpeg",
    "created_at": "2026-10-25T12:00:00Z",
    "download_url": "example",
    "filename": "example",
    "id": "example-id",
    "size_bytes": 0,
    "status": "pending"
  }
}
```

### Get contact cards

Get contact cards.

**Inputs**

- Phone number (`phone_number`, text): E.164 phone number to filter by. If omitted, all my cards for the partner are returned.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "contact_cards": []
  }
}
```

### Get messages from a chat

Get messages from a chat.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat
- Cursor (`cursor`, text): Pagination cursor from previous next_cursor response
- Limit (`limit`, number): Maximum number of messages to return. From 1 to 100.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "messages": [],
    "next_cursor": "example"
  }
}
```

### Leave a group chat

Leave a group chat.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat to leave

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "message": "example",
    "status": "example",
    "trace_id": "example"
  }
}
```

### List all chats

List all chats.

**Inputs**

- From value (`from_value`, text): Phone number to filter chats by. Returns chats made from this phone number. Must be in E.164 format (e.g., `+13343284472`). The `+` is automatically URL-encoded by HTTP clients. If omitted, returns chats across all phone numbers owned by the partner.
- To (`to`, text): Filter chats by a participant handle. Only returns chats where this handle is a participant. Can be an E.164 phone number (e.g., `+13343284472`) or an email address (e.g., `user@example.com`). For phone numbers, the `+` is automatically URL-encoded by HTTP clients.
- Limit (`limit`, number): Maximum number of chats to return per page. From 1 to 100.
- Cursor (`cursor`, text): Pagination cursor from the previous response's `next_cursor` field. Omit this parameter for the first page of results.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "chats": [],
    "next_cursor": "example"
  }
}
```

### List phone numbers

List phone numbers.

**Inputs**: None.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "phone_numbers": []
  }
}
```

### Mark chat as read

Mark chat as read.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {}
}
```

### Pre-upload a file

Pre-upload a file.

**Inputs**

- Filename (`filename`, text, required): Name of the file to upload
- Content type (`content_type`, text, required): Supported MIME types for file attachments and media URLs. **Images:** image/jpeg, image/png, image/gif, image/heic, image/heif, image/tiff, image/bmp, image/svg+xml, image/webp, image/x-icon **Videos:** video/mp4, video/quicktime, video/mpeg, video/mpeg2, video/x-msvideo, video/3gpp **Audio:** audio/mpeg, audio/x-m4a, audio/x-caf, audio/x-wav, audio/x-aiff, audio/aac, audio/midi, audio/amr **Wallet passes:** application/vnd.apple.pkpass **Documents:** application/pdf, text/plain, text/markdown, text/vcard, text/rtf, text/csv, text/html, text/calendar, text/xml, application/json, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/x-iwork-pages-sffpages, application/x-iwork-numbers-sffnumbers, application/x-iwork-keynote-sffkey, application/epub+zip, application/zip, application/x-gzip **Transcoded on delivery:** - `audio/x-caf`. CAF files are transcoded to `audio/mp4` for delivery. **Deprecated (accepted but transcoded):** - `audio/mp3`. Deprecated. Use `audio/mpeg` instead. Files sent as audio/mp3 will be delivered as audio/mpeg. - `audio/mp4`. Deprecated. Use `audio/x-m4a` instead. Files sent as audio/mp4 will be delivered as audio/x-m4a. - `audio/aiff`. Deprecated. Use `audio/x-aiff` instead. Files sent as audio/aiff will be delivered as audio/x-aiff. - `image/tiff`. Accepted, but TIFF images are transcoded to JPEG for delivery. **Unsupported:** FLAC, OGG, and executable files are explicitly rejected. One of: `image/jpeg`, `image/png`, `image/gif`, `image/heic`, `image/heif`, `image/tiff`, `image/bmp`, `image/svg+xml`, `image/webp`, `image/x-icon`, and 41 more.
- Size bytes (`size_bytes`, number, required): Size of the file in bytes (max 100MB). From 1 to 104857600.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "attachment_id": "example",
    "download_url": "example",
    "expires_at": "2026-10-25T12:00:00Z",
    "http_method": "PUT",
    "required_headers": {},
    "upload_url": "example"
  }
}
```

### Remove a participant from a chat

Remove a participant from a chat.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat
- Handle (`handle`, text, required): Phone number (E.164 format) or email address of the participant to remove

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "message": "example",
    "status": "example",
    "trace_id": "example"
  }
}
```

### Send a message to an existing chat

Send a message to an existing chat.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat
- Override optout (`override_optout`, true/false): Send even though the recipient asked you to stop (`403`, error code `2024`). Applies to this request only: the opt-out stays in place, so the next send without this flag is rejected again. Every override is recorded against your API key.
- Message text (`message_text`, text): Text to send. Provide text, media URLs, or uploaded attachment IDs.
- Media urls (`media_urls`, list): HTTPS URLs of images or files to send with the message.
- Attachment ids (`attachment_ids`, list): IDs from Pre-upload a file, for files already uploaded to Linq.

**Outputs**: Result returned by the service.

- `response` (object): Response for sending a message to a chat

**Example output**

```json
{
  "response": {
    "chat_id": "example",
    "message": {
      "created_at": "2026-10-25T12:00:00Z",
      "delivered_at": "2026-10-25T12:00:00Z",
      "delivery_status": "example",
      "effect": {},
      "from_handle": {},
      "id": "example-id",
      "is_read": false,
      "parts": [],
      "preferred_service": {},
      "reply_to": {},
      "sent_at": "2026-10-25T12:00:00Z",
      "service": {}
    }
  }
}
```

### Setup contact card

Setup contact card.

**Inputs**

- Phone number (`phone_number`, text, required): E.164 phone number to associate the contact card with
- First name (`first_name`, text, required): First name for the contact card. Required.
- Last name (`last_name`, text): Last name for the contact card. Optional.
- Image url (`image_url`, text): Profile image URL for the contact card.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "first_name": "example",
    "image_url": "example",
    "is_active": false,
    "last_name": "example",
    "phone_number": "example"
  }
}
```

### Start typing indicator

Start typing indicator.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {}
}
```

### Stop typing indicator

Stop typing indicator.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {}
}
```

### Update a chat

Update a chat.

**Inputs**

- Chat id (`chat_id`, text, required): Unique identifier of the chat
- Display name (`display_name`, text): New display name for the chat (group chats only)
- Group chat icon (`group_chat_icon`, text): URL of an image to set as the group chat icon (group chats only)

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "chat_id": "example",
    "status": "example"
  }
}
```

### Update contact card

Update contact card.

**Inputs**

- Phone number (`phone_number`, text, required): E.164 phone number of the contact card to update
- First name (`first_name`, text): Updated first name. If omitted, the existing value is kept.
- Last name (`last_name`, text): Updated last name. If omitted, the existing value is kept.
- Image url (`image_url`, text): Updated profile image URL. If omitted, the existing image is kept.

**Outputs**: Result returned by the service.

- `response` (object): Complete service response, including pagination.

**Example output**

```json
{
  "response": {
    "first_name": "example",
    "image_url": "example",
    "is_active": false,
    "last_name": "example",
    "phone_number": "example"
  }
}
```
