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

# Create Report From Case

> Create a draft FIU report for the case: DRAFT status, auto-populated from the optional template plus the case's subject, linked transactions, and narrative. Validate then finalize to produce the goAML XML and PDF.

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="Create Report From Case API Prompt"
  prompt={`Create a draft FIU report from a case through the Management API.

Endpoint:
POST https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/

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

Request body (all optional if a template is given):
{
"template": "<report-template-uuid>",   // seeds rentity_id, submission_code, currency_code_local, etc.
"report_type": "SAR",                     // required if no template
"jurisdiction": "US",                     // required if no template
"transactions": ["<transaction-uuid>"]    // optional - defaults to the case's linked transactions
}

Behavior:
- Draft is auto-populated from the template (if given) plus the case's subject, linked transactions, and a narrative structured around the five Ws (who/what/when/where/why/how) for SAR/STR/TFR.
- Status starts as DRAFT. Call validate then finalize next.

Example call:
curl -X POST "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/" \\
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \\
-d '{"template": "<uuid>"}'

Response 201: RegulatoryReportDetail with status "DRAFT".

Failure modes:
- 400 - the referenced template was not found.
- 401/403 - auth/permission errors (requires write:cases).

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

Create a draft report scoped to a case. Prefer this over the standalone create endpoint when you already have the case open - it can omit `template` and derive `report_type`/`jurisdiction` directly.

## Related

* [List reports](/management-api/regulatory-reports/list)
* [Validate report](/management-api/regulatory-reports/validate)
* [Finalize report](/management-api/regulatory-reports/finalize)


## OpenAPI

````yaml POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/
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/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/regulatory-reports/:
    post:
      tags:
        - Regulatory Reports
      summary: Create report from case
      description: >-
        Create a draft FIU report for the case: DRAFT status, auto-populated
        from the optional template plus the case's subject, linked transactions,
        and narrative. Validate then finalize to produce the goAML XML and PDF.
      operationId: create_case_regulatory_report
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Organization UUID.
        - name: application_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Application UUID.
        - name: case_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: c1a5e000-0000-4000-8000-000000000001
          description: Case UUID.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                report_type:
                  type: string
                  enum:
                    - SAR
                    - STR
                    - CTR
                    - TTR
                    - UTR
                    - IFT
                    - CBR
                    - TFR
                  description: >-
                    Required unless a template is given; the template's
                    report_type is used otherwise.
                jurisdiction:
                  type: string
                  minLength: 2
                  maxLength: 2
                  description: Required unless a template is given.
                template:
                  type: string
                  format: uuid
                  nullable: true
                  description: >-
                    Report template UUID; its field_config seeds the draft
                    before case-derived data is merged in.
                transactions:
                  type: array
                  items:
                    type: string
                    format: uuid
                  nullable: true
                  description: >-
                    Transactions to attach; defaults to the case's linked
                    transactions.
                rentity_id:
                  type: string
                  nullable: true
                rentity_branch:
                  type: string
                  nullable: true
                submission_code:
                  type: string
                  enum:
                    - E
                    - M
                  default: E
                entity_reference:
                  type: string
                  nullable: true
                fiu_ref_number:
                  type: string
                  nullable: true
                currency_code_local:
                  type: string
                  minLength: 3
                  maxLength: 3
                  nullable: true
                submission_date:
                  type: string
                  format: date-time
                  nullable: true
                reporting_person:
                  type: object
                location:
                  type: object
                reason:
                  type: string
                  nullable: true
                action:
                  type: string
                  nullable: true
                activity:
                  type: string
                  nullable: true
                narrative:
                  type: object
                  properties:
                    who:
                      type: string
                    what:
                      type: string
                    when:
                      type: string
                    where:
                      type: string
                    why:
                      type: string
                    how:
                      type: string
                report_indicators:
                  type: array
                  items:
                    type: string
                included_fields:
                  type: array
                  items:
                    type: string
      responses:
        '201':
          description: Draft report created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegulatoryReportDetail'
        '400':
          description: The referenced template was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/regulatory-reports/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"template": "7ec00000-0000-4000-8000-000000000006"}'
components:
  schemas:
    RegulatoryReportDetail:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        case_uuid:
          type: string
          format: uuid
        case_number:
          type: string
          nullable: true
        report_type:
          type: string
          enum:
            - SAR
            - STR
            - CTR
            - TTR
            - UTR
            - IFT
            - CBR
            - TFR
        report_type_display:
          type: string
        report_code:
          type: string
          description: goAML report code derived from report_type, e.g. STR, CTR, BCR.
        report_number:
          type: string
          nullable: true
        status:
          type: string
          enum:
            - DRAFT
            - VALIDATED
            - FINALIZED
        status_display:
          type: string
        jurisdiction:
          type: string
          minLength: 2
          maxLength: 2
        rentity_id:
          type: string
          nullable: true
          description: Reporting entity ID issued by the FIU.
        rentity_branch:
          type: string
          nullable: true
        submission_code:
          type: string
          enum:
            - E
            - M
        entity_reference:
          type: string
          nullable: true
        fiu_ref_number:
          type: string
          nullable: true
        currency_code_local:
          type: string
          minLength: 3
          maxLength: 3
          nullable: true
        submission_date:
          type: string
          format: date-time
          nullable: true
        reporting_person:
          type: object
        location:
          type: object
        reason:
          type: string
          nullable: true
        action:
          type: string
          nullable: true
        activity:
          type: string
          nullable: true
        narrative:
          type: object
          description: Five Ws narrative sections.
          properties:
            who:
              type: string
            what:
              type: string
            when:
              type: string
            where:
              type: string
            why:
              type: string
            how:
              type: string
        report_indicators:
          type: array
          items:
            type: string
        included_fields:
          type: array
          items:
            type: string
        transactions:
          type: array
          items:
            type: string
            format: uuid
        validation_errors:
          type: array
          description: >-
            Result of the most recent validation; each entry is a {field,
            message} object.
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
        validated_at:
          type: string
          format: date-time
          nullable: true
        finalized_at:
          type: string
          format: date-time
          nullable: true
        created_by_email:
          type: string
          nullable: true
        created_by_name:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time

````