---
search:
  tags:
    - Portfolio
    - POST
seo:
  description: >-
    Grants one of the member's users access to this account. UDX… Reference for
    the POST /portfolio/accounts/{account_id}/grants endpoint in the REST API
    API.
sidebar:
  badge: POST
  label: Grant Account Access
title: Grant Account Access
type: openapi-operation
---
Grants one of the member's users access to this account. UDX records the grant immediately; it starts pending while exchange access is set up, so poll the account's grants until the new grant is active.

### Endpoint

- Method and path: `POST /portfolio/accounts/{account_id}/grants`
- Operation ID: `createGrant`
- API reference: [POST /portfolio/accounts/{account_id}/grants](/api-reference/portfolio/creategrant)

#### Authorization

- Accepted credentials: `UDX-Access-Key` header and `UDX-Access-Timestamp` header and `UDX-Access-Signature` header; or Bearer token in `Authorization`
- Details: [Authentication](/authentication)

#### Parameters

- `UDX-Version` (`header`) — Dated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
- `UDX-Idempotency-Key` (`header`) — Optional client-generated key that makes a mutation safe to retry. Reuse it only for a byte-identical retry. When present, it is included in the request signature; omitting it disables UDX idempotency for that request.
- `account_id` (`path`, required) — The public identifier of the account whose grants are managed.

#### Request body

- Content type: `application/json`
- Schema: `CreateGrantRequest`
- Required: yes
- Fields:
  - `user_id` (required) — The public identifier of the member's user to grant access to.

#### Responses

- `202` — The grant was created. Reusing the creation idempotency key replays this response instead of creating another grant.
- `400` — The request doesn't conform to this spec.
- `401` — No valid credential was provided.
- `403` — The credential lacks the `grants:manage` scope or is restricted to one account.
- `404` — The account doesn't exist or the caller holds no grant on it. The two cases are deliberately indistinguishable.
- `409` — The user already holds a grant on this account, or a request with this idempotency key is still in progress.
- `422` — This key belongs to a different request.
- `429` — The Member's request rate is exhausted. Wait for `Retry-After`.
- `500` — Something went wrong on UDX's side.
- `503` — Request admission is unavailable. Retry later.
