---
title: "POST /api/v1/config/trace-behavior-config"
method: POST
path: "/api/v1/config/trace-behavior-config"
tags: ["TraceBehaviorConfig"]
---

# POST /api/v1/config/trace-behavior-config

`POST /api/v1/config/trace-behavior-config`

## Request body

- Configv1CreateTraceBehaviorConfigRequest
  - `dry_run` boolean — If `true`, validates the specified configuration without creating the TraceBehaviorConfig. If the specified configuration is valid, the endpoint returns a partial response without the TraceBehaviorConfig. If the specified configuration is invalid, the endpoint returns an error.
  - `trace_behavior_config` Configv1TraceBehaviorConfig — TraceBehaviorConfig is a singleton configuration object that specifies the configuration for trace behaviors.
    - `baseline_behavior_slug` string — The baseline behavior to use for behavior assignments and base head sampling rates.
    - `created_at` string, date-time — Timestamp of when the TraceBehaviorConfig was created. Cannot be set by clients.
    - `dataset_priorities` string[] — List of dataset priorities. This list specifies the order in which datasets are considered when determining the behavior to follow for a trace. Dataset priorities are used to break ties when a trace matches more than one dataset with an active behavior. * Each entry in this list must refer to the slug of an existing dataset. * The order of the list is the order in which the datasets are considered. * The list must contain all datasets referenced in either `main_behavior_assignments` or `override_behavior_assignments`. * The list can contain datasets that are not referenced in either of these assignments.
    - `main_behavior_assignments` TraceBehaviorConfigMainBehaviorAssignment[] — List of assignments for the main behavior. The referenced datasets will be enrolled in behaviors. The referenced behaviors are the active behaviors for the dataset when there is no active override. Only one main behavior can be assigned to a dataset. See the documentation for [customizing your sampling strategy](https://docs.chronosphere.io/control/shaping/sample-traces/behaviors#customize-your-sampling-strategy) for more information.
      - `behavior_slug` string — The slug reference of a trace behavior.
      - `created_at` string, date-time — The timestamp of when the trace behavior was created.
      - `created_by` string — The author or creator of the behavior assignment.
      - `dataset_slug` string — The slug reference of a trace dataset.
      - `description` string — A description of the behavior assignment.
      - `updated_at` string, date-time — The timestamp of when the trace behavior was updated.
    - `override_behavior_assignments` TraceBehaviorConfigOverrideBehaviorAssignment[] — List of assignments for the override behavior. These assignments specify the active behavior for a dataset over a specific time range. Only one override behavior can be assigned to a dataset.
      - `behavior_slug` string — The slug reference of a trace behavior.
      - `created_at` string, date-time — The timestamp of when the override behavior assignment was created.
      - `created_by` string — The author or creator of the override.
      - `dataset_slug` string — The slug reference of a trace dataset.
      - `description` string — A description of the override.
      - `end_time` string, date-time — The ending time of the override.
      - `start_time` string, date-time — The starting time of the override.
      - `updated_at` string, date-time — The timestamp of when the override behavior assignment was updated.
    - `preview_behavior_assignments` TraceBehaviorConfigOverrideBehaviorAssignment[] — List of assignments for the preview behavior. The referenced behaviors are in preview mode for the assigned dataset. You can assign only one preview behavior to a dataset.
      - `behavior_slug` string — The slug reference of a trace behavior.
      - `created_at` string, date-time — The timestamp of when the override behavior assignment was created.
      - `created_by` string — The author or creator of the override.
      - `dataset_slug` string — The slug reference of a trace dataset.
      - `description` string — A description of the override.
      - `end_time` string, date-time — The ending time of the override.
      - `start_time` string, date-time — The starting time of the override.
      - `updated_at` string, date-time — The timestamp of when the override behavior assignment was updated.
    - `updated_at` string, date-time — Timestamp of when the TraceBehaviorConfig was last updated. Cannot be set by clients.

## Response `200`

A successful response containing the created TraceBehaviorConfig.

- Configv1CreateTraceBehaviorConfigResponse
  - `trace_behavior_config` Configv1TraceBehaviorConfig — TraceBehaviorConfig is a singleton configuration object that specifies the configuration for trace behaviors.
    - `baseline_behavior_slug` string — The baseline behavior to use for behavior assignments and base head sampling rates.
    - `created_at` string, date-time — Timestamp of when the TraceBehaviorConfig was created. Cannot be set by clients.
    - `dataset_priorities` string[] — List of dataset priorities. This list specifies the order in which datasets are considered when determining the behavior to follow for a trace. Dataset priorities are used to break ties when a trace matches more than one dataset with an active behavior. * Each entry in this list must refer to the slug of an existing dataset. * The order of the list is the order in which the datasets are considered. * The list must contain all datasets referenced in either `main_behavior_assignments` or `override_behavior_assignments`. * The list can contain datasets that are not referenced in either of these assignments.
    - `main_behavior_assignments` TraceBehaviorConfigMainBehaviorAssignment[] — List of assignments for the main behavior. The referenced datasets will be enrolled in behaviors. The referenced behaviors are the active behaviors for the dataset when there is no active override. Only one main behavior can be assigned to a dataset. See the documentation for [customizing your sampling strategy](https://docs.chronosphere.io/control/shaping/sample-traces/behaviors#customize-your-sampling-strategy) for more information.
      - `behavior_slug` string — The slug reference of a trace behavior.
      - `created_at` string, date-time — The timestamp of when the trace behavior was created.
      - `created_by` string — The author or creator of the behavior assignment.
      - `dataset_slug` string — The slug reference of a trace dataset.
      - `description` string — A description of the behavior assignment.
      - `updated_at` string, date-time — The timestamp of when the trace behavior was updated.
    - `override_behavior_assignments` TraceBehaviorConfigOverrideBehaviorAssignment[] — List of assignments for the override behavior. These assignments specify the active behavior for a dataset over a specific time range. Only one override behavior can be assigned to a dataset.
      - `behavior_slug` string — The slug reference of a trace behavior.
      - `created_at` string, date-time — The timestamp of when the override behavior assignment was created.
      - `created_by` string — The author or creator of the override.
      - `dataset_slug` string — The slug reference of a trace dataset.
      - `description` string — A description of the override.
      - `end_time` string, date-time — The ending time of the override.
      - `start_time` string, date-time — The starting time of the override.
      - `updated_at` string, date-time — The timestamp of when the override behavior assignment was updated.
    - `preview_behavior_assignments` TraceBehaviorConfigOverrideBehaviorAssignment[] — List of assignments for the preview behavior. The referenced behaviors are in preview mode for the assigned dataset. You can assign only one preview behavior to a dataset.
      - `behavior_slug` string — The slug reference of a trace behavior.
      - `created_at` string, date-time — The timestamp of when the override behavior assignment was created.
      - `created_by` string — The author or creator of the override.
      - `dataset_slug` string — The slug reference of a trace dataset.
      - `description` string — A description of the override.
      - `end_time` string, date-time — The ending time of the override.
      - `start_time` string, date-time — The starting time of the override.
      - `updated_at` string, date-time — The timestamp of when the override behavior assignment was updated.
    - `updated_at` string, date-time — Timestamp of when the TraceBehaviorConfig was last updated. Cannot be set by clients.

## Other responses

- `400` — Cannot create the TraceBehaviorConfig because the request is invalid.
- `409` — Cannot create the TraceBehaviorConfig because there is a conflict with an existing TraceBehaviorConfig.
- `500` — An unexpected error response.
- `default` — An undefined error response.

---

[API](https://skmtc.dev/chronosphere/apis/data-v1-api.md) · [All operations](https://skmtc.dev/chronosphere/apis/data-v1-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/chronosphere/data-v1-api/revisions/ee91fd539ced/schema)
