> ## 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 responsável comercial

> Cria responsável comercial no hub



## OpenAPI

````yaml /openapi.json post /salespeople
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:
  /salespeople:
    post:
      tags:
        - Salespeople
      summary: Criar responsável comercial
      description: Cria responsável comercial no hub
      operationId: salespeople.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreSalespersonRequest'
      responses:
        '201':
          description: '`JsonResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SalespersonResource'
                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'
        '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:
    StoreSalespersonRequest:
      type: object
      description: >-
        Criação de responsável comercial (Salesperson) via Management API
        (Domínio 0).

        Espelha a validação do quick-create em
        Hub/Events/EventCreate::saveCreateSalesperson.
      properties:
        name:
          type: string
          maxLength: 120
        legal_name:
          type:
            - string
            - 'null'
          maxLength: 120
        document_type:
          type:
            - string
            - 'null'
          maxLength: 20
        document:
          type:
            - string
            - 'null'
          maxLength: 20
        email:
          type:
            - string
            - 'null'
          format: email
          maxLength: 100
        phone:
          type:
            - string
            - 'null'
          maxLength: 20
      required:
        - name
      title: StoreSalespersonRequest
    SalespersonResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        legal_name:
          type:
            - string
            - 'null'
        document_type:
          type:
            - string
            - 'null'
        document:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        phone:
          type:
            - string
            - 'null'
        mobile:
          type:
            - string
            - 'null'
        commercial_status:
          type:
            - string
            - 'null'
        status:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - legal_name
        - document_type
        - document
        - email
        - phone
        - mobile
        - commercial_status
        - status
        - created_at
        - updated_at
      title: SalespersonResource
    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
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        API key do hub com escopo `manage`. Header: `Authorization: Bearer
        <api_key>`.
      scheme: bearer

````