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

# Anexar arquivo a um processo com o conteúdo em JSON (base64)



## OpenAPI

````yaml https://api.juridiq.com.br/api-docs/client/openapi.json post /file/law-suits/{id}/json
openapi: 3.1.0
info:
  title: Juridiq API — Documentação para Integradores
  description: >-
    API REST para integradores autenticados com chave (`x-juridiq-api-key`).


    ## Rate limit


    A API aberta limita **120 requisições a cada 60s por chave**.

    Ao exceder, a resposta é `429 Too Many Requests` com os headers
    `x-ratelimit-limit`, `x-ratelimit-remaining`, `x-ratelimit-reset` e
    `retry-after`.

    Respeite o `retry-after` antes de tentar de novo. Sincronizações em lote
    devem paginar e tratar 429 com backoff.
  version: 1.0.0
servers:
  - url: https://api.juridiq.com.br
    description: Production server
security:
  - apiKeyAuth: []
tags: []
paths:
  /file/law-suits/{id}/json:
    post:
      tags:
        - Files
      summary: Anexar arquivo a um processo com o conteúdo em JSON (base64)
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
          description: ID da entidade (processo, cliente ou tarefa)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: object
                  properties:
                    name:
                      type: string
                      minLength: 1
                      maxLength: 255
                      description: >-
                        Nome do arquivo com extensão. Ex:
                        contrato-honorarios.pdf
                    content_base64:
                      type: string
                      minLength: 1
                      description: >-
                        Conteúdo do arquivo em base64. Aceita prefixo
                        data:...;base64, e quebras de linha. Máximo de 10 MB
                        decodificado
                    mime_type:
                      type: string
                      pattern: ^[\w.+-]+\/[\w.+-]+$
                      description: >-
                        MIME type do arquivo. Ausente: application/pdf quando o
                        conteúdo é PDF, senão application/octet-stream
                  required:
                    - name
                    - content_base64
                  additionalProperties: false
                  description: Arquivo em base64
              required:
                - file
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID interno do arquivo (quando existir no banco)
                  name:
                    type: string
                    description: Nome do arquivo
                  previewUrl:
                    type: string
                    description: URL temporária para visualização
                  downloadUrl:
                    type: string
                    description: URL temporária para download
                  size:
                    type: string
                    description: Tamanho formatado
                  type:
                    type: object
                    properties:
                      extension:
                        type: string
                        description: MIME type ou extensão
                      formatted:
                        type: string
                        description: Tipo formatado (pdf, word, png, etc.)
                    required:
                      - extension
                      - formatted
                    additionalProperties: false
                  createdAt:
                    type: string
                    description: Data de criação formatada
                required:
                  - name
                  - previewUrl
                  - downloadUrl
                  - size
                  - type
                  - createdAt
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  translateMessage:
                    type: string
                required:
                  - message
                  - statusCode
                  - translateMessage
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  translateMessage:
                    type: string
                required:
                  - message
                  - statusCode
                  - translateMessage
                additionalProperties: false
        '413':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                  translateMessage:
                    type: string
                required:
                  - message
                  - statusCode
                  - translateMessage
                additionalProperties: false
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-juridiq-api-key
      description: >-
        Chave de API do escritório (criada no painel). Envie o valor no header
        x-juridiq-api-key. A API aberta aplica rate limit por chave (veja a
        documentação de integradores).

````

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