# Collector configuration API reference
> Reference for the Console API Collector configuration endpoint, its response fields and defaults, and the HTTP request headers the Snowplow Collector accepts.
> Source: https://docs.snowplow.io/docs/pipeline/collector/configuration-reference/
> Documentation index: https://docs.snowplow.io/llms.txt

This page describes the Console API endpoint that returns a pipeline's Collector configuration, the fields in its response, and the HTTP request headers the Collector accepts. To view or retrieve the configuration step by step, see [Check your Collector configuration](/docs/pipeline/collector/). For the Self-Hosted Collector's configuration file, see the [Collector configuration options](/docs/api-reference/stream-collector/configure/).

## Parameters

The endpoint takes two path parameters and returns one JSON object.

### Endpoint

`GET https://console.snowplowanalytics.com/api/msc/v1/organizations/{organizationId}/resources/v1/pipelines/{pipelineId}/configuration/collector`

`GET` is the only supported method. Every request needs an `Authorization: Bearer {{token}}` header; [Check your Collector configuration](/docs/pipeline/collector/#get-an-access-token) shows how to get the token. The [API specification](https://console.snowplowanalytics.com/api/msc/v1/docs/index.html?url=/api/msc/v1/docs/docs.yaml#/configuration/getOrganizationsOrganizationidResourcesV1PipelinesPipelineidConfigurationCollector) is the normative definition.

| Name             | Type   | Required | Description                                                                                          |
| ---------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------- |
| `organizationId` | `UUID` | Required | Your organization ID, from the **Manage organization** page in Console.                              |
| `pipelineId`     | `UUID` | Required | The pipeline ID: the second UUID in the browser's address bar when you view the pipeline in Console. |

### Response fields

`cookieDomains`, `paths`, and `cookieAttributes` are always present in the response.

| Name                        | Type                          | Required | Default | Description                                                                                                                   |
| --------------------------- | ----------------------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `cookieDomains`             | `object`                      | Required | None    | The domains the Collector sets cookies for.                                                                                   |
| `cookieDomains.domains`     | `string[]`                    | Required | None    | Domains for which Collector cookies are set. May be an empty list.                                                            |
| `cookieDomains.fallback`    | `string`                      | Optional | `none`  | The fallback cookie domain.                                                                                                   |
| `paths`                     | `object`                      | Required | None    | The request paths the Collector accepts.                                                                                      |
| `paths.post.paths`          | `string[]`                    | Required | None    | Paths that accept Tracker Protocol 2 compatible `POST` requests.                                                              |
| `paths.redirect.enabled`    | `boolean`                     | Required | None    | Whether redirect-based tracking is enabled.                                                                                   |
| `paths.redirect.paths`      | `string[]`                    | Required | None    | Paths that support redirect-based tracking.                                                                                   |
| `paths.webhook.paths`       | `string[]`                    | Required | None    | Paths for events sent in a `GET` or `POST` request with an [Iglu](https://github.com/snowplow/iglu)-compatible event payload. |
| `cookieAttributes`          | `object`                      | Required | None    | Attributes of the Collector cookie.                                                                                           |
| `cookieAttributes.secure`   | `boolean`                     | Required | None    | Whether secure connections are enforced.                                                                                      |
| `cookieAttributes.httpOnly` | `boolean`                     | Required | None    | Whether the cookie is inaccessible to non-HTTP requests.                                                                      |
| `cookieAttributes.sameSite` | `'lax' \| 'none' \| 'strict'` | Required | None    | The cookie's `SameSite` attribute.                                                                                            |
| `blockUnencrypted`          | `boolean`                     | Optional | `false` | Whether the Collector blocks unencrypted traffic.                                                                             |

## Example

A response for a pipeline with one fallback cookie domain and redirect tracking enabled:

```json
{
    "cookieDomains":
    {
        "fallback": "mydomain.com",
        "domains": []
    },
    "paths": {
        "post": {
            "paths": []
        },
        "webhook": {
            "paths": []
        },
        "redirect": {
            "paths": [],
            "enabled": true
        }
    },
    "cookieAttributes": {
        "secure": true,
        "sameSite": "None",
        "httpOnly": false
    },
    "blockUnencrypted": false
}
```

## HTTP request headers

The Collector collects all standard HTTP headers. To add header values to your events, configure the [HTTP header extractor enrichment](/docs/pipeline/enrichments/available-enrichments/http-header-extractor-enrichment/) for the headers you want.

These two headers also change how the Collector handles a request:

| Header         | Allowed values     | Description                                                                                                                                      |
| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Content-Type` | `application/json` | See [MDN Content-Type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type)                                                   |
| `SP-Anonymous` | `*`                | Enables [server-side anonymization](/docs/events/anonymous-tracking/), so the Collector doesn't collect the user's IP address or network user ID |

The Collector also collects the cookies sent in the `Cookie` header. To attach cookie values to your events, use the [cookie extractor enrichment](/docs/pipeline/enrichments/available-enrichments/cookie-extractor-enrichment/).
