---
title: "appends a slider component"
method: POST
path: "/api/notebook/appendSliderVariable"
---

# appends a slider component

`POST /api/notebook/appendSliderVariable`

appends a slider component into the notebook. The user will be able to change that value by playing with the slider. The value of the slider can be used in code using the given variable name.

## Query parameters

- `notebookId` string, required

## Request body

- object
  - `variableName` string, required — the name of the variable for this slider. Should be unique and have no spaces or weird characters.
  - `initialValue` number, required — the initial value for this slider
  - `unit` string — the unit of the value. Can be something like "USD per month", "GBP", "bananas", "bananas per minute", etc.
  - `min` number — the minimum value this slider accepts
  - `max` number — the maximum value this slider accepts
  - `step` number — the step at which the user can change the value

## Response `200`

Ok

- object
  - `result` unknown
  - `notebookErrors` unknown[]
    - unknown

## Changes

- **2023-11-27** `c2d57e621a13` — 8 breaking, 2 info
  - the request property `initialValue` became required
  - the request property `variableName` became required
  - the `initialValue` request property type/format changed from ``/`` to `number`/``
  - the `max` request property type/format changed from ``/`` to `number`/``
  - …6 more
- **2023-11-23** `1e239422074b` — 1 info
  - added the new optional request property `unit`
- **2023-11-20** `ee7eb73634d2` — 5 breaking, 1 warning, 2 info
  - the `initialValue` request property type/format changed from `number`/`` to ``/``
  - the `max` request property type/format changed from `number`/`` to ``/``
  - the `min` request property type/format changed from `number`/`` to ``/``
  - the `step` request property type/format changed from `number`/`` to ``/``
  - …4 more
- **2023-11-19** `35c27bb79744` — 3 warning, 2 info
  - removed the optional property `createdElementId` from the response with the `200` status
  - removed the optional property `createdElementName` from the response with the `200` status
  - removed the optional property `createdElementType` from the response with the `200` status
  - added the optional property `notebookErrors` to the response with the `200` status
  - …1 more
- **2023-11-08** `d0f9de8761ec` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/decipad/apis/create-and-modify-a-decipad-notebook/changes/api/notebook/appendSliderVariable/post.md)

---

[API](https://skmtc.dev/decipad/apis/create-and-modify-a-decipad-notebook.md) · [All operations](https://skmtc.dev/decipad/apis/create-and-modify-a-decipad-notebook/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/decipad/create-and-modify-a-decipad-notebook/revisions/5f77d79b504f/schema)
