> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spojit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Front

> Conversations, inboxes, contacts, messages, tags, and teammates.

The Front connector lets your workflows manage shared inboxes, conversations, contacts, and messages through the Front API.

<Note>
  For the full API reference, see the [Front API documentation](https://dev.frontapp.com/docs/welcome).
</Note>

<Snippet file="connection-note.mdx" />

## Connection setup

<Steps>
  <Step title="Create an API token">
    In Front, go to **Settings > Developers > API Tokens**. Click **Create API Token**, give it a name, and select the scopes your workflows need. Copy the generated token.
  </Step>

  <Step title="Add the connection in Spojit">
    Go to **Connections** in Spojit, click **Add Connection**, select **Front**, and enter:

    * **API Token**: Your Front API token
  </Step>
</Steps>

## Tools

### Conversations

<AccordionGroup>
  <Accordion title="list-conversations: List conversations">
    <ParamField body="q" type="string">
      Search query to filter conversations.
    </ParamField>

    <ParamField body="page_token" type="string">
      Pagination token from `_pagination.next`.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "q": "order shipping"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "_pagination": {
        "next": "https://api2.frontapp.com/conversations?page_token=abc123"
      },
      "_results": [
        {
          "id": "cnv_abc123",
          "subject": "Order #1234 - delivery question",
          "status": "open",
          "assignee": {
            "id": "tea_xyz789",
            "email": "alice@company.com",
            "first_name": "Alice",
            "last_name": "Johnson"
          },
          "recipient": {
            "handle": "customer@example.com",
            "role": "from"
          },
          "tags": [
            { "id": "tag_shipping", "name": "Shipping" }
          ],
          "last_message": {
            "id": "msg_111222",
            "body": "Hi, when will my order arrive?",
            "created_at": 1718460000
          },
          "created_at": 1718400000,
          "is_private": false
        },
        {
          "id": "cnv_def456",
          "subject": "Billing inquiry",
          "status": "open",
          "assignee": null,
          "recipient": {
            "handle": "billing@example.com",
            "role": "from"
          },
          "tags": [],
          "created_at": 1718380000,
          "is_private": false
        }
      ]
    }
    ```
  </Accordion>

  <Accordion title="get-conversation: Get a conversation by ID">
    <ParamField body="id" type="string" required>
      Conversation ID.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "id": "cnv_abc123"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": "cnv_abc123",
      "subject": "Order #1234 - delivery question",
      "status": "open",
      "assignee": {
        "id": "tea_xyz789",
        "email": "alice@company.com",
        "first_name": "Alice",
        "last_name": "Johnson"
      },
      "recipient": {
        "handle": "customer@example.com",
        "role": "from"
      },
      "tags": [
        { "id": "tag_shipping", "name": "Shipping" }
      ],
      "inboxes": [
        { "id": "inb_support", "name": "Support" }
      ],
      "created_at": 1718400000,
      "is_private": false,
      "_links": {
        "self": "https://api2.frontapp.com/conversations/cnv_abc123",
        "related": {
          "messages": "https://api2.frontapp.com/conversations/cnv_abc123/messages",
          "events": "https://api2.frontapp.com/conversations/cnv_abc123/events"
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### Inboxes

<AccordionGroup>
  <Accordion title="list-inboxes: List inboxes">
    No parameters required. Returns all inboxes accessible to the authenticated token.

    **Example response:**

    ```json theme={null}
    {
      "_results": [
        {
          "id": "inb_support",
          "name": "Support",
          "address": "support@company.com",
          "type": "smtp",
          "is_private": false
        },
        {
          "id": "inb_sales",
          "name": "Sales",
          "address": "sales@company.com",
          "type": "smtp",
          "is_private": false
        },
        {
          "id": "inb_billing",
          "name": "Billing",
          "address": "billing@company.com",
          "type": "smtp",
          "is_private": true
        }
      ]
    }
    ```
  </Accordion>
</AccordionGroup>

### Contacts

<AccordionGroup>
  <Accordion title="list-contacts: List contacts">
    <ParamField body="q" type="string">
      Search query to filter contacts.
    </ParamField>

    <ParamField body="page_token" type="string">
      Pagination token from `_pagination.next`.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "q": "example.com"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "_pagination": {},
      "_results": [
        {
          "id": "crd_abc123",
          "name": "John Smith",
          "description": "VIP customer",
          "handles": [
            { "handle": "john@example.com", "source": "email" }
          ],
          "groups": [
            { "id": "grp_vip", "name": "VIP" }
          ],
          "is_spammer": false,
          "updated_at": 1718460000
        },
        {
          "id": "crd_def456",
          "name": "Jane Doe",
          "description": "",
          "handles": [
            { "handle": "jane@example.com", "source": "email" },
            { "handle": "+15005550006", "source": "phone" }
          ],
          "groups": [],
          "is_spammer": false,
          "updated_at": 1718400000
        }
      ]
    }
    ```
  </Accordion>

  <Accordion title="get-contact: Get a contact by ID">
    <ParamField body="id" type="string" required>
      Contact ID.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "id": "crd_abc123"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": "crd_abc123",
      "name": "John Smith",
      "description": "VIP customer",
      "handles": [
        { "handle": "john@example.com", "source": "email" }
      ],
      "groups": [
        { "id": "grp_vip", "name": "VIP" }
      ],
      "is_spammer": false,
      "updated_at": 1718460000,
      "_links": {
        "self": "https://api2.frontapp.com/contacts/crd_abc123",
        "related": {
          "conversations": "https://api2.frontapp.com/contacts/crd_abc123/conversations"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="create-contact: Create a new contact">
    <ParamField body="name" type="string">
      Contact name.
    </ParamField>

    <ParamField body="description" type="string">
      Contact description or notes.
    </ParamField>

    <ParamField body="handles" type="object[]" required>
      Contact handles (email, phone, etc.). Each object has `handle` (the value) and `source` (e.g., `email`, `phone`, `twitter`).
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "name": "Emily Chen",
      "description": "New enterprise lead",
      "handles": [
        { "handle": "emily@bigcorp.com", "source": "email" },
        { "handle": "+15005550007", "source": "phone" }
      ]
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "id": "crd_ghi789",
      "name": "Emily Chen",
      "description": "New enterprise lead",
      "handles": [
        { "handle": "emily@bigcorp.com", "source": "email" },
        { "handle": "+15005550007", "source": "phone" }
      ],
      "groups": [],
      "is_spammer": false,
      "updated_at": 1718550000
    }
    ```
  </Accordion>
</AccordionGroup>

### Messages

<AccordionGroup>
  <Accordion title="send-message: Send a message from a channel">
    <ParamField body="channelId" type="string" required>
      Channel ID to send from.
    </ParamField>

    <ParamField body="to" type="string[]" required>
      Array of recipient handles.
    </ParamField>

    <ParamField body="body" type="string" required>
      Message body (HTML supported).
    </ParamField>

    <ParamField body="subject" type="string">
      Message subject (for email channels).
    </ParamField>

    <ParamField body="options" type="object">
      Additional options (e.g., `{ "archive": true, "tag_ids": [] }`).
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "channelId": "cha_abc123",
      "to": ["customer@example.com"],
      "body": "<p>Hi John,</p><p>Your order #1234 shipped today via FedEx. Tracking number: <strong>7891011</strong>.</p><p>Best,<br>Support Team</p>",
      "subject": "Your order has shipped"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "success": true,
      "data": {
        "status": "accepted",
        "message_uid": "msg_uid_abc123"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### Tags

<AccordionGroup>
  <Accordion title="list-tags: List tags">
    No parameters required. Returns all tags in the workspace.

    **Example response:**

    ```json theme={null}
    {
      "_results": [
        {
          "id": "tag_shipping",
          "name": "Shipping",
          "is_private": false
        },
        {
          "id": "tag_billing",
          "name": "Billing",
          "is_private": false
        },
        {
          "id": "tag_urgent",
          "name": "Urgent",
          "is_private": false
        }
      ]
    }
    ```
  </Accordion>

  <Accordion title="add-tag: Add tags to a conversation">
    <ParamField body="conversationId" type="string" required>
      Conversation ID.
    </ParamField>

    <ParamField body="tag_ids" type="string[]" required>
      Array of tag IDs to add.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "conversationId": "cnv_abc123",
      "tag_ids": ["tag_urgent", "tag_shipping"]
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "success": true
    }
    ```
  </Accordion>
</AccordionGroup>

### Teammates

<AccordionGroup>
  <Accordion title="list-teammates: List teammates">
    No parameters required. Returns all teammates in the workspace.

    **Example response:**

    ```json theme={null}
    {
      "_results": [
        {
          "id": "tea_xyz789",
          "email": "alice@company.com",
          "first_name": "Alice",
          "last_name": "Johnson",
          "is_admin": true,
          "is_available": true
        },
        {
          "id": "tea_uvw456",
          "email": "bob@company.com",
          "first_name": "Bob",
          "last_name": "Williams",
          "is_admin": false,
          "is_available": true
        }
      ]
    }
    ```
  </Accordion>
</AccordionGroup>

### Advanced

<AccordionGroup>
  <Accordion title="raw-api-request: Make an arbitrary API request">
    Send a request to any Front API endpoint.

    <ParamField body="method" type="string" required>
      HTTP method: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`.
    </ParamField>

    <ParamField body="path" type="string" required>
      API path (e.g., `/conversations`, `/contacts`).
    </ParamField>

    <ParamField body="body" type="object">
      Request body for POST/PUT/PATCH requests.
    </ParamField>

    **Example request:**

    ```json theme={null}
    {
      "method": "GET",
      "path": "/events"
    }
    ```

    **Example response:**

    ```json theme={null}
    {
      "_results": [
        {
          "id": "evt_111",
          "type": "assign",
          "emitted_at": 1718460000,
          "conversation": { "id": "cnv_abc123" },
          "target": {
            "id": "tea_xyz789",
            "email": "alice@company.com"
          }
        }
      ]
    }
    ```
  </Accordion>
</AccordionGroup>
