Skip to main content
POST
/
event_destinations
Create
curl --request POST \
  --url https://api.ngrok.com/event_destinations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'ngrok-version: <ngrok-version>' \
  --data '{
  "metadata": "<string>",
  "description": "<string>",
  "format": "<string>",
  "target": {
    "firehose": {
      "auth": {
        "role": {
          "role_arn": "<string>"
        },
        "creds": {
          "aws_access_key_id": "<string>",
          "aws_secret_access_key": "<string>"
        }
      },
      "delivery_stream_arn": "<string>"
    },
    "kinesis": {
      "auth": {
        "role": {
          "role_arn": "<string>"
        },
        "creds": {
          "aws_access_key_id": "<string>",
          "aws_secret_access_key": "<string>"
        }
      },
      "stream_arn": "<string>"
    },
    "cloudwatch_logs": {
      "auth": {
        "role": {
          "role_arn": "<string>"
        },
        "creds": {
          "aws_access_key_id": "<string>",
          "aws_secret_access_key": "<string>"
        }
      },
      "log_group_arn": "<string>"
    },
    "datadog": {
      "api_key": "<string>",
      "ddtags": "<string>",
      "service": "<string>",
      "ddsite": "<string>"
    },
    "azure_logs_ingestion": {
      "tenant_id": "<string>",
      "client_id": "<string>",
      "client_secret": "<string>",
      "logs_ingestion_uri": "<string>",
      "data_collection_rule_id": "<string>",
      "data_collection_stream_name": "<string>"
    }
  }
}'
{
  "id": "<string>",
  "metadata": "<string>",
  "created_at": "<string>",
  "description": "<string>",
  "format": "<string>",
  "target": {
    "firehose": {
      "auth": {
        "role": {
          "role_arn": "<string>"
        },
        "creds": {
          "aws_access_key_id": "<string>",
          "aws_secret_access_key": "<string>"
        }
      },
      "delivery_stream_arn": "<string>"
    },
    "kinesis": {
      "auth": {
        "role": {
          "role_arn": "<string>"
        },
        "creds": {
          "aws_access_key_id": "<string>",
          "aws_secret_access_key": "<string>"
        }
      },
      "stream_arn": "<string>"
    },
    "cloudwatch_logs": {
      "auth": {
        "role": {
          "role_arn": "<string>"
        },
        "creds": {
          "aws_access_key_id": "<string>",
          "aws_secret_access_key": "<string>"
        }
      },
      "log_group_arn": "<string>"
    },
    "datadog": {
      "api_key": "<string>",
      "ddtags": "<string>",
      "service": "<string>",
      "ddsite": "<string>"
    },
    "azure_logs_ingestion": {
      "tenant_id": "<string>",
      "client_id": "<string>",
      "client_secret": "<string>",
      "logs_ingestion_uri": "<string>",
      "data_collection_rule_id": "<string>",
      "data_collection_stream_name": "<string>"
    }
  },
  "uri": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

ngrok-version
integer
default:2
required

Body

application/json
metadata
string

Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.

description
string

Human-readable description of the Event Destination. Optional, max 255 bytes.

format
string

The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.

target
object

An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.

Response

201 - application/json

Create a new Event Destination. It will not apply to anything until it is associated with an Event Subscription.

id
string

Unique identifier for this Event Destination.

metadata
string

Arbitrary user-defined machine-readable data of this Event Destination. Optional, max 4096 bytes.

created_at
string

Timestamp when the Event Destination was created, RFC 3339 format.

description
string

Human-readable description of the Event Destination. Optional, max 255 bytes.

format
string

The output format you would like to serialize events into when sending to their target. Currently the only accepted value is JSON.

target
object

An object that encapsulates where and how to send your events. An event destination must contain exactly one of the following objects, leaving the rest null: kinesis, firehose, cloudwatch_logs, or s3.

uri
string

URI of the Event Destination API resource.