---
title: "Update a DEM journey variant"
method: PUT
path: "/api/v2/dem/journeys/variants/{variant_id}"
tags: ["DEM"]
---

# Update a DEM journey variant

`PUT /api/v2/dem/journeys/variants/{variant_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/dem/journeys/variants/{variant_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/dem/journeys/variants/:variant_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update an existing variant of a DEM journey.

## Path parameters

- `variant_id` string, required

## Request body

- DemVariantRequest: Request to create or update a DEM journey variant.
  - `data` DemVariantRequestData, required: Data object for a DEM journey variant request.
    - `attributes` DemVariantAttributes, required: Attributes of a DEM journey variant.
      - `filter` string: An optional RUM query filter to scope this variant.
      - `name` string, required: The name of the variant.
      - `rum_steps` DemRumStep[], required: List of RUM journey steps.
        - `nodes` DemRumNode[], required: List of RUM nodes within a journey step.
          - `app_id` string: The application ID associated with this node.
          - `id` string: The ID of the RUM node element.
          - `query` string, required: The RUM query for matching this node.
        - `type` 'start' | 'stop' | 'step', required: The type of a RUM journey step.
    - `type` 'variants', required: The type identifier for DEM journey variants.

## Response `200`

OK

- DemVariantResponse: Response containing a DEM journey variant.
  - `data` DemVariantResponseData, required: Data object returned for a DEM journey variant.
    - `attributes` DemVariantAttributes, required: Attributes of a DEM journey variant.
      - `filter` string: An optional RUM query filter to scope this variant.
      - `name` string, required: The name of the variant.
      - `rum_steps` DemRumStep[], required: List of RUM journey steps.
        - `nodes` DemRumNode[], required: List of RUM nodes within a journey step.
          - `app_id` string: The application ID associated with this node.
          - `id` string: The ID of the RUM node element.
          - `query` string, required: The RUM query for matching this node.
        - `type` 'start' | 'stop' | 'step', required: The type of a RUM journey step.
    - `id` string, required: The unique identifier of the variant.
    - `type` 'variants', required: The type identifier for DEM journey variants.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
