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

# Archive company



## OpenAPI

````yaml /api-reference/openapi.json post /v2/companies/{id}/archive
openapi: 3.1.0
info:
  title: Base39 API
  description: Base39 API
  version: 1.0.0
  contact:
    name: Base39 Team
    url: https://base39.com.br
    email: suporte@base39.com.br
  termsOfService: https://base39.com.br/termos
  license:
    name: Proprietary
    url: https://base39.com.br/termos
servers:
  - url: http://localhost:3000
    description: Local
  - url: https://api.dev.base39.cloud
    description: Development
  - url: https://api.base39.com.br
    description: Production
security:
  - OAuth2: []
tags:
  - name: pages
    description: Profiles and reports pages
  - name: pipelines
    description: Pipeline boards (kanban) of pages
  - name: blocks
    description: Blocks operations
  - name: search
    description: Search across content
  - name: targets
    description: Lookup targets via datasets
  - name: CognitoTriggers
    description: Cognito triggers
paths:
  /v2/companies/{id}/archive:
    post:
      tags:
        - companies
      summary: Archive company
      operationId: company_archive
      parameters:
        - name: id
          required: true
          in: path
          description: Company ID (cmp_*)
          schema:
            type: string
      responses:
        '200':
          description: Company archived
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        '401':
          description: Unauthorized
        '404':
          description: Company not found
components:
  schemas:
    Company:
      type: object
      properties:
        object:
          type: string
          example: page
          description: Object type
          title: Object
          x-locale-pt-br-title: Objeto
        id:
          type: string
          example: p_abc123
          description: Unique identifier
          title: ID
          x-locale-pt-br-title: ID
        createdAt:
          format: date-time
          type: string
          example: '2024-01-15T10:30:00.000Z'
          description: Creation timestamp
          title: Created at
          x-locale-pt-br-title: Criado em
        updatedAt:
          format: date-time
          type: string
          example: '2024-01-15T14:45:00.000Z'
          description: Last update timestamp
          title: Updated at
          x-locale-pt-br-title: Atualizado em
        createdBy:
          type: object
          example:
            object: user
            id: u_abc123
            apiKeyId: bsk_abc123
          description: Principal who created this object
          properties:
            object:
              type: string
              enum:
                - user
                - service_account
              example: user
            id:
              type: string
              example: u_abc123
            apiKeyId:
              type: string
              example: bsk_abc123
          title: Created by
          x-locale-pt-br-title: Criado por
        updatedBy:
          type: object
          example:
            object: user
            id: u_abc123
            apiKeyId: bsk_abc123
          description: Principal who last updated this object
          properties:
            object:
              type: string
              enum:
                - user
                - service_account
                - webhook
                - stream
              example: user
            id:
              type: string
              example: u_abc123
            apiKeyId:
              type: string
              example: bsk_abc123
          title: Updated by
          x-locale-pt-br-title: Atualizado por
        legalName:
          type: string
          title: Legal name
          x-locale-pt-br-title: Razão social
        tradeName:
          type: string
          title: Trade name
          x-locale-pt-br-title: Nome fantasia
        document:
          type: string
          example: '00000000000191'
          title: Document
          x-locale-pt-br-title: CNPJ
        icon:
          nullable: true
          title: Icon
          x-locale-pt-br-title: Ícone
          allOf:
            - $ref: '#/components/schemas/IconOutput'
        archived:
          type: boolean
          default: false
          title: Archived
          x-locale-pt-br-title: Arquivada
        archivedAt:
          type: string
          title: Archived at
          x-locale-pt-br-title: Arquivada em
        archivedBy:
          type: string
          title: Archived by
          x-locale-pt-br-title: Arquivada por
        addressState:
          type: string
          title: Address state
          x-locale-pt-br-title: UF
        addressType:
          type: string
          title: Address type
          x-locale-pt-br-title: Tipo de logradouro
        addressStreet:
          type: string
          title: Address street
          x-locale-pt-br-title: Logradouro
        addressNumber:
          type: string
          title: Address number
          x-locale-pt-br-title: Número
        addressComplement:
          type: string
          title: Address complement
          x-locale-pt-br-title: Complemento
        addressNeighborhood:
          type: string
          title: Address neighborhood
          x-locale-pt-br-title: Bairro
        addressZipCode:
          type: string
          title: Address ZIP code
          x-locale-pt-br-title: CEP
        addressCity:
          type: string
          title: Address city
          x-locale-pt-br-title: Cidade
        registrationStatus:
          type: string
          title: Registration status
          x-locale-pt-br-title: Situação cadastral
        registrationStatusDate:
          type: string
          nullable: true
          title: Registration status date
          x-locale-pt-br-title: Data da situação cadastral
        email:
          type: string
          nullable: true
          title: Email
          x-locale-pt-br-title: Email
        phones:
          nullable: true
          title: Phones
          x-locale-pt-br-title: Telefones
          type: array
          items:
            type: string
        companySize:
          type: string
          nullable: true
          title: Company size
          x-locale-pt-br-title: Porte
        capital:
          type: string
          nullable: true
          title: Capital
          x-locale-pt-br-title: Capital
        legalNatureCode:
          type: number
          nullable: true
          title: Legal nature code
          x-locale-pt-br-title: Código da natureza jurídica
        legalNatureDescription:
          type: string
          nullable: true
          title: Legal nature description
          x-locale-pt-br-title: Natureza jurídica
        simplesOption:
          type: boolean
          nullable: true
          title: Simples option
          x-locale-pt-br-title: Optante pelo Simples
        simplesOptionDate:
          type: string
          nullable: true
          title: Simples option date
          x-locale-pt-br-title: Data da opção pelo Simples
        meiOption:
          type: boolean
          nullable: true
          title: MEI option
          x-locale-pt-br-title: Optante pelo MEI
        meiOptionDate:
          type: string
          nullable: true
          title: MEI option date
          x-locale-pt-br-title: Data da opção pelo MEI
        mainCnae:
          title: Main CNAE
          x-locale-pt-br-title: CNAE principal
          allOf:
            - $ref: '#/components/schemas/CnaeInfoOutput'
        secondaryCnaes:
          title: Secondary CNAEs
          x-locale-pt-br-title: CNAEs secundários
          type: array
          items:
            $ref: '#/components/schemas/CnaeInfoOutput'
        isHeadquarter:
          type: boolean
          title: Headquarter
          x-locale-pt-br-title: Matriz
        activityStartDate:
          type: string
          nullable: true
          title: Activity start date
          x-locale-pt-br-title: Data de início das atividades
      required:
        - object
        - id
        - createdAt
        - updatedAt
        - document
        - archived
    IconOutput:
      type: object
      properties:
        type:
          type: string
          enum:
            - emoji
            - external
            - file_upload
            - domain
            - file
            - lucide
            - dicebear
            - brand
        emoji:
          type: string
          example: page_icon
        external:
          $ref: '#/components/schemas/ExternalFileOutput'
        file_upload:
          $ref: '#/components/schemas/FileUploadOutput'
        domain:
          type: string
          example: acme.com
        file:
          $ref: '#/components/schemas/InternalFileOutput'
        lucide:
          type: string
          example: file-text
        brand:
          type: string
          example: github
          description: Simple Icons brand slug (logo and color resolved automatically)
        dicebear:
          $ref: '#/components/schemas/DicebearIconPayloadOutput'
        background:
          type: string
          enum:
            - blue
            - red
            - pattern-red
            - pattern-blue
            - pattern-red-1
            - pattern-red-2
            - pattern-red-3
            - pattern-blue-1
            - pattern-blue-2
            - pattern-blue-3
        empty:
          type: boolean
          example: true
        updatedBy:
          type: string
          example: dataset:empresas
    CnaeInfoOutput:
      type: object
      properties:
        code:
          type: string
          title: Code
          x-locale-pt-br-title: Código
        description:
          type: string
          nullable: true
          title: Description
          x-locale-pt-br-title: Descrição
      required:
        - code
    ExternalFileOutput:
      type: object
      properties:
        url:
          type: string
          example: https://example.com/image.jpg
      required:
        - url
    FileUploadOutput:
      type: object
      properties:
        id:
          type: string
          example: fu_abc123
      required:
        - id
    InternalFileOutput:
      type: object
      properties:
        url:
          type: string
          example: https://s3.amazonaws.com/...
        expiryTime:
          type: string
          example: '2024-01-15T10:30:00.000Z'
      required:
        - url
        - expiryTime
    DicebearIconPayloadOutput:
      type: object
      properties:
        style:
          type: string
          enum:
            - notionists-neutral
        seed:
          type: string
          example: 0256de50-f90c-49a8-81f0-3988b2b89d8d
        backgroundColor:
          type: string
          example: b6e3f4,b6e3f4
          description: Hex color(s), comma-separated for gradients
        options:
          $ref: '#/components/schemas/DicebearIconOptionsOutput'
      required:
        - style
        - seed
        - backgroundColor
    DicebearIconOptionsOutput:
      type: object
      properties:
        brows:
          type: string
        eyes:
          type: string
        glasses:
          type: string
        lips:
          type: string
        nose:
          type: string
        flip:
          type: boolean
        rotate:
          type: number
        scale:
          type: number
        radius:
          type: number
        size:
          type: number
        backgroundType:
          type: string
          enum:
            - solid
            - gradientLinear
        backgroundRotation:
          type: array
          items:
            type: number
        translateX:
          type: number
        translateY:
          type: number
        clip:
          type: boolean
        randomizeIds:
          type: boolean
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://id.local.base39.cloud/oauth2/authorize
          tokenUrl: https://id.local.base39.cloud/oauth2/token
          scopes:
            profile: Read user profile
            email: Read user email
            openid: OpenID authentication
      description: OAuth2 Authorization Code flow

````