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

> Create a reusable per-jurisdiction, per-report-type goAML header template. Rejected with 400 if any of the template-level obligatory fields (rentity_id, submission_code, currency_code_local) is missing from field_config; an invalid template cannot be saved or used to create a report. Per-filing header fields (action, submission_date, transactions) are enforced at report validate/finalize time instead.

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 Template API Prompt"
  prompt={`Create a FIU report template through the Management API.

Endpoint:
POST https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/

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

Request body:
{
"name": "US SAR default",         // required
"jurisdiction": "US",               // required, ISO 3166-1 alpha-2, upper-cased on save
"report_type": "SAR",               // required: SAR|STR|CTR|TTR|UTR|IFT|CBR|TFR
"field_config": {
"rentity_id": "FIU-US-00123",     // obligatory - reporting entity ID from your FIU
"submission_code": "E",           // obligatory - E (electronic) or M (manual)
"currency_code_local": "USD",     // obligatory
"enabled_fields": ["reporting_person", "location"]  // optional blocks to include by default
}
}

Validation:
- jurisdiction must be a recognized ISO2 code.
- field_config is checked against the template-level obligatory goAML fields - exactly rentity_id, submission_code, and currency_code_local (3-letter). Missing fields return a 400 listing exactly which ones, and the template cannot be saved until they are filled in.
- The remaining report header fields (action, submission_date, at least one transaction, jurisdiction) are per-filing values, enforced later when the REPORT is validated/finalized - not on the template.

Example call:
curl -X POST "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/report-templates/" \\
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \\
-d '{"name": "US SAR default", "jurisdiction": "US", "report_type": "SAR", "field_config": {"rentity_id": "FIU-US-00123", "submission_code": "E", "currency_code_local": "USD"}}'

Response 201: ReportTemplateDetail.

Failure modes:
- 400 - unrecognized jurisdiction, or field_config missing obligatory fields ({"errors": ["rentity_id", ...]}).
- 401/403 - auth/permission errors (requires write:cases).

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

Create a reusable goAML header template. A template must pass obligatory-field validation (`rentity_id`, `submission_code`, `currency_code_local`) to be saved, both on create and again whenever it is edited. Per-filing header fields such as `action` and `submission_date` are enforced when the report itself is validated or finalized, not on the template.

## Related

* [List report templates](/management-api/report-templates/list)
* [Create report from case](/management-api/regulatory-reports/create-for-case)


## OpenAPI

````yaml POST /v3/organization/{organization_id}/application/{application_id}/report-templates/
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}/report-templates/:
    post:
      tags:
        - Report Templates
      summary: Create report template
      description: >-
        Create a reusable per-jurisdiction, per-report-type goAML header
        template. Rejected with 400 if any of the template-level obligatory
        fields (rentity_id, submission_code, currency_code_local) is missing
        from field_config; an invalid template cannot be saved or used to create
        a report. Per-filing header fields (action, submission_date,
        transactions) are enforced at report validate/finalize time instead.
      operationId: create_report_template
      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.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - jurisdiction
                - report_type
              properties:
                name:
                  type: string
                jurisdiction:
                  type: string
                  minLength: 2
                  maxLength: 2
                  description: ISO 3166-1 alpha-2 country code, upper-cased on save.
                report_type:
                  type: string
                  enum:
                    - SAR
                    - STR
                    - CTR
                    - TTR
                    - UTR
                    - IFT
                    - CBR
                    - TFR
                field_config:
                  type: object
                  description: >-
                    Reusable goAML header defaults. Template-level obligatory
                    fields: rentity_id, submission_code, and currency_code_local
                    (3-letter). Optional: enabled_fields (which optional report
                    blocks to include) plus reporting_person, location, reason,
                    and action defaults. Per-filing header fields (action,
                    submission_date, transactions, jurisdiction) are enforced
                    when the report is validated or finalized, not on the
                    template.
      responses:
        '201':
          description: Template created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportTemplateDetail'
        '400':
          description: >-
            Unrecognized jurisdiction, or field_config fails obligatory-field
            validation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      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/report-templates/'
            \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"name": "US SAR default", "jurisdiction": "US", "report_type": "SAR", "field_config": {"rentity_id": "FIU-US-00123", "submission_code": "E", "currency_code_local": "USD"}}'
        - lang: python
          label: Python
          source: |-
            import os

            import requests

            resp = requests.post(
                'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/',
                headers={'x-api-key': os.environ['DIDIT_API_KEY']},
                json={
                    'name': 'US SAR default',
                    'jurisdiction': 'US',
                    'report_type': 'SAR',
                    'field_config': {'rentity_id': 'FIU-US-00123', 'submission_code': 'E', 'currency_code_local': 'USD'},
                },
                timeout=10,
            )
            resp.raise_for_status()
            print(resp.json()['uuid'])
components:
  schemas:
    ReportTemplateDetail:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
        jurisdiction:
          type: string
          minLength: 2
          maxLength: 2
          description: ISO 3166-1 alpha-2 country code.
        report_type:
          type: string
          enum:
            - SAR
            - STR
            - CTR
            - TTR
            - UTR
            - IFT
            - CBR
            - TFR
        report_type_display:
          type: string
        field_config:
          type: object
          description: >-
            Reusable goAML header defaults. Template-level obligatory fields:
            rentity_id, submission_code, and currency_code_local (3-letter).
            Optional: enabled_fields (which optional report blocks to include)
            plus reporting_person, location, reason, and action defaults.
            Per-filing header fields (action, submission_date, transactions,
            jurisdiction) are enforced when the report is validated or
            finalized, not on the template.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time

````