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

# Receber proposta da célula

> Onde a célula entrega o diff proposto pelo assistente de configuração.



## OpenAPI

````yaml openapi/pt/control.json POST /v1/config/proposals
openapi: 3.1.0
info:
  title: API de controle da Niadra
  version: '1'
  description: >-
    Tenants, projetos, fontes, chaves, pessoas, configuração e uso. Nunca recebe
    conteúdo de cliente.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/config/proposals:
    post:
      summary: Receber proposta da célula
      description: >-
        Onde uma célula entrega o diff proposto pelo assistente de configuração.
        O diff chega com o estado `proposed` e espera uma pessoa aprovar. Só
        configuração passa por aqui: amostras e valores de cliente ficam na
        célula. Usada pelas células da Niadra, não pelo seu código.


        **Autenticação.** Credencial de célula (`X-Niadra-Cell-Token`). Usada
        pelas células da Niadra, não pelo seu código.
      operationId: propose_v1_config_proposals_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProposalCreate'
            example:
              cell_id: cell-1
              space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
              type: trigger-rules
              document:
                - rule_id: overdue_visit
                  condition: promise.overdue
                  version: '1'
                  enabled: true
                  params:
                    days: 1
                  endpoint_id: whe_crm
                  window_hours: 24
                  late_policy: deliver_marked
              reason: Notify the CRM one day after a promised visit is missed
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiffOut'
              example:
                diff_id: 0192f7b2-6071-7283-9e94-0f1a2b3c4d56
                space_id: 0192f0a0-3d4e-7f50-8b61-7c8d9e0f1a23
                type: trigger-rules
                document:
                  - rule_id: overdue_visit
                    condition: promise.overdue
                    version: '1'
                    enabled: true
                    params:
                      days: 1
                    endpoint_id: whe_crm
                    window_hours: 24
                    late_policy: deliver_marked
                reason: Notify the CRM one day after a promised visit is missed
                status: proposed
                base_version: 7
                applied_version: null
                author_id: null
                author_label: assistant@cell-1
                created_at: '2026-09-22T18:10:00Z'
                decided_at: null
                decided_by: null
                rollback_of: null
          description: O diff proposto.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: O pedido não bate com o contrato.
      security:
        - cellToken: []
components:
  schemas:
    ProposalCreate:
      additionalProperties: false
      properties:
        cell_id:
          title: Cell Id
          type: string
        document:
          title: Document
        reason:
          maxLength: 1000
          minLength: 3
          title: Reason
          type: string
        space_id:
          format: uuid
          title: Space Id
          type: string
        type:
          title: Type
          type: string
      required:
        - space_id
        - type
        - document
        - reason
        - cell_id
      title: ProposalCreate
      type: object
    DiffOut:
      additionalProperties: false
      properties:
        applied_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Applied Version
          description: A versão que o diff criou quando foi aplicado.
        author_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Author Id
        author_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Label
          description: Preenchido quando uma célula propôs o diff, como `assistant@cell-1`.
        base_version:
          title: Base Version
          type: integer
          description: >-
            A versão da configuração sobre a qual o diff foi escrito. Um diff
            escrito sobre um documento desatualizado é recusado na aprovação.
        created_at:
          format: date-time
          title: Created At
          type: string
        decided_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Decided At
        decided_by:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Decided By
        diff_id:
          format: uuid
          title: Diff Id
          type: string
        document:
          title: Document
        reason:
          title: Reason
          type: string
        rollback_of:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Rollback Of
          description: O diff que este desfez.
        space_id:
          format: uuid
          title: Space Id
          type: string
        status:
          $ref: '#/components/schemas/DiffStatus'
        type:
          title: Type
          type: string
      required:
        - diff_id
        - space_id
        - type
        - status
        - reason
        - base_version
        - author_id
        - author_label
        - decided_by
        - decided_at
        - applied_version
        - rollback_of
        - created_at
        - document
      title: DiffOut
      type: object
    Problem:
      additionalProperties: false
      description: >-
        Detalhes do problema no formato da RFC 9457; `code` vem do catálogo de
        erros versionado.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
    DiffStatus:
      enum:
        - pending
        - proposed
        - applied
        - rejected
      title: DiffStatus
      type: string
  securitySchemes:
    cellToken:
      type: apiKey
      in: header
      name: X-Niadra-Cell-Token

````