---
updatedAt: 2026-05-21T11:01:21.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Static user segments ingest URL

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.


# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Forecast API",
    "description": "The Kevel Forecast API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.kevel.co/v1"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/forecaster/udb/segments/ingest-url": {
      "post": {
        "tags": [
          "Static Audiences"
        ],
        "summary": "Static user segments ingest URL",
        "description": "This endpoint allows you to push static audiences, represented by user segments, directly to Kevel Forecast.\nWhen you create a new ingest URL, we'll give you back a signed URL for an Amazon S3 bucket.\n\nThe file needs to be in [JSON Lines](https://jsonlines.org/) format, containing an entry per user with the following format:\n\n```{\"userKey\": <user-key>, \"segments\": <array-of-segment-ids>}```\n\nFor example:\n\n```{\"userKey\": \"1234\", \"segments\": [10, 42]}```\n\nTo 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`.\n\nAll user segments found in the file will be considered and saved as static. See the [Configure user segments endpoint](https://dev.kevel.com/reference/post_forecaster-udb-segments-settings) for more details on how to manage the set of static audiences and [Static Audiences page](https://dev.kevel.com/reference/static-audiences) for more details on this feature.\n",
        "requestBody": {
          "description": "The JSON object with name of the file to be uploaded",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "The name of the file to be pushed to the ingest URL.\n"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Normal response, containing a JSON object with the signed Amazon S3 URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "The signed URL for the Amazon S3 Bucket to where the file can be uploaded.\n"
                    },
                    "status": {
                      "type": "string",
                      "description": "A fully-formed URL you can `GET` to track the ingestion status of this upload. The URL points\nat `/forecaster/udb/ingest-status` with the appropriate `type` and `file` query parameters\nalready filled in.\n"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Adzerk-ApiKey"
      }
    }
  }
}
````