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

# List Agency Lines

> List every iMessage/SMS/email line across all workspaces in your Tuco agency, with the workspace each one sits in.

<Note>
  One view of every line your agency owns, across every workspace. Use it to find the
  `lineId` you want to move.
</Note>

## Endpoint

* **Method**: `GET`
* **Path**: `/api/agency/lines`
* **Auth**: `Authorization: Bearer tucoagency_xxxxxxxxxxxxx` ([agency key](/api-reference/agency-api-keys))

## Example request

```bash theme={null}
curl https://app.tuco.ai/api/agency/lines \
  -H "Authorization: Bearer tucoagency_xxxxxxxxxxxxx"
```

## Success response (200)

```json theme={null}
{
  "isOwner": false,
  "workspaces": [
    { "clerkOrgId": "org_3KKJKupHJ8Y9I2NXVAga0c6ZqgT", "name": "Acme Roofing" }
  ],
  "lines": [
    {
      "lineId": "6a3d7d7ef8c81f91304ed6f1",
      "workspaceId": "org_3KKJKupHJ8Y9I2NXVAga0c6ZqgT",
      "workspaceName": "Acme Roofing",
      "identifier": "+16465550100",
      "channelType": "phone",
      "lineType": "byon",
      "provisioningStatus": "active",
      "name": "Lindsey Rodriguez"
    }
  ]
}
```

`isOwner` is always `false` for an API key — deleting a line requires a signed-in
agency owner, so the key is told up front that the destructive action is not
available to it.

## Error responses

| Status | Code | When |
| - | - | - |
| `401` | `UNAUTHORIZED` | Missing, unknown, revoked or expired key |
| `403` | `AGENCY_KEY_REQUIRED` | A workspace key (`tuco_…`) was used |
| `403` | `NOT_AN_AGENCY` | The account behind the key is not an agency |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.