---
type: api
title: Create a connector
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-post-actions-action
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-post-actions-action
products:
  - Kibana
---

# Create a connector

deprecated

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

## Paths

- `POST` `/api/actions/action`
- `POST` `/s/{space_id}/api/actions/action`

## Description

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

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

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

## Request body

`application/json`

- `actionTypeId` (string) — required
  The connector type identifier.
- `config` (map string to object · default: {}) — optional
- `name` (string) — required
  The display name for the connector.
- `secrets` (map string to object · default: {}) — optional

## Response

Indicates a successful call.

`application/json`

- `config` (map string to object)
- `connector_type_id` (string)
  The connector type identifier.
- `id` (string)
  The identifier for the connector.
- `is_deprecated` (boolean)
  Indicates whether the connector is deprecated.
- `is_missing_secrets` (boolean)
  Indicates whether the connector is missing secrets.
- `is_preconfigured` (boolean)
  Indicates whether the connector is preconfigured. If true, the `config` and `is_missing_secrets` properties are omitted from the response.
- `is_system_action` (boolean)
  Indicates whether the connector is used for system actions.
- `name` (string)
   The name of the rule.
## Code examples

#### Console

```console
POST kbn:/api/actions/action
{
  "actionTypeId": "string",
  "name": "string"
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/actions/action" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "actionTypeId": "string",
    "name": "string"
  }'
```

