---
title: "Create a spending grant"
method: POST
path: "/v1/agents/{agent_id}/pay/grants"
tags: ["Pay"]
---

# Create a spending grant

`POST /v1/agents/{agent_id}/pay/grants`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/agents/{agent_id}/pay/grants`
- Auth: HTTP bearer

Human owners and admins only. Requires a passkey assertion over the digest of exactly these terms, and stays within the agent's own maximum cap and window — a grant is a delegation inside the limits already set, not a way around them.

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `X-Passkey-Token` string, required

## Request body

- CreatePayGrantRequest
  - `cap_usd` string, required
  - `ttl_secs` integer, required
  - `allowed_paytos` string[], nullable: Null means any recipient; an empty list means none. The two stay distinguishable all the way down to the digest.
  - `grant_digest` string, required: The digest the person actually asserted over. Compared against the digest of the terms being stored, so a token obtained for a small, tightly scoped grant cannot create a large open one.

## Response `200`

Grant created

## Other responses

- `403`: Not a human owner or admin, grant mode disabled, or terms exceed the agent's maximum

---

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