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

# Criar chave de API

> Gera uma nova chave de API. O token é exibido apenas uma vez.



## OpenAPI

````yaml https://api.juridiq.com.br/openapi.json post /api-keys/
openapi: 3.1.0
info:
  title: Juridiq Server API (interno)
  description: Documentação técnica **interna** da API Juridiq Server
  version: 1.0.0
servers:
  - url: http://localhost:3001
    description: Development server
  - url: https://api.juridiq.com.br
    description: Production server
security:
  - bearerAuth: []
paths:
  /api-keys/:
    post:
      tags:
        - API Keys
      summary: Criar chave de API
      description: Gera uma nova chave de API. O token é exibido apenas uma vez.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
              required:
                - name
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  token:
                    type: string
                  createdAt:
                    type: string
                required:
                  - id
                  - name
                  - token
                  - 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
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Insira o token JWT no formato: Bearer {token}'

````