---
type: api
title: Add parameters
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-parameters
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-parameters
products:
  - Kibana
---

# Add parameters

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/synthetics/params`
- `POST` `/s/{space_id}/api/synthetics/params`

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Add one or more parameters to the Synthetics app.

You must have `all` privileges for the Synthetics feature in the Observability section of the Kibana feature privileges.

## Required authorization

- Privileges: `uptime-read` and `uptime-write`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

Any of:
- **[]Single parameter**
  - `description` (string · max length: 4096) — optional
    A description of the parameter.
  - `key` (string · min length: 1 · max length: 1024) — required
    The key of the parameter.
  - `share_across_spaces` (boolean) — optional
    Specify whether the parameter should be shared across spaces.
  - `tags` (string[] · max items: 100) — optional
    An array of tags to categorize the parameter.
  - `value` (string · min length: 1 · max length: 1000000) — required
    The value associated with the parameter.
- **Single parameter**
  - `description` (string · max length: 4096) — optional
    A description of the parameter.
  - `key` (string · min length: 1 · max length: 1024) — required
    The key of the parameter.
  - `share_across_spaces` (boolean) — optional
    Specify whether the parameter should be shared across spaces.
  - `tags` (string[] · max items: 100) — optional
    An array of tags to categorize the parameter.
  - `value` (string · min length: 1 · max length: 1000000) — required
    The value associated with the parameter.

## Responses

#### `200`

A successful response.

`application/json`

One of:
- **[]Post parameter response**
  - `description` (string)
    A description of the parameter.
  - `id` (string)
    The unique identifier for the parameter.
  - `key` (string)
    The parameter key.
  - `share_across_spaces` (boolean)
    Indicates whether the parameter is shared across spaces.
  - `tags` (string[])
    An array of tags associated with the parameter.
  - `value` (string)
    The value associated with the parameter.
- **Post parameter response**
  - `description` (string)
    A description of the parameter.
  - `id` (string)
    The unique identifier for the parameter.
  - `key` (string)
    The parameter key.
  - `share_across_spaces` (boolean)
    Indicates whether the parameter is shared across spaces.
  - `tags` (string[])
    An array of tags associated with the parameter.
  - `value` (string)
    The value associated with the parameter.
#### `409`

A parameter with the same key already exists in the space.

## Code examples

#### Console

```console
POST kbn://api/synthetics/params
{"key":"your-key-name","value":"your-parameter-value","description":"Param to use in browser monitor","tags":["authentication","security"],"share_across_spaces":true}
```

#### curl

```curl
curl \
  -X POST "${KIBANA_URL}/api/synthetics/params" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{"key":"your-key-name","value":"your-parameter-value","description":"Param to use in browser monitor","tags":["authentication","security"],"share_across_spaces":true}'
```

## Response examples

#### Single parameter

A successful response for a single added parameter.

```json
{
  "description": "Param to use in browser monitor",
  "id": "unique-parameter-id",
  "key": "your-key-name",
  "share_across_spaces": true,
  "tags": [
    "authentication",
    "security"
  ],
  "value": "your-param-value"
}
```

#### Multiple parameters

A successful response for multiple added parameters.

```json
[
  {
    "id": "param1-id",
    "key": "param1",
    "value": "value1"
  },
  {
    "id": "param2-id",
    "key": "param2",
    "value": "value2"
  }
]
```

