---
title: "Retire an agent deployment"
url: "https://real-estate-agency.apim.eu/apis/agent-deployments/versions/3a3ada6b-888e-498a-bfb3-a134ac91f753/operations/retireAgent"
---

> Full API specification: https://real-estate-agency.apim.eu/apis/agent-deployments/versions/3a3ada6b-888e-498a-bfb3-a134ac91f753.md

# Retire an agent deployment

`DELETE` `/agents/{agentId}`

Operation ID: `retireAgent`

Takes the agent out of active service. The record remains readable.

## Path parameters

- `agentId` (string, required)

## Responses

- `204` - Retired
- `404` - Record not found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Agent Deployments
  version: 1.0.0
servers:
  - url: https://api.nexora.example/v1
    description: Production
  - url: https://sandbox.api.nexora.example/v1
    description: Sandbox
paths:
  /agents/{agentId}:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
          example: agt_8f2c1a
    delete:
      tags:
        - Agents
      summary: Retire an agent deployment
      description: Takes the agent out of active service. The record remains readable.
      operationId: retireAgent
      security:
        - apiKey: []
      responses:
        "204":
          description: Retired
        "404":
          $ref: "#/components/responses/NotFound"
security:
  - apiKey: []
components:
  responses:
    NotFound:
      description: Record not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  schemas:
    Error:
      type: object
      description: Uniform error format across all Nexora AI APIs.
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: validation_failed
        message:
          type: string
          example: Compliance disclosures from the certification are missing.
        details:
          type: array
          items:
            $ref: "#/components/schemas/ErrorDetail"
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          example: compliance_certification.valid_until
        reason:
          type: string
          example: missing
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: |
        Every call carries an API key in the `apikey` header. You generate the
        key in the Nexora AI portal under "My Apps"; it's shown exactly once.

        Each key has the scopes it's allowed to use attached to it. If one is
        missing, the API responds with `403` and `code: "scope_missing"`; the
        missing scope is in `details[].field`.
```
