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

# Add parameters

Authentication: required

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

## Paths

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

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Description

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.

## Request body

The request body can contain either a single parameter object or an array of parameter objects.

`application/json`

One of:
- **[]Parameter request**
  - `description` (string) — optional
    A description of the parameter.
  - `key` (string) — required
    The key of the parameter.
  - `share_across_spaces` (boolean) — optional
    Specify whether the parameter should be shared across spaces.
  - `tags` (string[]) — optional
    An array of tags to categorize the parameter.
  - `value` (string) — required
    The value associated with the parameter.
- **Parameter request**
  - `description` (string) — optional
    A description of the parameter.
  - `key` (string) — required
    The key of the parameter.
  - `share_across_spaces` (boolean) — optional
    Specify whether the parameter should be shared across spaces.
  - `tags` (string[]) — optional
    An array of tags to categorize the parameter.
  - `value` (string) — required
    The value associated with the parameter.

## Response

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.
## 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 "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

`application/json`

A successful response for a single added parameter.

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

#### Multiple parameters

`application/json`

A successful response for multiple added parameters.

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

