# Update a context

Update a context by specifying a `sitecoreContextId`. Updating a context, you update the context definition without creating a new context (for example, you can adjust the access time.

Endpoint: PATCH /api/context/user/v1/contexts/{sitecoreContextId}
Version: 1.0
Security: BearerAuth

## Security:

  - `BearerAuth` (unknown)
    http bearer JWT

## Path parameters:

  - `sitecoreContextId` (string, required)
    Sitecore Context ID

## Request fields (application/json):

  - `name` (string)
    Example: My Context

  - `description` (string)
    Example: This is my context

## Response 202:

  - `202` (unknown)
    Successful operation

## Response 202 fields (application/json):

  - `organizationId` (string, required)
    Example: org_123ABC

  - `sitecoreContextId` (string, required)
    Example: f9c3b17d181640efbbf3ae670311452d

  - `allowTracing` (string, required)
    Example: false

  - `type` (string, required)
    Example: custom

  - `accountId` (string, required)
    Example: account001

  - `resources` (array)

  - `resources.id` (string, required)
    Example: SitecoreSearchResource

  - `resources.name` (string, required)
    Example: My Sitecore search resource

  - `resources.type` (string, required)
    Example: search

  - `resources.tenantId` (string, required)
    Example: g6c3b17d-1816-40ef-bbf3-ae670311452c

  - `resources.properties` (array, required)

  - `resources.properties.id` (string, required)
    Property id
    Example: POS

  - `resources.properties.value` (string, required)
    Property value
    Example: playwebsite

  - `resources.tenantName` (string, required)
    Example: tenant name

  - `resources.tenantProductCode` (string, required)
    Example: Search

  - `name` (string)
    Example: My Context

  - `description` (string)
    Example: This is my context

  - `createdAt` (string)
    Example: 2025-09-22T01:00:00Z

  - `updatedAt` (string)
    Example: 2025-09-22T01:00:00Z

## Response 401:

  - `401` (unknown)
    Unauthorized request or invalid access token

## Response 401 fields (application/json):

  - `title` (string, required)
    Example: Unauthorized

  - `type` (string, required)
    Example: Unauthorized

  - `instance` (string, required)
    Example: /v1/context

  - `status` (integer, required)
    Example: 500

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `title` (string, required)
    Example: Unauthorized

  - `type` (string, required)
    Example: Unauthorized

  - `instance` (string, required)
    Example: /v1/context

  - `status` (integer, required)
    Example: 500

## Response 412:

  - `412` (unknown)
    Precondition Failed

## Response 412 fields (application/json):

  - `title` (string, required)
    Example: Unauthorized

  - `type` (string, required)
    Example: Unauthorized

  - `instance` (string, required)
    Example: /v1/context

  - `status` (integer, required)
    Example: 500

## Response 422:

  - `422` (unknown)
    Unprocessable

## Response 422 fields (application/json):

  - `title` (string, required)
    Example: Unauthorized

  - `type` (string, required)
    Example: Unauthorized

  - `instance` (string, required)
    Example: /v1/context

  - `status` (integer, required)
    Example: 500

## Response 500:

  - `500` (unknown)
    Server-side exception during request execution

## Response 500 fields (application/json):

  - `title` (string, required)
    Example: Unauthorized

  - `type` (string, required)
    Example: Unauthorized

  - `instance` (string, required)
    Example: /v1/context

  - `status` (integer, required)
    Example: 500

