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

# Rotate a webhook endpoint's signing secret

> Generates a new signing secret and returns it once — store it securely. The previous secret stays valid for a grace window (deliveries are co-signed with both secrets, each as its own `v1=` segment in `X-Conduit-Signature`) so you can roll over your verification code without dropping events. After the grace window only the new secret signs. Requires an `Idempotency-Key`: a retried request with the same key replays the original response instead of rotating again, so a lost response can't silently discard the secret you just deployed.



## OpenAPI

````yaml https://api.sandbox.conduit.financial/v2/api-docs/openapi.json post /webhooks/endpoints/{id}/rotate
openapi: 3.0.0
info:
  title: Conduit Sandbox API
  description: >-
    **Sandbox API** — clients integrate against this surface to exercise happy
    and unhappy paths without consuming real KYC/PSP credits or moving real
    money. Customer KYC, banking partners, and crypto custody are stubbed;
    org-level KYB runs against real providers. Simulation endpoints under
    `/v2/sandbox/*` drive specific scenarios.


    Internal and portal endpoints are excluded from this spec.
  version: '2.0'
  contact: {}
servers:
  - url: https://api.sandbox.conduit.financial/v2
    description: Sandbox
  - url: https://api.conduit.financial/v2
    description: Production
security:
  - api-key: []
tags:
  - name: Customers
  - name: Registered Addresses
  - name: Wallets
  - name: Wallet Signers
  - name: Signing Quorum
  - name: Virtual Accounts
  - name: Applications
  - name: Documents
  - name: Verifications
  - name: Signing Requests
  - name: Transactions
  - name: Payouts
  - name: Whitelist Recipients
  - name: Orders
  - name: RFIs
  - name: Webhook Endpoints
  - name: Webhook Deliveries
  - name: Webhook Event Types
  - name: Features
  - name: Customer Onboarding
  - name: Sandbox
paths:
  /webhooks/endpoints/{id}/rotate:
    post:
      tags:
        - Webhook Endpoints
      summary: Rotate a webhook endpoint's signing secret
      description: >-
        Generates a new signing secret and returns it once — store it securely.
        The previous secret stays valid for a grace window (deliveries are
        co-signed with both secrets, each as its own `v1=` segment in
        `X-Conduit-Signature`) so you can roll over your verification code
        without dropping events. After the grace window only the new secret
        signs. Requires an `Idempotency-Key`: a retried request with the same
        key replays the original response instead of rotating again, so a lost
        response can't silently discard the secret you just deployed.
      operationId: WebhookEndpointsController_rotateEndpointSecret_v2
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            Caller-generated unique key that lets the server safely replay this
            request. The cached response is returned for 5 minutes on any retry
            with the same key from the same API principal. Required on every
            state-changing money-moving or resource-creating POST.
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9_.:-]{1,128}$
            minLength: 1
            maxLength: 128
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointCreatedResponseDto'
        '400':
          description: >-
            **INVALID_OID_FORMAT**: A path or query parameter expected a valid
            object identifier but received a value that does not match the
            expected format.


            **VALIDATION_ERROR**: The request body or query parameters failed
            validation. One or more fields have invalid values, missing required
            properties, or incorrect types. Multipart file uploads that fail at
            the multipart-parser layer (unexpected form-field name, too many
            parts) carry an extra 'field' member naming the offending
            form-field.


            **MALFORMED_JSON**: The request body could not be parsed as JSON.
            Bodies declared as 'application/json' — and bodies with no
            Content-Type header, which are assumed to be JSON — must contain
            syntactically valid JSON.


            **IDEMPOTENCY_KEY_REQUIRED**: This endpoint requires an
            Idempotency-Key header to prevent duplicate processing. Generate a
            unique key per logical request and resend the request.


            **IDEMPOTENCY_KEY_INVALID**: The Idempotency-Key header value did
            not match the required shape (1-128 characters, letters / digits /
            underscore / dot / colon / hyphen).


            **IDEMPOTENCY_BODY_TOO_NESTED**: The request body exceeds the
            maximum nesting depth allowed by the idempotency fingerprint hasher.
            Deeply-nested arrays or objects are rejected as a malformed payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorDto'
              example:
                type: INVALID_OID_FORMAT
                title: Invalid Object ID Format
                status: 400
                detail: >-
                  A path or query parameter expected a valid object identifier
                  but received a value that does not match the expected format.
                resolution: >-
                  Verify that all IDs in the request URL and query parameters
                  are correctly formatted. IDs are typically prefixed strings
                  like 'cus_...', 'app_...', or 'doc_...'.
                docs: https://conduit-v2.mintlify.app/errors#invalid-oid-format
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
        '401':
          description: >-
            **API_KEY_MISSING**: The request did not include an API key. All API
            requests must be authenticated.


            **API_KEY_INVALID**: The provided API key is not recognized or has
            been revoked.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
              example:
                type: API_KEY_MISSING
                title: API Key Missing
                status: 401
                detail: >-
                  The request did not include an API key. All API requests must
                  be authenticated.
                resolution: >-
                  Include your API key in the 'x-api-key' header with every
                  request.
                docs: https://conduit-v2.mintlify.app/errors#api-key-missing
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
        '403':
          description: >-
            **API_KEY_READ_ONLY**: This API key has read-only access and cannot
            perform write operations. Read-only keys may make read requests
            (GET, HEAD, OPTIONS) only.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
              example:
                type: API_KEY_READ_ONLY
                title: API Key Is Read-Only
                status: 403
                detail: >-
                  This API key has read-only access and cannot perform write
                  operations. Read-only keys may make read requests (GET, HEAD,
                  OPTIONS) only.
                resolution: >-
                  Use a read-write API key for this request, or have an
                  organization admin mint one from the dashboard.
                docs: https://conduit-v2.mintlify.app/errors#api-key-read-only
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
        '404':
          description: >-
            **WEBHOOK_ENDPOINT_NOT_FOUND**: No webhook endpoint exists with the
            specified ID, or it belongs to a different organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
              example:
                type: WEBHOOK_ENDPOINT_NOT_FOUND
                title: Webhook Endpoint Not Found
                status: 404
                detail: >-
                  No webhook endpoint exists with the specified ID, or it
                  belongs to a different organization.
                resolution: >-
                  Verify the endpoint ID is correct. Use the list webhook
                  endpoints endpoint to find valid IDs for your organization.
                docs: >-
                  https://conduit-v2.mintlify.app/errors#webhook-endpoint-not-found
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
        '409':
          description: >-
            **IDEMPOTENCY_KEY_CONFLICT**: The idempotency key was previously
            used with a different request body. Idempotency keys are bound to
            the exact request shape — replays must match the original.


            **IDEMPOTENCY_KEY_REQUEST_IN_PROGRESS**: A request with this
            idempotency key is already being processed and has not yet
            completed. Concurrent requests with the same key are rejected to
            prevent duplicate execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
              example:
                type: IDEMPOTENCY_KEY_CONFLICT
                title: Idempotency Key Conflict
                status: 409
                detail: >-
                  The idempotency key was previously used with a different
                  request body. Idempotency keys are bound to the exact request
                  shape — replays must match the original.
                resolution: >-
                  Use a fresh idempotency key for the new request, or replay the
                  original request unchanged.
                docs: >-
                  https://conduit-v2.mintlify.app/errors#idempotency-key-conflict
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
        '415':
          description: >-
            **UNSUPPORTED_MEDIA_TYPE**: The request carries a body with a
            Content-Type this endpoint cannot parse. JSON endpoints accept
            'application/json'; a body with no Content-Type header at all is
            assumed to be JSON. File-upload endpoints accept only
            'multipart/form-data' — JSON or undeclared bodies are rejected
            there.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
              example:
                type: UNSUPPORTED_MEDIA_TYPE
                title: Unsupported Media Type
                status: 415
                detail: >-
                  The request carries a body with a Content-Type this endpoint
                  cannot parse. JSON endpoints accept 'application/json'; a body
                  with no Content-Type header at all is assumed to be JSON.
                  File-upload endpoints accept only 'multipart/form-data' — JSON
                  or undeclared bodies are rejected there.
                resolution: >-
                  Send the request body with the 'Content-Type:
                  application/json' header. For file uploads, use 'Content-Type:
                  multipart/form-data' — upload endpoints accept no other body
                  type.
                docs: https://conduit-v2.mintlify.app/errors#unsupported-media-type
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
        '429':
          description: >-
            **RATE_LIMITED**: Too many requests. This error is returned by three
            independent checks: the per-organization bucket applied to every
            authenticated API request; the per-IP bucket applied to
            unauthenticated traffic before an API key is validated; and the
            per-IP bucket applied when repeated invalid API keys are submitted
            from the same address. Honor the Retry-After header (also exposed as
            retryAfterSeconds in the body) before retrying. Current limits and
            remaining budget are visible in X-RateLimit-Limit,
            X-RateLimit-Remaining, and X-RateLimit-Reset on rate-limited route
            responses.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedErrorDto'
              example:
                type: RATE_LIMITED
                title: Rate Limited
                status: 429
                detail: >-
                  Too many requests. This error is returned by three independent
                  checks: the per-organization bucket applied to every
                  authenticated API request; the per-IP bucket applied to
                  unauthenticated traffic before an API key is validated; and
                  the per-IP bucket applied when repeated invalid API keys are
                  submitted from the same address. Honor the Retry-After header
                  (also exposed as retryAfterSeconds in the body) before
                  retrying. Current limits and remaining budget are visible in
                  X-RateLimit-Limit, X-RateLimit-Remaining, and
                  X-RateLimit-Reset on rate-limited route responses.
                resolution: >-
                  Sleep until Retry-After seconds have elapsed, then retry. For
                  sustained workloads exceeding the per-organization defaults,
                  request a rate-limit increase through your support contact.
                docs: https://conduit-v2.mintlify.app/errors#rate-limited
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
                retryAfterSeconds: 3
        '500':
          description: >-
            **INTERNAL_ERROR**: An unexpected error occurred while processing
            your request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetailDto'
              example:
                type: INTERNAL_ERROR
                title: Internal Error
                status: 500
                detail: An unexpected error occurred while processing your request.
                resolution: >-
                  Retry the request after a brief delay. If the error persists,
                  contact support and include the correlationId from the error
                  response for investigation.
                docs: https://conduit-v2.mintlify.app/errors#internal-error
                instance: /v2/...
                correlationId: req_a1b2c3d4
                timestamp: '2026-01-15T09:30:00.000Z'
components:
  schemas:
    WebhookEndpointCreatedResponseDto:
      type: object
      properties:
        id:
          type: string
          pattern: ^wep_[0-9A-Za-z]{22}$
          description: Unique webhook endpoint identifier
        url:
          type: string
          description: URL where webhook payloads are delivered
          example: https://api.example.com/webhooks/conduit
        description:
          type: string
          description: Human-readable description of this endpoint's purpose
          example: Production webhook receiver
          nullable: true
        status:
          description: >-
            Whether this endpoint is currently receiving new deliveries. When
            `disabled`, the endpoint is excluded from event fan-out — no new
            deliveries are enqueued. In-flight (already-enqueued) deliveries are
            not cancelled and continue retrying per the normal schedule. Set
            back to `active` via PATCH to resume receiving new deliveries.
          type: string
          enum:
            - active
            - disabled
        subscription:
          oneOf:
            - type: object
              properties:
                mode:
                  type: string
                  enum:
                    - all
              required:
                - mode
            - type: object
              properties:
                mode:
                  type: string
                  enum:
                    - selected
                eventTypes:
                  type: array
                  items:
                    type: string
                  description: Event types this endpoint is subscribed to
                  example:
                    - customer.created
                    - application.approved
              required:
                - mode
                - eventTypes
          description: Event subscription configuration for this endpoint
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp
          example: '2026-01-15T09:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp
          example: '2026-01-15T09:30:00.000Z'
        secret:
          type: string
          description: >-
            Per-endpoint signing secret. Returned only once — when the endpoint
            is created and again each time its secret is rotated — so store it
            securely. Format: literal `whsec_` prefix + 64 hex chars (see
            `signature.secretFormat`). Pass the FULL string verbatim, including
            the `whsec_` prefix, as the HMAC-SHA256 key when verifying incoming
            `X-Conduit-Signature` headers — stripping the prefix produces a
            different digest and every valid delivery fails verification.
          example: >-
            whsec_8f3a2b1c4d5e6f7081928374a5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e
        signature:
          type: object
          properties:
            algorithm:
              type: string
              description: >-
                Algorithm used to sign webhook deliveries. Verify with
                `crypto.createHmac('sha256', secret)`.
              enum:
                - hmac-sha256
            headerName:
              type: string
              description: >-
                Name of the HTTP header carrying the signature on every
                delivery.
              enum:
                - X-Conduit-Signature
            headerFormat:
              type: string
              description: >-
                Header value format. `t` is the unix epoch in seconds when the
                delivery was signed; each `v1` is a hex-encoded HMAC digest.
                Deliveries normally carry one `v1`. During a signing-secret
                rotation grace window the header carries multiple
                comma-separated `v1=` segments — one per currently-valid secret
                (new and previous). Verify by recomputing the digest for your
                secret and accepting if it matches ANY `v1` segment.
              enum:
                - t=<unix-seconds>,v1=<hex-digest>[,v1=<hex-digest>]
            signedPayloadFormat:
              type: string
              description: >-
                Canonical form fed to the HMAC: the unix timestamp, a literal
                `.`, then the raw request body. Verify by recomputing this
                against the header `t` and comparing the digest.
              enum:
                - <unix-seconds>.<raw-request-body>
            secretFormat:
              type: string
              description: >-
                Per-endpoint signing secret format: the literal prefix `whsec_`
                followed by 64 lowercase hex characters. The FULL string,
                including the `whsec_` prefix, is the HMAC-SHA256 key — do NOT
                strip the prefix before passing the secret to
                `crypto.createHmac`. Stripping the prefix produces a different
                digest and every valid delivery looks indistinguishable from
                signature tampering (silent rejection, no diagnostic).
              enum:
                - whsec_<64-hex>
          required:
            - algorithm
            - headerName
            - headerFormat
            - signedPayloadFormat
            - secretFormat
          additionalProperties: false
          description: >-
            Signature verification metadata. Same constants apply to every
            webhook delivery; signing secrets are per-endpoint.
      required:
        - id
        - url
        - description
        - status
        - subscription
        - createdAt
        - updatedAt
        - secret
        - signature
    ValidationErrorDto:
      type: object
      properties:
        type:
          type: string
          description: Machine-readable error code
          example: CUSTOMER_NOT_FOUND
        title:
          type: string
          description: Human-readable error type label
          example: Customer Not Found
        status:
          type: number
          description: HTTP status code
          example: 404
        detail:
          type: string
          description: Human-readable explanation of this occurrence
          example: Customer with id cus_abc123 not found
        resolution:
          type: string
          description: What the developer should do to resolve this error
          example: >-
            Verify the customer ID. Check you are using the correct API key for
            this organization.
        docs:
          type: string
          description: URL to error documentation
          example: https://conduit-v2.mintlify.app/errors#customer-not-found
        instance:
          type: string
          description: Request path that produced the error
          example: /v2/customers/cus_abc123
        correlationId:
          description: Request correlation ID
          example: req_a1b2c3d4
          type: string
        timestamp:
          type: string
          description: ISO 8601 UTC timestamp
          example: '2026-04-27T20:00:00.000Z'
        details:
          description: >-
            Additional structured data for domain-specific errors (e.g. missing
            field lists, pair info)
        errors:
          type: array
          items:
            type: object
            properties:
              pointer:
                type: string
                description: JSON pointer to the invalid field
                example: /email
              detail:
                type: string
                description: What is wrong with this field
                example: Invalid email format
              allowedValues:
                description: The values this field accepts, when it is a closed set
                example:
                  - ach
                  - fedwire
                  - rtp
                type: array
                items:
                  type: string
              category:
                description: >-
                  Class of blocker (requirements-validator output only). 'field'
                  = form-field gap, 'document' = missing or insufficient
                  document (including per-UBO document slots), 'individual' =
                  required person missing.
                example: field
                type: string
                enum:
                  - field
                  - document
                  - individual
            required:
              - pointer
              - detail
      required:
        - type
        - title
        - status
        - detail
        - resolution
        - docs
        - instance
        - timestamp
    ProblemDetailDto:
      type: object
      properties:
        type:
          type: string
          description: Machine-readable error code
          example: CUSTOMER_NOT_FOUND
        title:
          type: string
          description: Human-readable error type label
          example: Customer Not Found
        status:
          type: number
          description: HTTP status code
          example: 404
        detail:
          type: string
          description: Human-readable explanation of this occurrence
          example: Customer with id cus_abc123 not found
        resolution:
          type: string
          description: What the developer should do to resolve this error
          example: >-
            Verify the customer ID. Check you are using the correct API key for
            this organization.
        docs:
          type: string
          description: URL to error documentation
          example: https://conduit-v2.mintlify.app/errors#customer-not-found
        instance:
          type: string
          description: Request path that produced the error
          example: /v2/customers/cus_abc123
        correlationId:
          description: Request correlation ID
          example: req_a1b2c3d4
          type: string
        timestamp:
          type: string
          description: ISO 8601 UTC timestamp
          example: '2026-04-27T20:00:00.000Z'
        details:
          description: >-
            Additional structured data for domain-specific errors (e.g. missing
            field lists, pair info)
      required:
        - type
        - title
        - status
        - detail
        - resolution
        - docs
        - instance
        - timestamp
    RateLimitedErrorDto:
      type: object
      properties:
        type:
          type: string
          description: Machine-readable error code
          example: CUSTOMER_NOT_FOUND
        title:
          type: string
          description: Human-readable error type label
          example: Customer Not Found
        status:
          type: number
          description: HTTP status code
          example: 404
        detail:
          type: string
          description: Human-readable explanation of this occurrence
          example: Customer with id cus_abc123 not found
        resolution:
          type: string
          description: What the developer should do to resolve this error
          example: >-
            Verify the customer ID. Check you are using the correct API key for
            this organization.
        docs:
          type: string
          description: URL to error documentation
          example: https://conduit-v2.mintlify.app/errors#customer-not-found
        instance:
          type: string
          description: Request path that produced the error
          example: /v2/customers/cus_abc123
        correlationId:
          description: Request correlation ID
          example: req_a1b2c3d4
          type: string
        timestamp:
          type: string
          description: ISO 8601 UTC timestamp
          example: '2026-04-27T20:00:00.000Z'
        details:
          description: >-
            Additional structured data for domain-specific errors (e.g. missing
            field lists, pair info)
        retryAfterSeconds:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
          description: Seconds to wait before retrying
          example: 3
      required:
        - type
        - title
        - status
        - detail
        - resolution
        - docs
        - instance
        - timestamp
        - retryAfterSeconds
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````