---
title: "Revoke agent access"
method: DELETE
path: "/customers/{customerId}/agents/{agentId}"
tags: ["Customers"]
---

# Revoke agent access

`DELETE /customers/{customerId}/agents/{agentId}`

Remove an agent's access to a customer

## Path parameters

- `customerId` string, required — Customer party ID (pty_*).
- `agentId` string, required — Agent ID (agt_*).

## Headers

- `X-Instance-ID` string, nullable

## Response `200`

Successful Response

- union
  - object
    - `data` object, required — Customer connection, including revoked connections when requested.
      - `type` 'customer', required — Resource type. Always `customer`.
      - `id` string, required — Customer party ID (pty_*).
      - `attributes` object, required
        - `name` string, required — Customer name.
        - `email` string, nullable, required — Email address.
        - `avatarUrl` string, uri, nullable, required — Public avatar URL, or null when none is set.
        - `createdAt` string, date-time, nullable, required — RFC 3339 timestamp when the customer's party was created, or null when unknown.
        - `delegation` object, required — Delegation details.
          - `id` string, required — Delegation ID (dlg_*).
          - `status` 'ACTIVE' | 'SUSPENDED' | 'REVOKED' | 'EXPIRED', required — Connection status: ACTIVE, SUSPENDED (paused by the customer), REVOKED, or EXPIRED.
          - `permissions` string[], required — Granted permissions.
          - `createdAt` string, date-time, required — RFC 3339 timestamp when the customer connected.
          - `revokedAt` string, date-time, nullable, required — RFC 3339 timestamp when access was revoked, or null while active.
        - `agents` object[], required — Connected agents.
          - `id` string, required — Agent ID (agt_*).
          - `name` string, nullable, required — Agent name.
          - `handle` string, nullable, required — Agent handle, such as @acme-support, or null when none is set.
          - `status` string, required — Connection status.
          - `permissions` string[], required — Permissions this agent holds.
          - `limits` object, nullable, required — Spending limits in cents (per-transaction, daily, monthly) for this agent.
            - `perTransaction` integer, nullable — Per-transaction spending limit in cents, or null for no limit.
            - `perDay` integer, nullable — Daily spending limit in cents, or null for no limit.
            - `perMonth` integer, nullable — Monthly spending limit in cents, or null for no limit.
  - object
    - `data` object, required — Customer connection, including revoked connections when requested.
      - `type` 'customer', required — Resource type. Always `customer`.
      - `id` string, required — Customer party ID (pty_*).
      - `attributes` object, required
        - `name` string, required — Customer name.
        - `email` string, nullable, required — Email address.
        - `avatarUrl` string, uri, nullable, required — Public avatar URL, or null when none is set.
        - `createdAt` string, date-time, nullable, required — RFC 3339 timestamp when the customer's party was created, or null when unknown.
        - `delegation` object, required — Delegation details.
          - `id` string, required — Delegation ID (dlg_*).
          - `status` 'ACTIVE' | 'SUSPENDED' | 'REVOKED' | 'EXPIRED', required — Connection status: ACTIVE, SUSPENDED (paused by the customer), REVOKED, or EXPIRED.
          - `permissions` string[], required — Granted permissions.
          - `createdAt` string, date-time, required — RFC 3339 timestamp when the customer connected.
          - `revokedAt` string, date-time, nullable, required — RFC 3339 timestamp when access was revoked, or null while active.
        - `agents` object[], required — Connected agents.
          - `id` string, required — Agent ID (agt_*).
          - `name` string, nullable, required — Agent name.
          - `handle` string, nullable, required — Agent handle, such as @acme-support, or null when none is set.
          - `status` string, required — Connection status.
          - `permissions` string[], required — Permissions this agent holds.
          - `limits` object, nullable, required — Spending limits in cents (per-transaction, daily, monthly) for this agent.
            - `perTransaction` integer, nullable — Per-transaction spending limit in cents, or null for no limit.
            - `perDay` integer, nullable — Daily spending limit in cents, or null for no limit.
            - `perMonth` integer, nullable — Monthly spending limit in cents, or null for no limit.
    - `meta` object, required
      - `deleted` unknown, required

## Other responses

- `400` — Validation Error
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found. Returned when the resource does not exist, or when it exists but is not accessible to your account. The two cases are intentionally indistinguishable, so that resource IDs cannot be enumerated by probing.
- `409` — Conflict
- `422` — Validation Error. The response contains one error object for each invalid request value.
- `428` — Precondition Required
- `429` — Too Many Requests
- `500` — Internal Server Error
- `501` — Not Implemented
- `502` — Bad Gateway
- `503` — Service Unavailable

## Changes

- **2026-09-02** `c7c12da5915f` — 12 info
  - added the optional property `errors/items/meta/limitScope` to the response with the `400` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `401` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `403` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `404` status
  - …8 more
- **2026-08-27** `359d267dca88` — 1 info
  - deleted the `header` request parameter `X-Agent-ID` with deprecation
- **2026-08-23** `b1ad79e918ac` — 1 info
  - `header` request parameter `X-Agent-ID` was deprecated
- **2026-07-26** `270e233e401c` — 8 warning, 8 info
  - added the new `ACTIVE` enum value to the `anyOf[subschema #1: CustomerResponse]/data/attributes/delegation/status` response property for the response status `200`
  - added the new `ACTIVE` enum value to the `anyOf[subschema #2]/data/attributes/delegation/status` response property for the response status `200`
  - added the new `EXPIRED` enum value to the `anyOf[subschema #1: CustomerResponse]/data/attributes/delegation/status` response property for the response status `200`
  - added the new `EXPIRED` enum value to the `anyOf[subschema #2]/data/attributes/delegation/status` response property for the response status `200`
  - …12 more
- …earlier changes not shown

[Full history](https://skmtc.dev/natural/apis/natural-api/changes/customers/:customerId/agents/:agentId/delete.md)

---

[API](https://skmtc.dev/natural/apis/natural-api.md) · [All operations](https://skmtc.dev/natural/apis/natural-api/llms.txt) · [OpenAPI document](https://skmtc.dev/natural/apis/natural-api/revisions/b61b8441fba4?raw)
