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

# Criar checkpoint

> Adiciona um ponto



## OpenAPI

````yaml /openapi.json post /events/{event}/checkpoints
openapi: 3.1.0
info:
  title: Eventor Management API v1
  version: 1.0.0
  description: >-
    Management API do Eventor (Fase 9) — configuração de evento ponta a ponta
    por agente/CLI. Autenticação: `Authorization: Bearer <api_key>` com escopo
    `manage`.


    Envelope de sucesso: `{data}` (item) e `{data,meta,links}` (coleção
    paginada).

    Envelope de erro: `{error,message,details}`.
servers:
  - url: http://localhost/api/v1
security:
  - bearerAuth: []
paths:
  /events/{event}/checkpoints:
    post:
      tags:
        - Checkpoints
      summary: Criar checkpoint
      description: Adiciona um ponto
      operationId: checkpoints.store
      parameters:
        - name: event
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreCheckpointRequest'
      responses:
        '201':
          description: '`JsonResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CheckpointResource'
                required:
                  - data
        '401':
          description: API key ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: A API key não tem o escopo `manage`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Recurso não encontrado neste hub.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: 'Conflito (ex.: dependência que impede a operação).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Falha de validação dos dados enviados.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    StoreCheckpointRequest:
      type: object
      description: >-
        POST /api/v1/events/{event}/checkpoints — ponto de controle do evento.

        Espelha EventView::saveCheckpoint + UpdateRaceConfigRequest
        (checkpoints.*).

        code é único por evento (validado no controller, que tem o contexto do
        evento).
      properties:
        code:
          type: string
          maxLength: 10
        name:
          type:
            - string
            - 'null'
          maxLength: 80
        latitude:
          type:
            - number
            - 'null'
          minimum: -90
          maximum: 90
        longitude:
          type:
            - number
            - 'null'
          minimum: -180
          maximum: 180
        altitude:
          type:
            - number
            - 'null'
        description:
          type:
            - string
            - 'null'
          maxLength: 255
        physical_type:
          type:
            - string
            - 'null'
          maxLength: 20
        status:
          $ref: '#/components/schemas/CommonStatus'
      required:
        - code
      title: StoreCheckpointRequest
    CheckpointResource:
      type: object
      properties:
        id:
          type: integer
        event_id:
          type: integer
        code:
          type: string
        name:
          type:
            - string
            - 'null'
        latitude:
          type:
            - number
            - 'null'
        longitude:
          type:
            - number
            - 'null'
        altitude:
          type:
            - number
            - 'null'
        description:
          type:
            - string
            - 'null'
        physical_type:
          type:
            - string
            - 'null'
        status:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - event_id
        - code
        - name
        - latitude
        - longitude
        - altitude
        - description
        - physical_type
        - status
        - created_at
        - updated_at
      title: CheckpointResource
    ApiError:
      type: object
      properties:
        error:
          type: string
          description: >-
            Código machine-parseable (ex.: validation_failed, forbidden_scope,
            not_found).
        message:
          type: string
          description: Mensagem legível (português).
        details:
          type:
            - object
            - 'null'
          description: 'Detalhes opcionais (ex.: erros de validação por campo).'
          additionalProperties: {}
      required:
        - error
        - message
      title: ApiError
    CommonStatus:
      type: string
      description: >
        Status genérico usado por várias entidades (Hub, User, Group, Category,
        etc.). Entidades com estados específicos (Event, Registration) têm enums
        próprios.
      enum:
        - active
        - inactive
        - suspended
      title: CommonStatus
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        API key do hub com escopo `manage`. Header: `Authorization: Bearer
        <api_key>`.
      scheme: bearer

````