# Update a context (/api-reference/contexts/update-a-context)

Update the data of an existing context.
      **type** and **id** are required fields, **data** is required. Only the data field is updated, the rest of the context is not affected.
      If the context does not exist, it returns the 404 response

{/* This file was generated by scripts\/generate-docs.mjs. Do not edit this file directly. Regenerate with pnpm run build:docs. */}

<APIPage document={"content/openapi/novu-spec.json"} operations={[{"path":"/v2/contexts/{type}/{id}","method":"patch"}]} webhooks={[]} hasHead={false} />
