---
title: "Grant platform app access to vaults/agents"
method: POST
path: "/v1/platform/connections/{connectionId}/grant"
tags: ["Platform"]
---

# Grant platform app access to vaults/agents

`POST /v1/platform/connections/{connectionId}/grant`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/platform/connections/{connectionId}/grant`
- Auth: HTTP bearer

User-authenticated. Grant the platform app access to selected vaults and agents.
Validates user ownership of all requested resources. Creates platform_user_grants
entries and merges resource IDs into the connection record.

## Path parameters

- `connectionId` string, uuid, required

## Request body

- GrantResourcesRequest
  - `vault_ids` string[]: Vault IDs to grant access to
  - `agent_ids` string[]: Agent IDs to grant access to
  - `allowed_paths` string[]: Secret path patterns the app can access
  - `permissions` string[]: Permissions granted (read, write, rotate)
  - `expires_at` string, date-time: Optional grant expiration

## Response `201`

Grants created

- GrantResourcesResponse
  - `connection_id` string, uuid
  - `grants` GrantResponse[]
    - `id` string, uuid
    - `vault_id` string, uuid
    - `allowed_paths` string[]
    - `permissions` string[]
    - `expires_at` string, date-time, nullable
    - `created_at` string, date-time
  - `vault_ids` string[]
  - `agent_ids` string[]

## Other responses

- `400`: No vault_ids or agent_ids provided
- `403`: Resource not owned by caller
- `404`: Connection not found

---

[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)
