---
title: "POST /device/strategy/vars/strings/{stringName}"
method: POST
path: "/device/strategy/vars/strings/{stringName}"
tags: ["all", "vars"]
---

# POST /device/strategy/vars/strings/{stringName}

`POST /device/strategy/vars/strings/{stringName}`

Sets the value of a string variable

## Path parameters

- `stringName` string, required

## Request body

- StringValueObject
  - `value` string — The value of a string; string width (max length) for each string variable is defined in the strategy

## Response `200`

OK - but check details for any error messages

- ErrorResponse200OKish
  - `errorCode` integer, required — Details: ** -23 ** The string you passed is longer than the width of PAC Control string variable or table element you are writing to.
  - `message` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/opto22/apis/pac.md) · [All operations](https://skmtc.net/opto22/apis/pac/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opto22/pac/versions/2288d966c8f4/schema)
