Dynamic Webhooks API

Manage webhook endpoints for event notifications.

OpenAPI Specification

dynamic-labs-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Dynamic Allowlists Webhooks API
  description: Representative OpenAPI description of the Dynamic environment-scoped REST API for web3 authentication and embedded wallets. Admin endpoints authenticate with an environment-scoped bearer API token (dyn_ prefixed); SDK endpoints authenticate with a user JWT obtained via the client SDK. This document is a faithful, non-exhaustive representation of publicly documented surfaces at https://docs.dynamic.xyz/api-reference. Consult the live API reference for the complete schema catalog.
  termsOfService: https://www.dynamic.xyz/terms
  contact:
    name: Dynamic Support
    url: https://www.dynamic.xyz/contact
  version: v0
servers:
- url: https://app.dynamicauth.com/api/v0
  description: Production
- url: https://app.dynamic.xyz/api/v0
  description: Production (alternate host)
security:
- bearerAuth: []
tags:
- name: Webhooks
  description: Manage webhook endpoints for event notifications.
paths:
  /environments/{environmentId}/webhooks:
    get:
      operationId: getWebhooks
      tags:
      - Webhooks
      summary: Get webhooks for an environment.
      parameters:
      - $ref: '#/components/parameters/EnvironmentId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createWebhook
      tags:
      - Webhooks
      summary: Create a webhook.
      description: Registers a new webhook endpoint subscribed to the given event scopes.
      parameters:
      - $ref: '#/components/parameters/EnvironmentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequest'
      responses:
        '201':
          description: Webhook created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /environments/{environmentId}/webhooks/{webhookId}:
    get:
      operationId: getWebhookById
      tags:
      - Webhooks
      summary: Get a webhook by ID.
      parameters:
      - $ref: '#/components/parameters/EnvironmentId'
      - $ref: '#/components/parameters/WebhookId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          $ref: '#/components/responses/Unauthorized'
    put:
      operationId: updateWebhook
      tags:
      - Webhooks
      summary: Update a webhook.
      parameters:
      - $ref: '#/components/parameters/EnvironmentId'
      - $ref: '#/components/parameters/WebhookId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      operationId: deleteWebhook
      tags:
      - Webhooks
      summary: Delete a webhook.
      parameters:
      - $ref: '#/components/parameters/EnvironmentId'
      - $ref: '#/components/parameters/WebhookId'
      responses:
        '204':
          description: Webhook deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    EnvironmentId:
      name: environmentId
      in: path
      required: true
      description: The ID of the Dynamic environment (project).
      schema:
        type: string
        format: uuid
    WebhookId:
      name: webhookId
      in: path
      required: true
      description: The ID of the webhook.
      schema:
        type: string
        format: uuid
  responses:
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Webhook:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        isEnabled:
          type: boolean
        scopes:
          type: array
          items:
            type: string
            description: Event scope such as user.created, wallet.linked, or user.session.created.
        secret:
          type: string
          description: Signing secret used to verify webhook payloads, returned only on creation.
          nullable: true
    CreateWebhookRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
        isEnabled:
          type: boolean
          default: true
        scopes:
          type: array
          items:
            type: string
      required:
      - url
      - scopes
    WebhookList:
      type: object
      properties:
        webhooks:
          type: array
          items:
            $ref: '#/components/schemas/Webhook'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
          - message
      required:
      - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: dyn_token
      description: 'Environment-scoped API token with a dyn_ prefix for admin endpoints, or a user JWT from the client SDK for SDK endpoints. Sent as Authorization: Bearer <token>.'