---
title: "Update Contact Variables"
method: PATCH
path: "/v1/contacts/{contact_id}/variables"
tags: ["contacts"]
---

# Update Contact Variables

`PATCH /v1/contacts/{contact_id}/variables`

Merge variables into a contact's and/or its account's variables.

Upsert semantics: provided keys are written, other keys are kept. If
the contact's company is not yet linked to your organization, the
account is created so the account variables can be stored.

Each scope holds at most 200 variables. A null value clears the
variable but keeps the key counting toward the limit; use the DELETE
endpoint to remove a key and free its slot.

Account variables can also be managed directly through
`/v1/accounts/{account_id}/variables`.

Requires the `contacts:write` scope on the API key.

## Path parameters

- `contact_id` string, uuid, required

## Request body

- PublicUpdateContactVariablesInput
  - `contact_variables` object, nullable — Variables to merge into the contact's variables. Existing keys are overwritten.
  - `account_variables` object, nullable — Variables to merge into the account's variables. Existing keys are overwritten.

## Response `200`

Successful Response

- PublicContactVariablesOutput
  - `contact_variables` object, required — Custom variables stored on the contact for this workspace.
  - `account_variables` object, required — Custom variables stored on the contact's account for this workspace. Also manageable through the Account variables endpoints.

---

[API](https://skmtc.net/topo/apis/topo-public-api.md) · [All operations](https://skmtc.net/topo/apis/topo-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/topo/topo-public-api/versions/6e9ca9d5acac/schema)
