---
type: api
title: Create output
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-post-fleet-outputs
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-post-fleet-outputs
products:
  - Kibana
---

# Create output

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

## Paths

- `POST` `/api/fleet/outputs`
- `POST` `/s/{space_id}/api/fleet/outputs`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/authentication#apikeyauth)

## Description

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

Create a new Fleet output.<br/><br/>[Required authorization] Route required privileges: fleet-settings-all.

## Request Body

`application/json`

One of:
- **Kibana_HTTP_APIs_new_output_elasticsearch** (`type: elasticsearch`)
  - `allow_edit` ([] string · max: 1000) — optional
  - `ca_sha256` (string) — optional — nullable
  - `ca_trusted_fingerprint` (string) — optional — nullable
  - `config_yaml` (string) — optional — nullable
  - `hosts` ([] string · min: 1 · max: 100) — required
  - `id` (string) — optional
  - `is_default` (boolean · default: false) — optional
  - `is_default_monitoring` (boolean · default: false) — optional
  - `is_internal` (boolean) — optional
  - `is_preconfigured` (boolean) — optional
  - `name` (string) — required
  - `otel_disable_beatsauth` (boolean) — optional — nullable
  - `otel_exporter_config_yaml` (string) — optional — nullable
  - `preset` (enum) — optional
    Values: `balanced`, `custom`, `throughput`, `scale`, `latency`
  - `proxy_id` (string) — optional — nullable
  - `secrets` (object) — optional
    - `ssl` (object) — optional
      - `key` (union anyOf) — optional
        - **{ id, hash }**
          - `hash` (string) — optional
          - `id` (string) — required
        - **string**
  - `shipper` ({}) — optional
    - `compression_level` (number · default: null) — optional — nullable
    - `disk_queue_compression_enabled` (boolean · default: null) — optional — nullable
    - `disk_queue_enabled` (boolean · default: null) — optional — nullable
    - `disk_queue_encryption_enabled` (boolean · default: null) — optional — nullable
    - `disk_queue_max_size` (number · default: null) — optional — nullable
    - `disk_queue_path` (string · default: null) — optional — nullable
    - `loadbalance` (boolean · default: null) — optional — nullable
    - `max_batch_bytes` (number · default: null) — optional — nullable
    - `mem_queue_events` (number · default: null) — optional — nullable
    - `queue_flush_timeout` (number · default: null) — optional — nullable
  - `ssl` ({}) — optional
    - `certificate` (string) — optional
    - `certificate_authorities` ([] string · max: 10) — optional
    - `key` (string) — optional
    - `verification_mode` (enum) — optional
      Values: `full`, `none`, `certificate`, `strict`
  - `type` (enum) — required
    Values: `elasticsearch`
  - `write_to_logs_streams` (boolean) — optional — nullable
- **Kibana_HTTP_APIs_new_output_remote_elasticsearch** (`type: remote_elasticsearch`)
  - `allow_edit` ([] string · max: 1000) — optional
  - `ca_sha256` (string) — optional — nullable
  - `ca_trusted_fingerprint` (string) — optional — nullable
  - `config_yaml` (string) — optional — nullable
  - `hosts` ([] string · min: 1 · max: 100) — required
  - `id` (string) — optional
  - `is_default` (boolean · default: false) — optional
  - `is_default_monitoring` (boolean · default: false) — optional
  - `is_internal` (boolean) — optional
  - `is_preconfigured` (boolean) — optional
  - `kibana_api_key` (string) — optional — nullable
  - `kibana_url` (string) — optional — nullable
  - `name` (string) — required
  - `otel_disable_beatsauth` (boolean) — optional — nullable
  - `otel_exporter_config_yaml` (string) — optional — nullable
  - `preset` (enum) — optional
    Values: `balanced`, `custom`, `throughput`, `scale`, `latency`
  - `proxy_id` (string) — optional — nullable
  - `secrets` (object) — optional
    - `service_token` (union anyOf) — optional
      - **{ id, hash }**
        - `hash` (string) — optional
        - `id` (string) — required
      - **string**
    - `ssl` (object) — optional
      - `key` (union anyOf) — optional
        - **{ id, hash }**
          - `hash` (string) — optional
          - `id` (string) — required
        - **string**
  - `service_token` (string) — optional — nullable
  - `shipper` ({}) — optional
    Same fields as `shipper` in `Kibana_HTTP_APIs_new_output_elasticsearch`
  - `ssl` ({}) — optional
    - `certificate` (string) — optional
    - `certificate_authorities` ([] string · max: 10) — optional
    - `key` (string) — optional
    - `verification_mode` (enum) — optional
      Values: `full`, `none`, `certificate`, `strict`
  - `sync_integrations` (boolean) — optional
  - `sync_uninstalled_integrations` (boolean) — optional
  - `type` (enum) — required
    Values: `remote_elasticsearch`
  - `write_to_logs_streams` (boolean) — optional — nullable
- **Kibana_HTTP_APIs_new_output_logstash** (`type: logstash`)
  - `allow_edit` ([] string · max: 1000) — optional
  - `ca_sha256` (string) — optional — nullable
  - `ca_trusted_fingerprint` (string) — optional — nullable
  - `config_yaml` (string) — optional — nullable
  - `hosts` ([] string · min: 1 · max: 100) — required
  - `id` (string) — optional
  - `is_default` (boolean · default: false) — optional
  - `is_default_monitoring` (boolean · default: false) — optional
  - `is_internal` (boolean) — optional
  - `is_preconfigured` (boolean) — optional
  - `name` (string) — required
  - `otel_disable_beatsauth` (boolean) — optional — nullable
  - `otel_exporter_config_yaml` (string) — optional — nullable
  - `proxy_id` (string) — optional — nullable
  - `secrets` (object) — optional
    - `ssl` (object) — optional
      - `key` (union anyOf) — optional
        - **{ id, hash }**
          - `hash` (string) — optional
          - `id` (string) — required
        - **string**
  - `shipper` ({}) — optional
    Same fields as `shipper` in `Kibana_HTTP_APIs_new_output_elasticsearch`
  - `ssl` ({}) — optional
    - `certificate` (string) — optional
    - `certificate_authorities` ([] string · max: 10) — optional
    - `key` (string) — optional
    - `verification_mode` (enum) — optional
      Values: `full`, `none`, `certificate`, `strict`
  - `type` (enum) — required
    Values: `logstash`
- **Kibana_HTTP_APIs_new_output_kafka** (`type: kafka`)
  - `allow_edit` ([] string · max: 1000) — optional
  - `auth_type` (enum) — required
    Values: `none`, `user_pass`, `ssl`, `kerberos`
  - `broker_timeout` (number) — optional
  - `ca_sha256` (string) — optional — nullable
  - `ca_trusted_fingerprint` (string) — optional — nullable
  - `client_id` (string) — optional
  - `compression` (enum) — optional
    Values: `gzip`, `snappy`, `lz4`, `none`
  - `compression_level` (number) — optional — nullable
  - `config_yaml` (string) — optional — nullable
  - `connection_type` (enum) — optional
    Values: `plaintext`, `encryption`
  - `hash` (object) — optional
    - `hash` (string) — optional
    - `random` (boolean) — optional
  - `headers` ([] object · max: 100) — optional
    - `key` (string) — required
    - `value` (string) — required
  - `hosts` ([] string · min: 1 · max: 100) — required
  - `id` (string) — optional
  - `is_default` (boolean · default: false) — optional
  - `is_default_monitoring` (boolean · default: false) — optional
  - `is_internal` (boolean) — optional
  - `is_preconfigured` (boolean) — optional
  - `key` (string) — optional
  - `name` (string) — required
  - `otel_disable_beatsauth` (boolean) — optional — nullable
  - `otel_exporter_config_yaml` (string) — optional — nullable
  - `partition` (enum) — optional
    Values: `random`, `round_robin`, `hash`
  - `password` (string) — optional — nullable
  - `proxy_id` (string) — optional — nullable — deprecated
    Kafka outputs do not support proxy configuration. This field is accepted for backwards compatibility but is ignored — it is cleared to null on save and has no effect on the compiled agent policy.
  - `random` (object) — optional
    - `group_events` (number) — optional
  - `required_acks` (enum) — optional
    Values: `1`, `0`, `-1`
  - `round_robin` (object) — optional
    - `group_events` (number) — optional
  - `sasl` (object) — optional — nullable
    - `mechanism` (enum) — optional
      Values: `PLAIN`, `SCRAM-SHA-256`, `SCRAM-SHA-512`
  - `secrets` (object) — optional
    - `password` (union anyOf) — optional
      - **{ id, hash }**
        - `hash` (string) — optional
        - `id` (string) — required
      - **string**
    - `ssl` (object) — optional
      - `key` (union anyOf) — required
        - **{ id, hash }**
          - `hash` (string) — optional
          - `id` (string) — required
        - **string**
  - `shipper` ({}) — optional
    Same fields as `shipper` in `Kibana_HTTP_APIs_new_output_elasticsearch`
  - `ssl` ({}) — optional
    - `certificate` (string) — optional
    - `certificate_authorities` ([] string · max: 10) — optional
    - `key` (string) — optional
    - `verification_mode` (enum) — optional
      Values: `full`, `none`, `certificate`, `strict`
  - `timeout` (number) — optional
  - `topic` (string) — optional
  - `type` (enum) — required
    Values: `kafka`
  - `username` (string) — optional — nullable
  - `version` (string) — optional
- **Kibana_HTTP_APIs_new_output_otlp** (`type: otlp`)
  - `allow_edit` ([] string · max: 1000) — optional
  - `id` (string) — optional
  - `is_default` (boolean · default: false) — optional
  - `is_default_monitoring` (boolean · default: false) — optional
  - `is_internal` (boolean) — optional
  - `is_preconfigured` (boolean) — optional
  - `name` (string) — required
  - `otlp_exporter` (union oneOf) — required
    - **Kibana_HTTP_APIs_otlp_grpc_exporter** (`protocol: grpc`)
      - `authority` (string · max: 256) — optional — nullable
      - `balancer_name` (string · max: 256) — optional — nullable
      - `compression` (enum) — optional
        Values: `gzip`, `snappy`, `zstd`, `none`
      - `endpoint` (string · max: 2048) — required
      - `headers` (map string to string) — optional — nullable
      - `keepalive` (object) — optional — nullable
        - `permit_without_stream` (boolean) — optional
        - `time` (string · max: 64) — optional — nullable
        - `timeout` (string · max: 64) — optional — nullable
      - `protocol` (enum) — required
        Values: `grpc`
      - `read_buffer_size` (number) — optional — nullable
      - `retry_on_failure` (object) — optional — nullable
        - `enabled` (boolean) — optional
        - `initial_interval` (string · max: 64) — optional — nullable
        - `max_elapsed_time` (string · max: 64) — optional — nullable
        - `max_interval` (string · max: 64) — optional — nullable
        - `multiplier` (number) — optional — nullable
        - `randomization_factor` (number) — optional — nullable
      - `sending_queue` (object) — optional — nullable
        - `batch` (object) — optional — nullable
          - `flush_timeout` (string · max: 64) — optional — nullable
          - `max_size` (number) — optional — nullable
          - `min_size` (number) — optional — nullable
          - `partition` (object) — optional — nullable
            - `metadata_keys` ([] string · max: 100) — optional — nullable
          - `sizer` (enum) — optional
            Values: `items`, `bytes`
        - `block_on_overflow` (boolean) — optional
        - `enabled` (boolean) — optional
        - `num_consumers` (number) — optional — nullable
        - `queue_size` (number) — optional — nullable
        - `sizer` (enum) — optional
          Values: `requests`, `items`, `bytes`
        - `wait_for_result` (boolean) — optional
      - `timeout` (string · max: 64) — optional — nullable
      - `tls` (object) — optional — nullable
        - `ca_file` (string · max: 4096) — optional — nullable
        - `ca_pem` (string · max: 65536) — optional — nullable
        - `cert_file` (string · max: 4096) — optional — nullable
        - `cert_pem` (string · max: 65536) — optional — nullable
        - `cipher_suites` ([] string · max: 100) — optional — nullable
        - `curve_preferences` ([] enum  · max: 4) — optional — nullable
          Values: `X25519`, `P521`, `P256`, `P384`
        - `include_insecure_cipher_suites` (boolean) — optional
        - `include_system_ca_certs_pool` (boolean) — optional
        - `insecure` (boolean) — optional
        - `insecure_skip_verify` (boolean) — optional
        - `key_file` (string · max: 4096) — optional — nullable
        - `max_version` (string · max: 10) — optional — nullable
        - `min_version` (string · max: 10) — optional — nullable
        - `reload_interval` (string · max: 64) — optional — nullable
        - `server_name_override` (string · max: 256) — optional — nullable
        - `tpm` (object) — optional — nullable
          - `enabled` (boolean) — optional
          - `path` (string · max: 4096) — optional — nullable
      - `user_agent` (string · max: 256) — optional — nullable
      - `wait_for_ready` (boolean) — optional
      - `write_buffer_size` (number) — optional — nullable
    - **Kibana_HTTP_APIs_otlp_http_exporter** (`protocol: http/protobuf`)
      - `compression` (enum) — optional
        Values: `gzip`, `none`
      - `compression_params` (object) — optional — nullable
        - `level` (number) — optional
      - `cookies` (object) — optional — nullable
        - `enabled` (boolean) — optional
      - `disable_keep_alives` (boolean) — optional
      - `encoding` (enum) — optional
        Values: `proto`, `json`
      - `endpoint` (string · max: 2048) — required
      - `force_attempt_http2` (boolean) — optional
      - `headers` (map string to string) — optional — nullable
      - `http2_ping_timeout` (string · max: 64) — optional — nullable
      - `http2_read_idle_timeout` (string · max: 64) — optional — nullable
      - `idle_conn_timeout` (string · max: 64) — optional — nullable
      - `logs_endpoint` (string · max: 2048) — optional — nullable
      - `max_conns_per_host` (number) — optional — nullable
      - `max_idle_conns` (number) — optional — nullable
      - `max_idle_conns_per_host` (number) — optional — nullable
      - `metrics_endpoint` (string · max: 2048) — optional — nullable
      - `profiles_endpoint` (string · max: 2048) — optional — nullable
      - `protocol` (enum) — required
        Values: `http/protobuf`
      - `proxy_url` (string · max: 2048) — optional — nullable
      - `read_buffer_size` (number) — optional — nullable
      - `retry_on_failure` (object) — optional — nullable
        - `enabled` (boolean) — optional
        - `initial_interval` (string · max: 64) — optional — nullable
        - `max_elapsed_time` (string · max: 64) — optional — nullable
        - `max_interval` (string · max: 64) — optional — nullable
        - `multiplier` (number) — optional — nullable
        - `randomization_factor` (number) — optional — nullable
      - `sending_queue` (object) — optional — nullable
        - `batch` (object) — optional — nullable
          - `flush_timeout` (string · max: 64) — optional — nullable
          - `max_size` (number) — optional — nullable
          - `min_size` (number) — optional — nullable
          - `partition` (object) — optional — nullable
            - `metadata_keys` ([] string · max: 100) — optional — nullable
          - `sizer` (enum) — optional
            Values: `items`, `bytes`
        - `block_on_overflow` (boolean) — optional
        - `enabled` (boolean) — optional
        - `num_consumers` (number) — optional — nullable
        - `queue_size` (number) — optional — nullable
        - `sizer` (enum) — optional
          Values: `requests`, `items`, `bytes`
        - `wait_for_result` (boolean) — optional
      - `timeout` (string · max: 64) — optional — nullable
      - `tls` (object) — optional — nullable
        - `ca_file` (string · max: 4096) — optional — nullable
        - `ca_pem` (string · max: 65536) — optional — nullable
        - `cert_file` (string · max: 4096) — optional — nullable
        - `cert_pem` (string · max: 65536) — optional — nullable
        - `cipher_suites` ([] string · max: 100) — optional — nullable
        - `curve_preferences` ([] enum  · max: 4) — optional — nullable
          Values: `X25519`, `P521`, `P256`, `P384`
        - `include_insecure_cipher_suites` (boolean) — optional
        - `include_system_ca_certs_pool` (boolean) — optional
        - `insecure` (boolean) — optional
        - `insecure_skip_verify` (boolean) — optional
        - `key_file` (string · max: 4096) — optional — nullable
        - `max_version` (string · max: 10) — optional — nullable
        - `min_version` (string · max: 10) — optional — nullable
        - `reload_interval` (string · max: 64) — optional — nullable
        - `server_name_override` (string · max: 256) — optional — nullable
        - `tpm` (object) — optional — nullable
          - `enabled` (boolean) — optional
          - `path` (string · max: 4096) — optional — nullable
      - `traces_endpoint` (string · max: 2048) — optional — nullable
      - `write_buffer_size` (number) — optional — nullable
  - `secrets` (object) — optional
    - `otlp_exporter` (object) — optional
      - `tls` (object) — optional
        - `key_pem` (union anyOf) — optional
          - **{ id, hash }**
            - `hash` (string) — optional
            - `id` (string) — required
          - **string**
        - `tpm` (object) — optional
          - `auth` (union anyOf) — optional
            - **{ id, hash }**
              - `hash` (string) — optional
              - `id` (string) — required
            - **string**
          - `owner_auth` (union anyOf) — optional
            - **{ id, hash }**
              - `hash` (string) — optional
              - `id` (string) — required
            - **string**
  - `type` (enum) — required
    Values: `otlp`

## Responses

#### `200`

Successful response

`application/json`

- `item` (union oneOf)
  - **Kibana_HTTP_APIs_output_response_elasticsearch** (`type: elasticsearch`)
    - `allow_edit` ([] string · max: 1000)
    - `ca_sha256` (string) — nullable
    - `ca_trusted_fingerprint` (string) — nullable
    - `config_yaml` (string) — nullable
    - `hosts` ([] string · min: 1 · max: 100)
    - `id` (string)
    - `is_default` (boolean · default: false)
    - `is_default_monitoring` (boolean · default: false)
    - `is_internal` (boolean)
    - `is_preconfigured` (boolean)
    - `name` (string)
    - `otel_disable_beatsauth` (boolean) — nullable
    - `otel_exporter_config_yaml` (string) — nullable
    - `preset` (enum)
      Values: `balanced`, `custom`, `throughput`, `scale`, `latency`
    - `proxy_id` (string) — nullable
    - `secrets` (object)
      - `ssl` (object)
        - `key` (union anyOf)
          - **{ id, hash }**
            - `hash` (string)
            - `id` (string)
          - **string**
    - `shipper` ({})
      - `compression_level` (number · default: null) — nullable
      - `disk_queue_compression_enabled` (boolean · default: null) — nullable
      - `disk_queue_enabled` (boolean · default: null) — nullable
      - `disk_queue_encryption_enabled` (boolean · default: null) — nullable
      - `disk_queue_max_size` (number · default: null) — nullable
      - `disk_queue_path` (string · default: null) — nullable
      - `loadbalance` (boolean · default: null) — nullable
      - `max_batch_bytes` (number · default: null) — nullable
      - `mem_queue_events` (number · default: null) — nullable
      - `queue_flush_timeout` (number · default: null) — nullable
    - `ssl` ({})
      - `certificate` (string)
      - `certificate_authorities` ([] string · max: 10)
      - `key` (string)
      - `verification_mode` (enum)
        Values: `full`, `none`, `certificate`, `strict`
    - `type` (enum)
      Values: `elasticsearch`
    - `write_to_logs_streams` (boolean) — nullable
  - **Kibana_HTTP_APIs_output_response_remote_elasticsearch** (`type: remote_elasticsearch`)
    - `allow_edit` ([] string · max: 1000)
    - `ca_sha256` (string) — nullable
    - `ca_trusted_fingerprint` (string) — nullable
    - `config_yaml` (string) — nullable
    - `hosts` ([] string · min: 1 · max: 100)
    - `id` (string)
    - `is_default` (boolean · default: false)
    - `is_default_monitoring` (boolean · default: false)
    - `is_internal` (boolean)
    - `is_preconfigured` (boolean)
    - `kibana_api_key` (string) — nullable
    - `kibana_url` (string) — nullable
    - `name` (string)
    - `otel_disable_beatsauth` (boolean) — nullable
    - `otel_exporter_config_yaml` (string) — nullable
    - `preset` (enum)
      Values: `balanced`, `custom`, `throughput`, `scale`, `latency`
    - `proxy_id` (string) — nullable
    - `secrets` (object)
      - `service_token` (union anyOf)
        - **{ id, hash }**
          - `hash` (string)
          - `id` (string)
        - **string**
      - `ssl` (object)
        - `key` (union anyOf)
          - **{ id, hash }**
            - `hash` (string)
            - `id` (string)
          - **string**
    - `service_token` (string) — nullable
    - `shipper` ({})
      Same fields as `shipper` in `Kibana_HTTP_APIs_output_response_elasticsearch`
    - `ssl` ({})
      - `certificate` (string)
      - `certificate_authorities` ([] string · max: 10)
      - `key` (string)
      - `verification_mode` (enum)
        Values: `full`, `none`, `certificate`, `strict`
    - `sync_integrations` (boolean)
    - `sync_uninstalled_integrations` (boolean)
    - `type` (enum)
      Values: `remote_elasticsearch`
    - `write_to_logs_streams` (boolean) — nullable
  - **Kibana_HTTP_APIs_output_response_logstash** (`type: logstash`)
    - `allow_edit` ([] string · max: 1000)
    - `ca_sha256` (string) — nullable
    - `ca_trusted_fingerprint` (string) — nullable
    - `config_yaml` (string) — nullable
    - `hosts` ([] string · min: 1 · max: 100)
    - `id` (string)
    - `is_default` (boolean · default: false)
    - `is_default_monitoring` (boolean · default: false)
    - `is_internal` (boolean)
    - `is_preconfigured` (boolean)
    - `name` (string)
    - `otel_disable_beatsauth` (boolean) — nullable
    - `otel_exporter_config_yaml` (string) — nullable
    - `proxy_id` (string) — nullable
    - `secrets` (object)
      - `ssl` (object)
        - `key` (union anyOf)
          - **{ id, hash }**
            - `hash` (string)
            - `id` (string)
          - **string**
    - `shipper` ({})
      Same fields as `shipper` in `Kibana_HTTP_APIs_output_response_elasticsearch`
    - `ssl` ({})
      - `certificate` (string)
      - `certificate_authorities` ([] string · max: 10)
      - `key` (string)
      - `verification_mode` (enum)
        Values: `full`, `none`, `certificate`, `strict`
    - `type` (enum)
      Values: `logstash`
  - **Kibana_HTTP_APIs_output_response_kafka** (`type: kafka`)
    - `allow_edit` ([] string · max: 1000)
    - `auth_type` (enum)
      Values: `none`, `user_pass`, `ssl`, `kerberos`
    - `broker_timeout` (number)
    - `ca_sha256` (string) — nullable
    - `ca_trusted_fingerprint` (string) — nullable
    - `client_id` (string)
    - `compression` (enum)
      Values: `gzip`, `snappy`, `lz4`, `none`
    - `compression_level` (number) — nullable
    - `config_yaml` (string) — nullable
    - `connection_type` (enum)
      Values: `plaintext`, `encryption`
    - `hash` (object)
      - `hash` (string)
      - `random` (boolean)
    - `headers` ([] object · max: 100)
      - `key` (string)
      - `value` (string)
    - `hosts` ([] string · min: 1 · max: 100)
    - `id` (string)
    - `is_default` (boolean · default: false)
    - `is_default_monitoring` (boolean · default: false)
    - `is_internal` (boolean)
    - `is_preconfigured` (boolean)
    - `key` (string)
    - `name` (string)
    - `otel_disable_beatsauth` (boolean) — nullable
    - `otel_exporter_config_yaml` (string) — nullable
    - `partition` (enum)
      Values: `random`, `round_robin`, `hash`
    - `password` (string) — nullable
    - `proxy_id` (string) — nullable — deprecated
      Kafka outputs do not support proxy configuration. This field is accepted for backwards compatibility but is ignored — it is cleared to null on save and has no effect on the compiled agent policy.
    - `random` (object)
      - `group_events` (number)
    - `required_acks` (enum)
      Values: `1`, `0`, `-1`
    - `round_robin` (object)
      - `group_events` (number)
    - `sasl` (object) — nullable
      - `mechanism` (enum)
        Values: `PLAIN`, `SCRAM-SHA-256`, `SCRAM-SHA-512`
    - `secrets` (object)
      - `password` (union anyOf)
        - **{ id, hash }**
          - `hash` (string)
          - `id` (string)
        - **string**
      - `ssl` (object)
        - `key` (union anyOf)
          - **{ id, hash }**
            - `hash` (string)
            - `id` (string)
          - **string**
    - `shipper` ({})
      Same fields as `shipper` in `Kibana_HTTP_APIs_output_response_elasticsearch`
    - `ssl` ({})
      - `certificate` (string)
      - `certificate_authorities` ([] string · max: 10)
      - `key` (string)
      - `verification_mode` (enum)
        Values: `full`, `none`, `certificate`, `strict`
    - `timeout` (number)
    - `topic` (string)
    - `type` (enum)
      Values: `kafka`
    - `username` (string) — nullable
    - `version` (string)
  - **Kibana_HTTP_APIs_output_response_otlp** (`type: otlp`)
    - `allow_edit` ([] string · max: 1000)
    - `id` (string)
    - `is_default` (boolean · default: false)
    - `is_default_monitoring` (boolean · default: false)
    - `is_internal` (boolean)
    - `is_preconfigured` (boolean)
    - `name` (string)
    - `otlp_exporter` (union oneOf)
      - **Kibana_HTTP_APIs_otlp_response_grpc_exporter** (`protocol: grpc`)
        - `authority` (string · max: 256) — nullable
        - `balancer_name` (string · max: 256) — nullable
        - `compression` (enum)
          Values: `gzip`, `snappy`, `zstd`, `none`
        - `endpoint` (string · max: 2048)
        - `headers` (map string to string) — nullable
        - `keepalive` (object) — nullable
          - `permit_without_stream` (boolean)
          - `time` (string · max: 64) — nullable
          - `timeout` (string · max: 64) — nullable
        - `protocol` (enum)
          Values: `grpc`
        - `read_buffer_size` (number) — nullable
        - `retry_on_failure` (object) — nullable
          - `enabled` (boolean)
          - `initial_interval` (string · max: 64) — nullable
          - `max_elapsed_time` (string · max: 64) — nullable
          - `max_interval` (string · max: 64) — nullable
          - `multiplier` (number) — nullable
          - `randomization_factor` (number) — nullable
        - `sending_queue` (object) — nullable
          - `batch` (object) — nullable
            - `flush_timeout` (string · max: 64) — nullable
            - `max_size` (number) — nullable
            - `min_size` (number) — nullable
            - `partition` (object) — nullable
              - `metadata_keys` ([] string · max: 100) — nullable
            - `sizer` (enum)
              Values: `items`, `bytes`
          - `block_on_overflow` (boolean)
          - `enabled` (boolean)
          - `num_consumers` (number) — nullable
          - `queue_size` (number) — nullable
          - `sizer` (enum)
            Values: `requests`, `items`, `bytes`
          - `wait_for_result` (boolean)
        - `timeout` (string · max: 64) — nullable
        - `tls` (object) — nullable
          - `ca_file` (string · max: 4096) — nullable
          - `ca_pem` (string · max: 65536) — nullable
          - `cert_file` (string · max: 4096) — nullable
          - `cert_pem` (string · max: 65536) — nullable
          - `cipher_suites` ([] string · max: 100) — nullable
          - `curve_preferences` ([] enum  · max: 4) — nullable
            Values: `X25519`, `P521`, `P256`, `P384`
          - `include_insecure_cipher_suites` (boolean)
          - `include_system_ca_certs_pool` (boolean)
          - `insecure` (boolean)
          - `insecure_skip_verify` (boolean)
          - `key_file` (string · max: 4096) — nullable
          - `max_version` (string · max: 10) — nullable
          - `min_version` (string · max: 10) — nullable
          - `reload_interval` (string · max: 64) — nullable
          - `server_name_override` (string · max: 256) — nullable
          - `tpm` (object) — nullable
            - `enabled` (boolean)
            - `path` (string · max: 4096) — nullable
        - `user_agent` (string · max: 256) — nullable
        - `wait_for_ready` (boolean)
        - `write_buffer_size` (number) — nullable
      - **Kibana_HTTP_APIs_otlp_response_http_exporter** (`protocol: http/protobuf`)
        - `compression` (enum)
          Values: `gzip`, `none`
        - `compression_params` (object) — nullable
          - `level` (number)
        - `cookies` (object) — nullable
          - `enabled` (boolean)
        - `disable_keep_alives` (boolean)
        - `encoding` (enum)
          Values: `proto`, `json`
        - `endpoint` (string · max: 2048)
        - `force_attempt_http2` (boolean)
        - `headers` (map string to string) — nullable
        - `http2_ping_timeout` (string · max: 64) — nullable
        - `http2_read_idle_timeout` (string · max: 64) — nullable
        - `idle_conn_timeout` (string · max: 64) — nullable
        - `logs_endpoint` (string · max: 2048) — nullable
        - `max_conns_per_host` (number) — nullable
        - `max_idle_conns` (number) — nullable
        - `max_idle_conns_per_host` (number) — nullable
        - `metrics_endpoint` (string · max: 2048) — nullable
        - `profiles_endpoint` (string · max: 2048) — nullable
        - `protocol` (enum)
          Values: `http/protobuf`
        - `proxy_url` (string · max: 2048) — nullable
        - `read_buffer_size` (number) — nullable
        - `retry_on_failure` (object) — nullable
          - `enabled` (boolean)
          - `initial_interval` (string · max: 64) — nullable
          - `max_elapsed_time` (string · max: 64) — nullable
          - `max_interval` (string · max: 64) — nullable
          - `multiplier` (number) — nullable
          - `randomization_factor` (number) — nullable
        - `sending_queue` (object) — nullable
          - `batch` (object) — nullable
            - `flush_timeout` (string · max: 64) — nullable
            - `max_size` (number) — nullable
            - `min_size` (number) — nullable
            - `partition` (object) — nullable
              - `metadata_keys` ([] string · max: 100) — nullable
            - `sizer` (enum)
              Values: `items`, `bytes`
          - `block_on_overflow` (boolean)
          - `enabled` (boolean)
          - `num_consumers` (number) — nullable
          - `queue_size` (number) — nullable
          - `sizer` (enum)
            Values: `requests`, `items`, `bytes`
          - `wait_for_result` (boolean)
        - `timeout` (string · max: 64) — nullable
        - `tls` (object) — nullable
          - `ca_file` (string · max: 4096) — nullable
          - `ca_pem` (string · max: 65536) — nullable
          - `cert_file` (string · max: 4096) — nullable
          - `cert_pem` (string · max: 65536) — nullable
          - `cipher_suites` ([] string · max: 100) — nullable
          - `curve_preferences` ([] enum  · max: 4) — nullable
            Values: `X25519`, `P521`, `P256`, `P384`
          - `include_insecure_cipher_suites` (boolean)
          - `include_system_ca_certs_pool` (boolean)
          - `insecure` (boolean)
          - `insecure_skip_verify` (boolean)
          - `key_file` (string · max: 4096) — nullable
          - `max_version` (string · max: 10) — nullable
          - `min_version` (string · max: 10) — nullable
          - `reload_interval` (string · max: 64) — nullable
          - `server_name_override` (string · max: 256) — nullable
          - `tpm` (object) — nullable
            - `enabled` (boolean)
            - `path` (string · max: 4096) — nullable
        - `traces_endpoint` (string · max: 2048) — nullable
        - `write_buffer_size` (number) — nullable
    - `secrets` (object)
      - `otlp_exporter` (object)
        - `tls` (object)
          - `key_pem` (union anyOf)
            - **{ id, hash }**
              - `hash` (string)
              - `id` (string)
            - **string**
          - `tpm` (object)
            - `auth` (union anyOf)
              - **{ id, hash }**
                - `hash` (string)
                - `id` (string)
              - **string**
            - `owner_auth` (union anyOf)
              - **{ id, hash }**
                - `hash` (string)
                - `id` (string)
              - **string**
    - `type` (enum)
      Values: `otlp`
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
POST /api/fleet/outputs
{
  "hosts": [
    "https://elasticsearch.example.com:9200"
  ],
  "is_default": false,
  "is_default_monitoring": false,
  "name": "My output",
  "type": "elasticsearch"
}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/fleet/outputs" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "hosts": [
    "https://elasticsearch.example.com:9200"
  ],
  "is_default": false,
  "is_default_monitoring": false,
  "name": "My output",
  "type": "elasticsearch"
}'
```

## Response Examples

#### Post output

The created Fleet output

```json
{
  "item": {
    "hosts": [
      "https://elasticsearch.example.com:9200"
    ],
    "id": "output-id-2",
    "is_default": false,
    "is_default_monitoring": false,
    "name": "My output",
    "type": "elasticsearch"
  }
}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

