---
title: "POST /provisioning-requests/{requestId}/cancel"
method: POST
path: "/provisioning-requests/{requestId}/cancel"
---

# POST /provisioning-requests/{requestId}/cancel

`POST /provisioning-requests/{requestId}/cancel`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/provisioning-requests/{requestId}/cancel`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Path parameters

- `requestId` string, required: Provisioning request identifier

## Request body

- object: Input for identifying a specific provisioning request

## Response `200`

OK

- object: A provisioning request and its current state
  - `requestId` string, required: Unique provisioning request identifier
  - `agentId` string, required: Agent the resource would belong to
  - `agentName` string, required: Agent display name, so the owner knows who is asking
  - `resource` 'VAULT' | 'PHONE_NUMBER' | 'GENERIC', required: Resource being requested: VAULT (encrypted secret storage for this agent), PHONE_NUMBER (a provisioned number, Starter+ only), or GENERIC (a master-gated operation the agent tried to perform; approving grants permission rather than provisioning anything).
  - `reason` string, required: The agent's stated justification
  - `status` 'PENDING' | 'APPROVED' | 'DECLINED' | 'EXPIRED' | 'CANCELLED', required: Lifecycle status: PENDING (awaiting the owner), APPROVED (resource provisioned), DECLINED (owner refused — soft, the agent may ask again), EXPIRED (7-day TTL elapsed unanswered), CANCELLED (withdrawn by the agent).
  - `options` object, nullable, required: Resource-specific options; ignored for resources that take none
    - `countryCode` string: PHONE_NUMBER: ISO 3166-1 alpha-2 country code, e.g. 'US'
    - `areaCode` string: PHONE_NUMBER: preferred 3-digit area code; any is used if unavailable
  - `permission` object, nullable, required: Present only on a permission request; null on a resource provisioning request
    - `procedurePath` string, required: The master-gated procedure the agent tried to run, dotted — 'agent.delete'
    - `readOnly` boolean, required: Whether the procedure is read-only. Derived from the contract's HTTP method on the server so a client never re-derives it, and it is what makes Bypass applicable.
    - `argumentPreview` object, nullable, required: Redacted sketch of the call's arguments. Null — rather than empty — when the input was not an object, so 'nothing to show' stays distinguishable from 'shown and empty'.
  - `expiresAt` string, date-time, required: When an unanswered request stops being actionable
  - `decidedAt` string, date-time, nullable, required: When the owner decided; null while PENDING
  - `decidedNote` string, nullable, required: The owner's note, typically the reason for a decline — surfaced so a second attempt can address the objection instead of repeating the first
  - `provisionedId` string, nullable, required: Id of what approval created (vault identity or phone identity); null unless APPROVED
  - `createdAt` string, date-time, required: When the agent asked

## Other responses

- `404`: 404
- `409`: 409

---

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