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

# Delete Webhook Destination

> Soft-delete a webhook destination. Future events stop; historical delivery records are retained for audit. Calling again returns 404.

export const AgentPromptAccordion = ({prompt, title = "AI Agent Integration Prompt"}) => {
  const [copied, setCopied] = React.useState(false);
  const handleCopy = e => {
    e.stopPropagation();
    if (!prompt) return;
    navigator.clipboard.writeText(prompt.trim()).then(() => {
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    });
  };
  const agents = ["Claude Code", "Codex", "Cursor", "Devin", "Windsurf", "GitHub Copilot"];
  return <div className="didit-agent-card">
      {}
      <div className="didit-agent-titlebar">
        <div className="didit-agent-dots" aria-hidden="true">
          <span className="didit-agent-dot didit-agent-dot-red"></span>
          <span className="didit-agent-dot didit-agent-dot-yellow"></span>
          <span className="didit-agent-dot didit-agent-dot-green"></span>
        </div>
        <span className="didit-agent-filename">{title}</span>
        <button type="button" className={`didit-agent-copy ${copied ? "didit-agent-copy-copied" : ""}`} onClick={handleCopy} title="Copy prompt to clipboard" aria-label={copied ? "Copied!" : "Copy prompt to clipboard"}>
          {copied ? <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
              </svg>
              <span>Copied</span>
            </> : <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" strokeWidth="1.5" />
                <path d="M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" stroke="currentColor" strokeWidth="1.5" />
              </svg>
              <span>Copy</span>
            </>}
        </button>
      </div>

      {}
      <pre className="didit-agent-body"><code>{prompt.trim()}</code></pre>

      {}
      <div className="didit-agent-footer">
        <span className="didit-agent-footer-label">Paste into</span>
        <div className="didit-agent-chips">
          {agents.map(name => <span key={name} className="didit-agent-chip">{name}</span>)}
        </div>
      </div>
    </div>;
};

<AgentPromptAccordion
  title="Delete Webhook Destination API Prompt"
  prompt={`Delete a Didit webhook destination through the Management API.

Endpoint:
DELETE https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/

Authentication:
Use the x-api-key header with my Didit API key.

Goal:
- Soft-delete a destination so Didit stops pushing webhooks to its URL. Use this when retiring an integration, rotating to a new URL, or cleaning up test destinations.

Path parameter:
- destination_uuid — the destination UUID from GET /v3/webhook/destinations/.

Important semantics:
- After this call, future webhooks for the events this destination was subscribed to are no longer pushed to its URL. Other destinations subscribed to the same events continue to receive deliveries.
- The destination disappears from GET /v3/webhook/destinations/ and subsequent GET /v3/webhook/destinations/{destination_uuid}/ calls return 404.
- Historical delivery records are preserved — past deliveries are still queryable from the Console for audit.
- If this was the application's only enabled destination, Didit also clears the legacy webhook_url on the application so other tooling sees "no webhook configured".
- Returns 204 No Content with an empty body on success.
- Idempotent in effect: calling DELETE again on the same UUID returns 404.

Workflow when rotating endpoints:
1. POST /v3/webhook/destinations/ to create the new destination and capture its secret_shared_key.
2. Verify the new endpoint is receiving and validating webhooks correctly.
3. DELETE the old destination.

Example call:
curl -X DELETE "https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/" \\
-H "x-api-key: YOUR_API_KEY"

Failure modes:
- 401 — missing or malformed x-api-key.
- 403 — canonical { "detail": "You do not have permission to perform this action." } envelope.
- 404 — destination not found in this application (or already deleted).

Side effects:
- Destination is soft-deleted; deliveries stop immediately.

For the full integration shape, see /integration/integration-prompt.`}
/>


## OpenAPI

````yaml DELETE /v3/webhook/destinations/{destination_uuid}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/webhook/destinations/{destination_uuid}/:
    delete:
      tags:
        - Webhook
      summary: Delete webhook destination
      description: >-
        Soft-delete a webhook destination. Future events stop; historical
        delivery records are retained for audit. Calling again returns 404.
      operationId: delete_webhook_destination
      parameters:
        - name: destination_uuid
          in: path
          required: true
          description: UUID of the destination to delete.
          schema:
            type: string
            format: uuid
          example: 11111111-2222-3333-4444-555555555555
      responses:
        '204':
          description: Destination deleted. No response body.
        '403':
          description: >-
            API key missing, malformed, expired, or scoped to a different
            application. Didit returns 403 (never 401) for all authentication
            failures on this endpoint.
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            No destination with this UUID exists for the application (already
            deleted or never existed).
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Webhook destination not found.
        '429':
          description: Rate limit exceeded; back off and retry.
          content:
            application/json:
              examples:
                Throttled:
                  value:
                    detail: Request was throttled. Expected available in 30 seconds.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X DELETE
            'https://verification.didit.me/v3/webhook/destinations/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            import os

            import requests

            uuid = '11111111-2222-3333-4444-555555555555'
            resp = requests.delete(
                f'https://verification.didit.me/v3/webhook/destinations/{uuid}/',
                headers={'x-api-key': os.environ['DIDIT_API_KEY']},
                timeout=10,
            )
            resp.raise_for_status()
            assert resp.status_code == 204
        - lang: javascript
          label: JavaScript
          source: >-
            const uuid = '11111111-2222-3333-4444-555555555555';

            const resp = await
            fetch(`https://verification.didit.me/v3/webhook/destinations/${uuid}/`,
            {
              method: 'DELETE',
              headers: { 'x-api-key': process.env.DIDIT_API_KEY },
            });

            if (resp.status !== 204) throw new Error(`Delete failed:
            ${resp.status}`);
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````