---
title: "Update a URL variable"
method: PUT
path: "/api/v4/hooks/{hook_id}/url_variables/{key}"
tags: ["hooks"]
---

# Update a URL variable

`PUT /api/v4/hooks/{hook_id}/url_variables/{key}`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/hooks/{hook_id}/url_variables/{key}`
- Auth: none declared

Updates a URL variable for a specified webhook.

## Path parameters

- `hook_id` integer, required
- `key` string, required

## Request body

- PutApiV4HooksHookIdUrlVariablesKey: Update a URL variable
  - `value` string, required: The value of the variable

## Response `200`

Update a URL variable

---

[API](https://skmtc.dev/gitlab/apis/gitlab-api.md) - [All operations](https://skmtc.dev/gitlab/apis/gitlab-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitlab/apis/gitlab-api/revisions/b234947ef3f2?raw)
