---
title: "Static user segments ingest URL"
method: POST
path: "/forecaster/udb/segments/ingest-url"
tags: ["Static Audiences"]
---

# Static user segments ingest URL

`POST /forecaster/udb/segments/ingest-url`

## Request

- Base URL: `https://api.kevel.co/v1`
- URL: `https://api.kevel.co/v1/forecaster/udb/segments/ingest-url`
- Auth: API key in header `X-Adzerk-ApiKey`

This endpoint allows you to push static audiences, represented by user segments, directly to Kevel Forecast.
When you create a new ingest URL, we'll give you back a signed URL for an Amazon S3 bucket.

The file needs to be in [JSON Lines](https://jsonlines.org/) format, containing an entry per user with the following format:

```{"userKey": <user-key>, "segments": <array-of-segment-ids>}```

For example:

```{"userKey": "1234", "segments": [10, 42]}```

To reduce the size of file transfers, Kevel recommends delivering the file gzipped. With this compression, the file extension must end in `gz` or `gzip`, e.g., `static-audiences.jsonl.gz`.

All user segments found in the file will be considered and saved as static. See the [Configure user segments endpoint](ref:post_forecaster-udb-segments-settings) for more details on how to manage the set of static audiences and [Static Audiences page](ref:static-audiences) for more details on this feature.

## Request body

- object
  - `filename` string: The name of the file to be pushed to the ingest URL.

## Response `200`

Normal response, containing a JSON object with the signed Amazon S3 URL

- object
  - `url` string: The signed URL for the Amazon S3 Bucket to where the file can be uploaded.
  - `status` string: A fully-formed URL you can `GET` to track the ingestion status of this upload. The URL points at `/forecaster/udb/ingest-status` with the appropriate `type` and `file` query parameters already filled in.

---

[API](https://skmtc.dev/kevel/apis/forecast-api.md) - [All operations](https://skmtc.dev/kevel/apis/forecast-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kevel/apis/forecast-api/revisions/f07c8784a32d?raw)
