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

# Archive a customer

> ARCHIVES the customer: they leave the active book and the listings, but their history is not destroyed. Deliberate — a buggy integration should not be able to wipe an agency's customer base.



## OpenAPI

````yaml https://api.trama.so/v1/openapi.json delete /v1/customers/{customerId}
openapi: 3.1.0
info:
  description: >-
    Trama's REST API. Authenticate with an organization API key, created under
    Settings → Developers, and send it as `Authorization: Bearer <key>` (or in
    the `x-api-key` header).


    Every key is bound to ONE organization: everything this API returns and
    everything it writes stays inside that organization, and no request ever
    names it.


    Errors always come back as `{ "error": { "code", "message" } }`. Branch on
    `code` — it is stable; the `message` text is not.
  title: Trama API
  version: 1.0.0
servers:
  - url: https://api.trama.so
security:
  - bearerAuth: []
  - apiKeyHeader: []
paths:
  /v1/customers/{customerId}:
    delete:
      tags:
        - Customers
      summary: Archive a customer
      description: >-
        ARCHIVES the customer: they leave the active book and the listings, but
        their history is not destroyed. Deliberate — a buggy integration should
        not be able to wipe an agency's customer base.
      parameters:
        - schema:
            type: string
          required: true
          in: path
          name: customerId
      responses:
        '200':
          description: The customer was archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchivedCustomer'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The API key is missing or not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: The resource does not exist in this organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict with the current state of the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: The API key exceeded its request limit. Retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ArchivedCustomer:
      type: object
      properties:
        archived:
          type: boolean
        id:
          type: string
      required:
        - archived
        - id
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: >-
            A stable, machine-readable code. Branch on this — the `message` text
            may change, the code will not.
          example: CATALOG_PRODUCT_NOT_FOUND
        message:
          type: string
          example: The catalog product does not exist.
      required:
        - code
        - message
  securitySchemes:
    bearerAuth:
      bearerFormat: API key
      description: 'The organization API key, sent as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http
    apiKeyHeader:
      description: The same API key, sent in the `x-api-key` header.
      in: header
      name: x-api-key
      type: apiKey

````