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

# Configure user segments

Modify how user segments are considered by Kevel Forecast by associating a forecast type.
Currently, the only type of user segments that can be defined is "static".

Typically, Kevel Forecast considers the user's segment membership as it existed at the time of the historical Ad Request.
Setting a user segment as static will cause Kevel Forecast to consider its membership as the result of the ingested files.
These segments can be targeted by user segment targeting rules.

The keys of the JSON object must be the numeric segment IDs (as strings). Entries with non-numeric keys are rejected.

Note that this endpoint fully replaces the existing set, so to remove all types association send an empty JSON object.
See [Static Audiences](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/settings": {
      "post": {
        "tags": [
          "Static Audiences"
        ],
        "summary": "Configure user segments",
        "description": "Modify how user segments are considered by Kevel Forecast by associating a forecast type.\nCurrently, the only type of user segments that can be defined is \"static\".\n\nTypically, Kevel Forecast considers the user's segment membership as it existed at the time of the historical Ad Request.\nSetting a user segment as static will cause Kevel Forecast to consider its membership as the result of the ingested files.\nThese segments can be targeted by user segment targeting rules.\n\nThe keys of the JSON object must be the numeric segment IDs (as strings). Entries with non-numeric keys are rejected.\n\nNote that this endpoint fully replaces the existing set, so to remove all types association send an empty JSON object.\nSee [Static Audiences](ref:static-audiences) for more details on this feature.\n",
        "requestBody": {
          "description": "The JSON object with user segment IDs and their type.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "string",
                  "enum": [
                    "static"
                  ]
                },
                "example": {
                  "10": "static",
                  "42": "static"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Normal response, containing a JSON object with a status code and message.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "success",
                        "error"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "Descriptive message of result of the operation.",
                      "example": "Saved all static user segments successfully"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Adzerk-ApiKey"
      }
    }
  }
}
```