---
title: "Revoke an agent host grant"
method: POST
path: "/agent-host/grants/{grantId}/revoke"
tags: ["Agent hosts"]
---

# Revoke an agent host grant

`POST /agent-host/grants/{grantId}/revoke`

## Request

- Base URL: `https://platform-api.homejourney.sg/v1`
- URL: `https://platform-api.homejourney.sg/v1/agent-host/grants/{grantId}/revoke`
- Auth: HTTP bearer

Revokes one active agent-host grant when the authenticated automation client has `agent_hosts.write`. External URL: `/v1/agent-host/grants/{grantId}/revoke`. Current Next.js implementation path: `/api/platform/v1/agent-host/grants/[grantId]/revoke`. This mutating route requires `Idempotency-Key`, records audit/event evidence, hides affected tools, and makes future protected calls fail closed. It does not delete historical grant/action records or execute host actions.

## Path parameters

- `grantId` string, uuid, required

## Headers

- `X-Correlation-Id` string
- `Idempotency-Key` string, required

## Request body

- AgentHostGrantRevocationRequest
  - `reason` string, required

## Response `200`

Agent host grant revoked or already revoked.

- AgentHostGrantRevocationResponse
  - `ok` true, required
  - `revocation` AgentHostGrantRevocation, required
    - `grant_id` string, uuid, required
    - `revoked_by` string, required
    - `revoked_at` string, date-time, required
    - `revocation_reason` string, required
    - `audit_event_id` string, required
    - `tools_hidden` boolean, required
    - `future_calls_fail_closed` true, required
  - `grant` AgentHostGrantRuntime, required
    - `grant_id` string, uuid, required
    - `host_class` string, required
    - `actor_id` string, required
    - `organization_id` string, uuid, required
    - `client_id` string, uuid, required
    - `subject_type` string, required
    - `subject_id` string, required
    - `status` 'active' | 'revoked' | 'expired' | 'suspended', required
    - `scopes` PlatformScope[], required
    - `granted_at` string, date-time, required
    - `revoked_at` string, date-time, nullable, required
    - `revocation_reason` string, nullable, required
    - `tools_hidden` boolean, required
    - `future_calls_fail_closed` true, required
  - `already_revoked` boolean, required
  - `principal` Principal, required (unresolved $ref)
  - `livemode` boolean, required
  - `request_id` string, required

## Other responses

- `400`: Request validation failed.
- `401`: Missing or invalid platform API key.
- `403`: Credential, environment, or scope is not allowed.
- `404`: Platform API feature or resource is not available.
- `409`: Idempotency key is in progress or conflicts with an earlier request body.
- `429`: Rate limit exceeded.
- `500`: Unexpected platform API failure.

---

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