---
title: "[BETA] Update an existing context field"
method: PUT
path: "/api/admin/projects/{projectId}/context/{contextField}"
tags: ["Context"]
---

# [BETA] Update an existing context field

`PUT /api/admin/projects/{projectId}/context/{contextField}`

**[BETA]** This API is in beta state, which means it may change or be removed in the future.

Endpoint that allows updating a custom context field. Used to toggle stickiness and add/remove legal values for this context field

## Path parameters

- `projectId` string, required
- `contextField` string, required

## Request body

- UpdateContextFieldSchema — Data to update an existing context field configuration.
  - `description` string — A description of the context field
  - `stickiness` boolean — `true` if this field should be available for use with [custom stickiness](https://docs.getunleash.io/concepts/stickiness#custom-stickiness), otherwise `false`
  - `sortOrder` integer — How this context field should be sorted if no other sort order is selected
  - `legalValues` LegalValueSchema[] — A list of allowed values for this context field
    - `value` string, required — The valid value
    - `description` string — Describes this specific legal value
  - `project` string — The project this context field belongs to (if it is project-specific)

## Response `200`

This response has no body.

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/revisions/b2c3116e633e/schema)
