Skip to main content
POST
/
event-streams
Create event stream
curl --request POST \
  --url https://api.opal.dev/v1/event-streams \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "webhook_url": "<string>"
}
'
{
  "event_stream_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "connection": {
    "name": "<string>",
    "enabled": true,
    "webhook_url": "<string>",
    "credentials": {
      "api_key_credentials": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "value": "<string>"
        }
      ],
      "hmac_credential_1": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "secret": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      },
      "hmac_credential_2": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "secret": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      }
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Information needed to create an event stream.

name
string
required

The name for the event stream.

connection_type
enum<string>
required

The type of event stream connection.

Available options:
WEBHOOK
webhook_url
string

The webhook URL. Required when connection_type is WEBHOOK.

credentials
object

Authentication credentials for a webhook connection.

Response

200 - application/json

The event stream just created. Credentials are returned in clear text only on creation.

An event streaming connection that publishes events to an external system.

event_stream_id
string<uuid>
required

The ID of the event stream.

connection
object
required

The connection configuration for an event stream.

Last modified on June 5, 2026