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

# List Tags

> Retrieve all tags for your organization

Returns a paginated list of tags belonging to your organization. Use the tag IDs to assign or remove tags from contacts.

## Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication. Found in your dashboard under API settings.
</ParamField>

## Query Parameters

<ParamField query="limit" type="number" default="5">
  Maximum number of tags to return. Must be ≥ 0.
</ParamField>

<ParamField query="offset" type="number" default="0">
  Number of records to skip for pagination.
</ParamField>

<ParamField query="order" type="string" default="desc">
  Sort direction by creation date. Possible values: `asc`, `desc`.
</ParamField>

<ParamField query="name" type="string">
  Filter tags by name (partial match).
</ParamField>

<ParamField query="label" type="string">
  Filter tags by label (partial match).
</ParamField>

## Response

<ResponseField name="data" type="array">
  Array of tag objects.

  <Expandable title="Tag object">
    <ResponseField name="id" type="string">
      Unique identifier of the tag (UUID).
    </ResponseField>

    <ResponseField name="name" type="string">
      The tag name.
    </ResponseField>

    <ResponseField name="color" type="string">
      Hex color code of the tag.
    </ResponseField>

    <ResponseField name="label" type="string">
      Display label of the tag, if set.
    </ResponseField>

    <ResponseField name="organization_id" type="string">
      UUID of the organization that owns this tag.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Timestamp when the tag was created (ISO 8601).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="count" type="number">
  Total number of tags in your organization.
</ResponseField>

## Error Codes

* `401 Unauthorized` — Invalid or missing API key
* `500 Internal Server Error` — Server-side error

## Code Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.contactship.ai/v1/tags" \
    -H "x-api-key: your-api-key"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.contactship.ai/v1/tags', {
    headers: { 'x-api-key': 'your-api-key' },
  });
  const { data, count } = await response.json();
  console.log(`${count} tags found`);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.contactship.ai/v1/tags',
      headers={'x-api-key': 'your-api-key'},
  )

  result = response.json()
  for tag in result['data']:
      print(f"{tag['name']} ({tag['color']}) — id: {tag['id']}")
  ```
</RequestExample>

<ResponseExample>
  ```json Example Response theme={null}
  {
    "data": [
      {
        "id": "tag-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "name": "hot-lead",
        "color": "#FF5733",
        "label": "Hot Lead",
        "organization_id": "org-f1e2d3c4-b5a6-7890-1234-567890abcdef",
        "created_at": "2026-04-05T12:00:00Z"
      },
      {
        "id": "tag-b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "name": "customer",
        "color": "#33FF57",
        "label": "Customer",
        "organization_id": "org-f1e2d3c4-b5a6-7890-1234-567890abcdef",
        "created_at": "2026-03-10T09:00:00Z"
      }
    ],
    "count": 2
  }
  ```
</ResponseExample>
