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

# Registrar célula

> Registra uma célula nova. Rota da operação da Niadra.



## OpenAPI

````yaml openapi/pt/control.json POST /v1/cells
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/cells:
    post:
      summary: Registrar célula
      description: >-
        Registra uma célula nova numa região. Usada pela operação da Niadra.


        **Autenticação.** Credencial de operador (`X-Niadra-Operator-Token`).
        Usada pela operação da Niadra, não pelo seu código.
      operationId: register_cell_v1_cells_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CellCreate'
            example:
              cell_id: cell-2
              region: us-east-1
              address: https://cell-2.us-east-1.api.niadra.com
              capacity: 40
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CellOut'
              example:
                cell_id: cell-2
                region: us-east-1
                address: https://cell-2.us-east-1.api.niadra.com
                capacity: 40
                status: active
                code_version: null
                schema_revision: null
          description: A célula.
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: O pedido não bate com o contrato.
      security:
        - operatorToken: []
components:
  schemas:
    CellCreate:
      additionalProperties: false
      properties:
        address:
          pattern: ^https://
          title: Address
          type: string
        capacity:
          minimum: 1
          title: Capacity
          type: integer
          description: Quantos espaços a célula pode atender.
        cell_id:
          pattern: ^[a-z0-9-]{3,63}$
          title: Cell Id
          type: string
        region:
          pattern: ^[a-z]{2}(-[a-z]+)+-\d{1,2}$
          title: Region
          type: string
      required:
        - cell_id
        - region
        - address
        - capacity
      title: CellCreate
      type: object
    CellOut:
      additionalProperties: false
      properties:
        address:
          title: Address
          type: string
        capacity:
          title: Capacity
          type: integer
        cell_id:
          title: Cell Id
          type: string
        code_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Code Version
        region:
          title: Region
          type: string
        schema_revision:
          anyOf:
            - type: string
            - type: 'null'
          title: Schema Revision
        status:
          $ref: '#/components/schemas/CellStatus'
      required:
        - cell_id
        - region
        - address
        - capacity
        - status
      title: CellOut
      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
    CellStatus:
      enum:
        - active
        - draining
        - closed
      title: CellStatus
      type: string
  securitySchemes:
    operatorToken:
      type: apiKey
      in: header
      name: X-Niadra-Operator-Token

````