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

# Archive funnel, transferring the conversations

> ISSUE-5818. A funnel with no conversations archives directly. With conversations, it requires an ACTIVE destination funnel and a source-to-destination step mapping covering every step that has conversations. The transfer and the archiving happen in the same transaction: if any conversation is left in the funnel, nothing is archived.



## OpenAPI

````yaml /en/openapi.json post /v1/agents/{id}/archive
openapi: 3.0.0
info:
  title: Nuvia API - Company
  description: API documentation for companies
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nuvia.ai
security: []
tags:
  - name: messages
    x-group: Mensagens
  - name: contacts
    x-group: Contatos
  - name: campaigns
    x-group: Campanhas
  - name: tables
    x-group: Tabelas e Listas
  - name: agents
    x-group: Agentes
  - name: conversations
    x-group: Conversas
  - name: inboxes
    x-group: Caixas de Entrada
  - name: knowledge
    x-group: Base de Conhecimento
  - name: Webhooks
    x-group: Webhooks
  - name: campaign-enrollments
    x-group: Inscrições em Campanha
  - name: custom-fields
    x-group: Campos Customizados
paths:
  /v1/agents/{id}/archive:
    post:
      tags:
        - agents
      summary: Archive funnel, transferring the conversations
      description: >-
        ISSUE-5818. A funnel with no conversations archives directly. With
        conversations, it requires an ACTIVE destination funnel and a
        source-to-destination step mapping covering every step that has
        conversations. The transfer and the archiving happen in the same
        transaction: if any conversation is left in the funnel, nothing is
        archived.
      operationId: AgentsController_archiveAgent
      parameters:
        - name: x-company-id
          in: header
          description: >-
            Target company identifier. Required only for global API keys
            (type=global). Ignored for company API keys and human users.
          required: false
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: Agent ID
          schema:
            type: string
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
      security:
        - JWT-auth: []
components:
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Token JWT de autenticação

````