---
title: "Update Variant Url"
method: PUT
path: "/variants/{variant_id}/service"
tags: ["Variants"]
---

# Update Variant Url

`PUT /variants/{variant_id}/service`

Updates the URL used in an app variant.

Args:
    variant_id (str): The ID of the app variant to update.
    url (str): The URL to update.

Raises:
    HTTPException: If an error occurs while trying to update the app variant.

Returns:
    JSONResponse: A JSON response indicating whether the update was successful or not.

## Request body

- UpdateVariantURLPayload
  - `url` string, required
  - `variant_id` string, required
  - `commit_message` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-02-13** `72fe88316d15` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2025-06-27** `e3e84db47198` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agenta-ai/apis/agenta-api/changes/variants/:variant_id/service/put.md)

---

[API](https://skmtc.dev/agenta-ai/apis/agenta-api.md) · [All operations](https://skmtc.dev/agenta-ai/apis/agenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agenta-ai/apis/agenta-api/revisions/6d5b448e6a4f?raw)
