---
search:
  tags:
    - Roles & access
    - POST
seo:
  description: >-
    Assigns an access package to a user. Idempotent via Idempotency-Key header.…
    Reference for the POST /users/{id}/access-packages endpoint in the Fuxam API
    v4.
sidebar:
  label: Assign an access package to a user
  badge: POST
title: Assign an access package to a user
type: openapi-operation
---
Assigns an access package to a user. Idempotent via `Idempotency-Key` header. Scoped to your integration's institution via Basic Auth credentials.

`POST /users/{id}/access-packages`

**Request body** (`application/json`, required)

- `packageId` (string, required)

Request body example:

```json
{
  "packageId": "string"
}
```

**Responses**

- `201` — Access package assigned
- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `409` — Conflict — duplicate email or membership code (body includes \`existingUserId\` when known), a time-tracking session that is already running (\`activeSession\`), a time-tracking interval that overlaps an existing log (\`conflictingLog\`), idempotency key reused with a different body (\`idempotency\_key\_reused\`), or concurrent request with the same key still in progress (\`idempotency\_key\_in\_progress\`)
- `429` — Too Many Requests — 1000 requests per minute per institution. Includes \`X-RateLimit-Limit\`, \`X-RateLimit-Remaining\`, \`X-RateLimit-Reset\` (ISO-8601), and \`Retry-After\` (seconds).
- `500` — Internal Server Error
- `503` — Service unavailable — idempotency store temporarily unreachable, or the database is busy (lock wait, transaction timeout, or exhausted serialization/deadlock retries). Database contention includes \`Retry-After: 1\`. The idempotency key is released. Retry the same key (\`service\_unavailable\`).

Response example, 201:

```json
{
  "data": {
    "id": "string",
    "userId": "string",
    "packageId": "string",
    "institutionId": "string",
    "assignedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "requestId": "req_1234567890_abc",
    "timestamp": "2026-06-02T07:00:00.000Z",
    "version": "v4",
    "watermark": "2019-08-24T14:15:22Z"
  }
}
```
