---
title: "Save a Site Variable"
method: PUT
path: "/api/v1/site/variable"
---

# Save a Site Variable

`PUT /api/v1/site/variable`

## Response `200`

- ResponseHostVariableEntityView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` HostVariable
    - `id` string
    - `hostId` string
    - `name` string
    - `key` string
    - `value` string
    - `lastModifierId` string
    - `lastModDate` string, date-time
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — When a required value is not sent

---

[API](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/anzworldline-solutions/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anzworldline-solutions/dotcms-rest-api/revisions/0f38cbc3bd36/schema)
