---
title: "Add Variable"
method: POST
path: "/compute/script/{id}/variables/add"
tags: ["Variable"]
---

# Add Variable

`POST /compute/script/{id}/variables/add`

## Path parameters

- `id` integer, required

## Request body

- AddEdgeScriptVariableModel
  - `Name` string, required
  - `Required` boolean, required
  - `DefaultValue` string, nullable

## Response `200`

The script with the requested ID

- EdgeScriptVariableModel
  - `Id` integer
  - `Name` string, nullable
  - `Required` boolean
  - `DefaultValue` string, nullable

## Other responses

- `401` — The request authorization failed
- `404` — The script with the requested ID does not exist.
- `500` — Internal Server Error

---

[API](https://skmtc.net/bunny/apis/bunny-net-cdn-logging.md) · [All operations](https://skmtc.net/bunny/apis/bunny-net-cdn-logging/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bunny/bunny-net-cdn-logging/versions/9e622620664b/schema)
