> ## 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 Questionnaire

> Permanently delete one questionnaire version (hard delete, no undo). Stored questionnaire responses linked to this version are deleted with it, and sessions referencing it lose the link; other versions in the same group are not deleted. Workflows that referenced it keep running but the questionnaire step can no longer load it.

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 Questionnaire API Prompt"
  prompt={`Delete a Didit questionnaire through the Management API.

Endpoint:
DELETE https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/

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

Goal:
- Remove a questionnaire that I no longer use.

Path parameter:
- questionnaire_uuid — the per-version questionnaire UUID returned by GET /v3/questionnaires/ or POST /v3/questionnaires/.

Important semantics:
- Any workflow that references this questionnaire (via a QUESTIONNAIRE feature with config.questionnaire_uuid) must be updated; otherwise sessions created against that workflow will fail at the questionnaire step.
- Sessions already in progress are not affected — they continue against the snapshot they were created with.
- Returns 204 No Content on success with an empty body.

Workflow:
1. Before deleting, list workflows and check which ones reference this questionnaire (workflow_names on the list response, or inspect features in GET /v3/workflows/{settings_uuid}/).
2. PATCH any workflows to point at a different questionnaire_uuid or remove the QUESTIONNAIRE feature.
3. Then DELETE the questionnaire.

Example call:
curl -X DELETE "https://verification.didit.me/v3/questionnaires/{questionnaire_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 when the questionnaire belongs to a different application than the API key.
- 404 — questionnaire not found in this application; calling DELETE again on the same UUID is also 404.

Side effects:
- Soft-deletes the questionnaire record.

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


## OpenAPI

````yaml DELETE /v3/questionnaires/{questionnaire_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/questionnaires/{questionnaire_uuid}/:
    delete:
      tags:
        - Questionnaires
      summary: Delete questionnaire
      description: >-
        Permanently delete one questionnaire version (hard delete, no undo).
        Stored questionnaire responses linked to this version are deleted with
        it, and sessions referencing it lose the link; other versions in the
        same group are not deleted. Workflows that referenced it keep running
        but the questionnaire step can no longer load it.
      operationId: delete_questionnaire
      parameters:
        - name: questionnaire_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Per-version UUID of the questionnaire to delete.
      responses:
        '204':
          description: Questionnaire deleted. The response body is empty.
        '403':
          description: API key missing or invalid.
          content:
            application/json:
              examples:
                Invalid token:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            No questionnaire with this `questionnaire_uuid` exists for the
            authenticated application.
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Not found.
        '429':
          description: Rate limit exceeded. Retry with exponential backoff.
        '500':
          description: Unexpected server error. Safe to retry.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X DELETE
            'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: Python
          label: Python (requests)
          source: |-
            import requests

            resp = requests.delete(
                f"https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/",
                headers={"x-api-key": "YOUR_API_KEY"},
                timeout=10,
            )
            resp.raise_for_status()  # raises on 4xx/5xx; 204 is success
        - lang: JavaScript
          label: Node.js (fetch)
          source: >-
            const res = await
            fetch(`https://verification.didit.me/v3/questionnaires/${questionnaireUuid}/`,
            {
              method: "DELETE",
              headers: { 'x-api-key': 'YOUR_API_KEY' },
            });

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

````