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

# Enable a webhook endpoint

> **Private beta:** [request access](https://trigger.dev/webhooks-beta) to use webhooks.
Resume a disabled endpoint so its URL accepts deliveries again. Returns the updated endpoint.



## OpenAPI

````yaml v3-openapi POST /api/v1/webhooks/endpoints/{endpointId}/enable
openapi: 3.1.0
info:
  title: Trigger.dev v3 REST API
  description: >-
    The REST API lets you trigger and manage runs on Trigger.dev. You can
    trigger a run, get the status of a run, and get the results of a run. 
  version: 2024-04
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.trigger.dev
    description: Trigger.dev API
security: []
paths:
  /api/v1/webhooks/endpoints/{endpointId}/enable:
    parameters:
      - $ref: '#/components/parameters/webhookEndpointId'
    post:
      tags:
        - webhooks
      summary: Enable a webhook endpoint
      description: >-
        **Private beta:** [request access](https://trigger.dev/webhooks-beta) to
        use webhooks.

        Resume a disabled endpoint so its URL accepts deliveries again. Returns
        the updated endpoint.
      operationId: enable_webhook_endpoint_v1
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointDetailObject'
        '401':
          description: Unauthorized request
        '404':
          description: Endpoint not found
      security:
        - secretKey: []
      x-codeSamples:
        - lang: curl
          label: Enable a webhook endpoint
          source: >-
            curl -X POST
            "https://api.trigger.dev/api/v1/webhooks/endpoints/stripe/enable" \
              -H "Authorization: Bearer $TRIGGER_SECRET_KEY"
components:
  parameters:
    webhookEndpointId:
      in: path
      name: endpointId
      required: true
      schema:
        type: string
      description: >-
        The endpoint's declared id (the `id` passed to
        `webhooks.endpoint.define`) or its `wh_` id. A value starting with `wh_`
        is always a generated id, since declared ids can't start with `wh_`. A
        declared id names the endpoint's declared instance in the key's
        environment.
      example: stripe
  schemas:
    WebhookEndpointDetailObject:
      allOf:
        - $ref: '#/components/schemas/WebhookEndpointObject'
        - type: object
          required:
            - subscribers
            - setupPrompt
          properties:
            subscribers:
              type: array
              description: The tasks and agents that receive the endpoint's deliveries.
              items:
                type: object
                required:
                  - id
                  - type
                  - taskId
                  - filter
                properties:
                  id:
                    type: string
                    description: >-
                      The subscriber id, used as `targetId` when replaying: a
                      `webhook()` task's id, or `agentId:eventId` for an agent's
                      `chat.event` or channel.
                    example: process-checkout
                  type:
                    type: string
                    enum:
                      - task
                      - session
                    description: >-
                      `task` triggers a run. `session` routes the event into an
                      agent's session.
                  taskId:
                    type: string
                    description: >-
                      The subscribing task, or the agent for a `session`
                      subscriber.
                    example: process-checkout
                  filter:
                    type:
                      - string
                      - 'null'
                    description: >-
                      The filter that decides which events the subscriber takes.
                      `null` takes every event.
                    example: event.type == 'checkout.session.completed'
            setupPrompt:
              type: string
              description: >-
                Instructions for an AI coding agent to register the endpoint
                with its provider and set up the signing secret.
    WebhookEndpointObject:
      type: object
      required:
        - id
        - declaredId
        - source
        - status
        - secretProvisioning
        - secretSet
        - tenantId
        - externalRef
        - url
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          description: The endpoint's id.
          example: wh_cm1a2b3c4d5e6f
        declaredId:
          type: string
          description: >-
            The `id` the endpoint is declared with in code
            (`webhooks.endpoint.define({ id })`).
          example: stripe
        source:
          type: string
          description: The provider source that verifies and types the endpoint's events.
          example: stripe
        status:
          type: string
          enum:
            - active
            - inactive
            - deleting
          description: >-
            `active` accepts deliveries. `inactive` was disabled, or is no
            longer in the current deployment, and its URL responds with `404`.
        secretProvisioning:
          type: string
          enum:
            - provider
            - integrator
            - either
          description: >-
            Who supplies the signing secret: `provider` issues it (store it with
            the set secret endpoint), `integrator` means you choose it (generate
            one), and `either` accepts both.
        secretSet:
          type: boolean
          description: >-
            Whether a signing secret or public key is set. Every delivery is
            rejected until it is.
        tenantId:
          type:
            - string
            - 'null'
          description: Reserved for dynamic endpoints. `null` for a declared endpoint.
        externalRef:
          type:
            - string
            - 'null'
          description: Reserved for dynamic endpoints. `null` for a declared endpoint.
        url:
          type: string
          description: The webhook URL to register with the provider.
          example: https://api.trigger.dev/webhooks/v1/ingest/q3Xb7k2LmP9sT4vW1yZ0aQ
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >
        Use a named environment API key. It starts with `tr_dev_sk_`,
        `tr_prod_sk_`, `tr_stg_sk_`, etc.


        Create a named API key in the API Keys section of your Trigger.dev
        project dashboard. Choose the narrowest access preset that supports your
        integration.


        Our TypeScript SDK will default to using the value of the
        `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using
        the SDK in a different environment, you can set the key using the
        `configure` function.


        ```typescript

        import { configure } from "@trigger.dev/sdk";


        configure({ accessToken: "tr_dev_sk_1234" });

        ```

````

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