> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deck.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an event destination

> Creates a new event destination (e.g. a webhook endpoint) to receive platform events.



## OpenAPI

````yaml /api-reference/v2.json post /event-destinations
openapi: 3.1.1
info:
  title: Deck API
  version: 2.0.0
servers:
  - url: https://api.deck.co/v2
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Agents
    description: >-
      Agents are the AI workers that execute tasks against sources. Create and
      manage the agents in your organization.
  - name: Components
    description: >-
      Embeddable UI components. Create short-lived session tokens for the Auth
      Component.
  - name: Platform
    description: Organization-wide platform settings, such as the static IP range.
  - name: Credentials
    description: >-
      Credentials store the login details an agent uses at a source. Values are
      tokenized at rest and never returned in plaintext.
  - name: Event Destinations
    description: >-
      Where Deck delivers events: webhooks, SQS, Kinesis, S3, and more. Manage
      destinations and inspect delivery attempts.
  - name: Events
    description: >-
      Immutable records of things that happened in your organization, such as a
      task run completing or a credential being verified.
  - name: Sessions
    description: >-
      Sessions are agent sandbox lifetimes. A session is created for each task
      run (or explicitly) and counts toward your concurrency limit.
  - name: Sources
    description: >-
      Sources are the websites and portals agents work against. Register,
      inspect, reset, and delete them.
  - name: Storage
    description: >-
      Files produced by task runs: downloaded documents, exports, and extraction
      results.
  - name: Task Runs
    description: >-
      A task run is one execution of a task. Inspect status and output, retrieve
      files and screenshots, cancel runs, and answer interaction requests.
  - name: Tasks
    description: >-
      Tasks define reusable units of work for an agent: a goal, an input schema,
      and an output schema. Run them against sources with credentials.
  - name: Test
    description: Connectivity check for your API key.
  - name: Triggers
    description: Triggers run tasks automatically on a schedule or in response to events.
  - name: Workflows
  - name: Workflow Runs
paths:
  /event-destinations:
    post:
      tags:
        - Event Destinations
      summary: Create an event destination
      description: >-
        Creates a new event destination (e.g. a webhook endpoint) to receive
        platform events.
      operationId: createEventDestination
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Optional key that makes the request idempotent. Retrying with the
            same key returns the original response instead of repeating the
            operation; keys expire after 24 hours. Any string up to 256
            characters. See [Idempotency](/api/idempotency).
          schema:
            type: string
            maxLength: 256
            example: 550e8400-e29b-41d4-a716-446655440000
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEventDestinationRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateEventDestinationRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateEventDestinationRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/EventDestinationResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/EventDestinationResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/EventDestinationResponse'
        '400':
          description: Bad request — validation error or malformed input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found — the requested resource does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            Conflict — the request is valid but cannot be completed in the
            current state. Also returned when an `Idempotency-Key` is reused
            with different request parameters (`idempotency_error`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Unprocessable content — the request body is understood but contains
            invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Too many requests — the organization-wide API rate limit was
            exceeded (`rate_limit_exceeded`). Retry with exponential backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateEventDestinationRequest:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: Display name for the event destination.
        type:
          type: string
          enum:
            - webhook
            - aws_sqs
            - aws_kinesis
            - aws_s3
            - aws_eventbridge
            - gcp_pubsub
            - rabbitmq
            - azure_servicebus
            - hookdeck
            - cloudflare_queues
          description: >-
            Destination type. Defaults to `webhook` if omitted. Send the
            matching configuration object under a property whose name equals
            this value (for example, when `type` is `aws_sqs`, include an
            `aws_sqs` object).
        events:
          type:
            - 'null'
            - array
          items:
            type: string
          description: >-
            Event types to subscribe to (for example `task_run.completed`,
            `credential.verified`). Use `["*"]` to subscribe to all event types;
            `*` cannot be combined with specific types, and the list must not be
            empty.
        filter:
          type:
            - 'null'
            - object
          description: >-
            Optional content filter matched against each event payload. Only
            events of the subscribed types that match are delivered. Write the
            filter against the event as you receive it, for example `{"data":
            {"task_id": "task_a1b2c3d4"}}`. Omit to deliver every event of the
            subscribed types. Must be an object nested no more than 32 levels
            deep. See [Filtering
            events](/events/destinations-and-deliveries#filtering-events).
        webhook:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              description: Absolute `https` or `http` URL that receives event deliveries.
            secret:
              type: string
              description: >-
                Signing secret used to verify webhook signatures. Write-only;
                never returned.
          description: >-
            Configuration for a `webhook` destination. Provide this object under
            the `webhook` property when `type` is `webhook`.
        aws_sqs:
          type: object
          required:
            - queue_url
          properties:
            queue_url:
              type: string
              description: URL of the destination Amazon SQS queue.
            key:
              type: string
              description: 'AWS access key ID. Accepted alias: `access_key`. Write-only.'
            secret:
              type: string
              description: 'AWS secret access key. Accepted alias: `secret_key`. Write-only.'
          description: >-
            Configuration for a `aws_sqs` destination. Provide this object under
            the `aws_sqs` property when `type` is `aws_sqs`.
        aws_kinesis:
          type: object
          required:
            - stream_name
            - region
          properties:
            stream_name:
              type: string
              description: Name of the Amazon Kinesis stream.
            region:
              type: string
              description: AWS region of the stream.
            key:
              type: string
              description: 'AWS access key ID. Accepted alias: `access_key`. Write-only.'
            secret:
              type: string
              description: 'AWS secret access key. Accepted alias: `secret_key`. Write-only.'
          description: >-
            Configuration for a `aws_kinesis` destination. Provide this object
            under the `aws_kinesis` property when `type` is `aws_kinesis`.
        aws_s3:
          type: object
          required:
            - bucket
            - region
          properties:
            bucket:
              type: string
              description: Name of the destination Amazon S3 bucket.
            region:
              type: string
              description: AWS region of the bucket.
            key:
              type: string
              description: 'AWS access key ID. Accepted alias: `access_key`. Write-only.'
            secret:
              type: string
              description: 'AWS secret access key. Accepted alias: `secret_key`. Write-only.'
          description: >-
            Configuration for a `aws_s3` destination. Provide this object under
            the `aws_s3` property when `type` is `aws_s3`.
        aws_eventbridge:
          type: object
          required:
            - region
          properties:
            event_bus_name:
              type: string
              description: >-
                Name or ARN of the Amazon EventBridge event bus. Defaults to the
                account's default event bus.
            region:
              type: string
              description: AWS region of the event bus.
            key:
              type: string
              description: 'AWS access key ID. Accepted alias: `access_key`. Write-only.'
            secret:
              type: string
              description: 'AWS secret access key. Accepted alias: `secret_key`. Write-only.'
          description: >-
            Configuration for a `aws_eventbridge` destination. Provide this
            object under the `aws_eventbridge` property when `type` is
            `aws_eventbridge`.
        gcp_pubsub:
          type: object
          required:
            - project_id
            - topic
          properties:
            project_id:
              type: string
              description: Google Cloud project ID.
            topic:
              type: string
              description: 'Pub/Sub topic name. Accepted alias: `topic_name`.'
            service_account_json:
              type: string
              description: >-
                Service account credentials JSON. Accepted alias:
                `credentials_json`. Write-only.
          description: >-
            Configuration for a `gcp_pubsub` destination. Provide this object
            under the `gcp_pubsub` property when `type` is `gcp_pubsub`.
        rabbitmq:
          type: object
          required:
            - exchange
            - server_url
          properties:
            exchange:
              type: string
              description: Name of the RabbitMQ exchange.
            server_url:
              type: string
              description: >-
                RabbitMQ host as `host[:port]` (for example `rabbitmq:5672`).
                You may instead pass a full AMQP URL with embedded credentials;
                Deck extracts the host, username, and password from it.
            username:
              type: string
              description: >-
                RabbitMQ username (or embed it in the AMQP `server_url`).
                Write-only.
            password:
              type: string
              description: >-
                RabbitMQ password (or embed it in the AMQP `server_url`).
                Write-only.
          description: >-
            Configuration for a `rabbitmq` destination. Provide this object
            under the `rabbitmq` property when `type` is `rabbitmq`.
        azure_servicebus:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: >-
                Name of the Service Bus queue or topic. Accepted alias:
                `queue_name`.
            connection_string:
              type: string
              description: Azure Service Bus connection string. Write-only.
          description: >-
            Configuration for a `azure_servicebus` destination. Provide this
            object under the `azure_servicebus` property when `type` is
            `azure_servicebus`.
        hookdeck:
          type: object
          properties:
            token:
              type: string
              description: 'Hookdeck API key. Accepted alias: `api_key`. Write-only.'
          description: >-
            Configuration for a `hookdeck` destination. Provide this object
            under the `hookdeck` property when `type` is `hookdeck`.
        cloudflare_queues:
          type: object
          required:
            - account_id
            - queue_id
          properties:
            account_id:
              type: string
              description: Cloudflare account ID.
            queue_id:
              type: string
              description: ID of the Cloudflare queue.
            api_token:
              type: string
              description: >-
                Cloudflare API token with permission to send messages to the
                queue. Write-only.
          description: >-
            Configuration for a `cloudflare_queues` destination. Provide this
            object under the `cloudflare_queues` property when `type` is
            `cloudflare_queues`.
      description: >-
        Request body for creating a new event destination. Provide `name`,
        `type`, `events`, and exactly one type-specific configuration object
        whose property name matches `type` (for example `{"type": "webhook",
        "webhook": {"url": "..."}}`).
    EventDestinationResponse:
      required:
        - id
        - object
        - name
        - status
        - type
        - events
        - created_at
        - updated_at
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the event destination, prefixed with `evtd_`.
          pattern: ^evtd_
          example: evtd_AbC123xYz456
        object:
          type: string
          description: Always `event_destination`.
        name:
          type: string
          description: Display name for the event destination.
        status:
          type: string
          description: 'Destination status: `pending_verification`, `active`, or `inactive`.'
        type:
          type: string
          enum:
            - webhook
            - aws_sqs
            - aws_kinesis
            - aws_s3
            - aws_eventbridge
            - gcp_pubsub
            - rabbitmq
            - azure_servicebus
            - hookdeck
            - cloudflare_queues
          description: >-
            Destination type. The endpoint configuration is returned under a
            property whose name equals this value (for example, a `webhook`
            destination returns a `webhook` object).
        events:
          type: array
          items:
            type: string
          description: Event types this destination is subscribed to.
        filter:
          type:
            - 'null'
            - object
          description: >-
            Content filter applied to events before delivery, as written when it
            was set. `null` when the destination has no filter.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the resource was created.
          example: '2026-08-24T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the resource was last updated.
          example: '2026-08-24T12:00:00Z'
        request_id:
          type:
            - 'null'
            - string
          description: >-
            Unique identifier for the API request. Include this when contacting
            support.
        test_endpoint:
          type:
            - object
            - 'null'
          properties:
            inspect_url:
              type: string
              description: >-
                URL that opens delivered payloads in the Hookdeck Console.
                Anyone with the link can read deliveries.
          description: >-
            Present when the destination is a `webhook` backed by a disposable
            Hookdeck Console test endpoint created in the Console. Read-only.
        webhook:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              description: Absolute `https` or `http` URL that receives event deliveries.
          description: >-
            Configuration returned for a `webhook` destination (credentials are
            never returned).
        aws_sqs:
          type: object
          required:
            - queue_url
          properties:
            queue_url:
              type: string
              description: URL of the destination Amazon SQS queue.
          description: >-
            Configuration returned for a `aws_sqs` destination (credentials are
            never returned).
        aws_kinesis:
          type: object
          required:
            - stream_name
            - region
          properties:
            stream_name:
              type: string
              description: Name of the Amazon Kinesis stream.
            region:
              type: string
              description: AWS region of the stream.
          description: >-
            Configuration returned for a `aws_kinesis` destination (credentials
            are never returned).
        aws_s3:
          type: object
          required:
            - bucket
            - region
          properties:
            bucket:
              type: string
              description: Name of the destination Amazon S3 bucket.
            region:
              type: string
              description: AWS region of the bucket.
          description: >-
            Configuration returned for a `aws_s3` destination (credentials are
            never returned).
        aws_eventbridge:
          type: object
          required:
            - region
          properties:
            event_bus_name:
              type: string
              description: >-
                Name or ARN of the Amazon EventBridge event bus. Defaults to the
                account's default event bus.
            region:
              type: string
              description: AWS region of the event bus.
          description: >-
            Configuration returned for a `aws_eventbridge` destination
            (credentials are never returned).
        gcp_pubsub:
          type: object
          required:
            - project_id
            - topic
          properties:
            project_id:
              type: string
              description: Google Cloud project ID.
            topic:
              type: string
              description: 'Pub/Sub topic name. Accepted alias: `topic_name`.'
          description: >-
            Configuration returned for a `gcp_pubsub` destination (credentials
            are never returned).
        rabbitmq:
          type: object
          required:
            - exchange
            - server_url
          properties:
            exchange:
              type: string
              description: Name of the RabbitMQ exchange.
            server_url:
              type: string
              description: >-
                RabbitMQ host as `host[:port]` (for example `rabbitmq:5672`).
                You may instead pass a full AMQP URL with embedded credentials;
                Deck extracts the host, username, and password from it.
          description: >-
            Configuration returned for a `rabbitmq` destination (credentials are
            never returned).
        azure_servicebus:
          type: object
          required:
            - name
          properties:
            name:
              type: string
              description: >-
                Name of the Service Bus queue or topic. Accepted alias:
                `queue_name`.
          description: >-
            Configuration returned for a `azure_servicebus` destination
            (credentials are never returned).
        hookdeck:
          type: object
          properties: {}
          description: >-
            Configuration returned for a `hookdeck` destination (credentials are
            never returned).
        cloudflare_queues:
          type: object
          required:
            - account_id
            - queue_id
          properties:
            account_id:
              type: string
              description: Cloudflare account ID.
            queue_id:
              type: string
              description: ID of the Cloudflare queue.
          description: >-
            Configuration returned for a `cloudflare_queues` destination
            (credentials are never returned).
      description: >-
        An event destination object representing an endpoint that receives
        platform events.
    ValidationErrorResponse:
      required:
        - errors
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
          description: RFC 9110 problem type URI.
        title:
          type:
            - 'null'
            - string
          description: Short summary of the validation failure.
        status:
          type:
            - 'null'
            - integer
          description: HTTP status code.
          format: int32
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Validation errors grouped by field name.
        traceId:
          type:
            - 'null'
            - string
          description: Request trace identifier.
      description: Validation error returned for malformed requests (HTTP 400).
    ErrorResponse:
      required:
        - errors
        - request_id
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TaskRunError'
          description: One or more errors that describe what went wrong.
        request_id:
          type: string
          description: Unique identifier for this request, useful for tracing.
      description: Standard error response.
    TaskRunError:
      required:
        - type
        - code
        - message
      type: object
      properties:
        type:
          type: string
          description: >-
            Error category (e.g. `source`, `auth`, `task`, `rate_limit`).
            Determines the class of failure.
        code:
          type: string
          description: Machine-readable error code. Use this for programmatic handling.
        message:
          type: string
          description: >-
            Human-readable explanation. Do not rely on this for logic — it may
            change.
        field:
          type:
            - 'null'
            - string
          description: The input field that caused the error, when applicable.
      description: Error details for a failed task run. Same structure as API-level errors.
  securitySchemes:
    BearerAuth:
      type: http
      description: Secret key (sk_live_...)
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.