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

# API para criar nota de caso

> Use a API de gerenciamento da Didit para publicar uma nota em texto simples em um caso, com menções, tags e anexos de arquivo opcionais.



Prompt da API para criar nota de caso
        Copiar o prompt para a área de transferência



      
      

\<pre>

\`Post a note to a case through the Management API.

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

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

Request body:
\{
"comment": "Called the customer, awaiting a reply.",  // required
"mentioned_emails": ["teammate@company.com"],           // optional
"is_internal": false,                                    // optional, default false
"attachments": [{"s3_key": "case-notes/<case_uuid>/<uuid>-file.pdf"}],  // optional - upload first via notes/presign/
"tags": ["follow-up"]                                     // optional
}

Behavior:
\- Each attachment's s3_key must be under this case's own case-notes/{case_uuid}/ prefix (returned by the upload endpoint) - otherwise 400.
\- Logs a NOTE_ADDED event and creates mention notifications for mentioned_emails.

Example call:
curl -X POST "https://verification.didit.me/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/" \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"comment": "Called the customer, awaiting a reply.", "tags": ["follow-up"]}'

Response 201: CaseNote.

Failure modes:
\- 400 - an attachment does not belong to this case.
\- 401/403 - auth/permission errors.

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

\</pre>



      
      

Colar em

Publique uma nota em texto simples. Para anexar um arquivo, primeiro faça o upload com `POST .../notes/presign/` e passe o `s3_key` retornado em `attachments`.## Relacionados- [Listar notas do caso](https://docs.didit.me/pt-br/management-api/cases/list-notes.md)
- [Obter caso](https://docs.didit.me/pt-br/management-api/cases/get.md)


## OpenAPI

````yaml pt-br/openapi-25.json POST /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API de verificação de identidade. Autentique-se com o cabeçalho x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/:
    post:
      tags:
        - Case Management
      description: >-
        Adiciona uma nota com escopo de caso. Um client_reference opcional faz
        com que uma nova tentativa inalterada retorne a mesma nota, sem
        atividade ou notificações duplicadas. reply_to deve identificar uma nota
        ativa neste caso. A resposta inclui um trecho limitado da nota original,
        sem copiar esse trecho na nota de resposta salva.
      operationId: create_case_note
      parameters:
        - in: path
          name: organization_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: application_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: case_uuid
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CaseCollaborationCaseNoteCreateRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/CaseCollaborationCaseNoteCreateRequest'
            example:
              comment: Proof of address matches the ID document.
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CaseCollaborationCaseNoteCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseCollaborationCaseNote'
          description: ''
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseCollaborationCaseNote'
          description: ''
        '403':
          description: O chamador não tem a permissão de casos necessária.
        '404':
          description: O caso ou a nota não está disponível para este chamador.
        '409':
          description: >-
            Esta referência do cliente já foi usada para outra nota ou para uma
            nota que foi excluída.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            client = Didit()

            result = client.cases.notes.create(
                "11111111-2222-3333-4444-555555555555",
                comment="Proof of address matches the ID document.",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            const didit = new Didit();


            const result = await
            didit.cases.notes.create("11111111-2222-3333-4444-555555555555", {
              comment: "Proof of address matches the ID document.",
            });

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseCollaborationCaseNoteCreateRequest{\n\tComment: \"Proof of address matches the ID document.\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;

            import me.didit.types.CaseCollaborationCaseNoteCreateRequest;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            Didit client = new Didit();


            var result =
            client.cases().notes().create("11111111-2222-3333-4444-555555555555",
            CaseCollaborationCaseNoteCreateRequest.builder()
                    .comment("Proof of address matches the ID document.")
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            $didit = new DiditClient();


            $result =
            $didit->cases->notes->create('11111111-2222-3333-4444-555555555555',
            [
                'comment' => 'Proof of address matches the ID document.',
            ]);

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID
            # and DIDIT_APPLICATION_ID.
            didit = Didit::Client.new

            result = didit.cases.notes.create(
              "11111111-2222-3333-4444-555555555555",
              comment: "Proof of address matches the ID document."
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID

            // and DIDIT_APPLICATION_ID.

            using var client = new DiditClient();


            var result = await
            client.Cases.Notes.CreateAsync("11111111-2222-3333-4444-555555555555",
            new CaseCollaborationCaseNoteCreateRequest

            {
                Comment = "Proof of address matches the ID document.",
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    CaseCollaborationCaseNoteCreateRequest:
      type: object
      properties:
        comment:
          type: string
          minLength: 1
          maxLength: 10000
        reply_to:
          type: string
          format: uuid
          nullable: true
        client_reference:
          type: string
          format: uuid
          nullable: true
        mentioned_emails:
          type: array
          items:
            type: string
            format: email
            minLength: 1
        is_internal:
          type: boolean
          default: false
        attachments:
          type: array
          items:
            type: object
            additionalProperties: {}
        tags:
          type: array
          items:
            type: string
            minLength: 1
      required:
        - comment
    CaseCollaborationCaseNote:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        comment:
          type: string
        actor_email:
          type: string
          format: email
          nullable: true
          maxLength: 255
        actor_name:
          type: string
          nullable: true
          maxLength: 255
        mentioned_emails: {}
        is_internal:
          type: boolean
        attachments: {}
        tags: {}
        created_at:
          type: string
          format: date-time
          readOnly: true
        reply_to:
          allOf:
            - $ref: '#/components/schemas/CaseCollaborationCaseNoteReply'
          nullable: true
          readOnly: true
        is_pinned:
          type: boolean
        client_reference:
          type: string
          format: uuid
          nullable: true
      required:
        - comment
        - created_at
        - reply_to
        - uuid
    CaseCollaborationCaseNoteReply:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        actor_name:
          type: string
          nullable: true
        actor_email:
          type: string
          format: email
          nullable: true
        comment:
          type: string
          maxLength: 300
      required:
        - actor_email
        - actor_name
        - comment
        - uuid
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Chave de API da sua aplicação, em Developers -> API keys no Business
        Console. A chave principal tem acesso total. Uma chave nomeada pode ter
        escopo restrito: nenhum acesso, leitura ou escrita por recurso, limitada
        a alguns fluxos ou a sessões aprovadas, a uma lista de endereços IP e a
        uma data de validade. 401 significa que a chave está errada, revogada ou
        expirada; 403 significa que nenhuma chave foi enviada, que a chave não
        tem acesso a este recurso ou ação, ou que a requisição veio de um
        endereço fora da sua lista de IPs; 404 em uma rota de sessão significa
        que a sessão está fora dos fluxos ou status da chave. Uma chave sem
        acesso a mídia recebe URLs de imagem, vídeo e PDF como null, e uma chave
        sem permissão de escrita em sessões recebe links e tokens de sessão como
        null. Consulte https://docs.didit.me/console/api-keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.