---
title: "add access token"
method: POST
path: "/users/{uuid}/access-tokens"
tags: ["Users"]
---

# add access token

`POST /users/{uuid}/access-tokens`

Generates a fresh short-lived access token for an active non-admin user. Public/API callers require authenticated ORG_ADMIN or campaign API-key access for the target user's organisation.
#### For custom components:
`RaiselyComponents.api.one('users', '{uuid}').all('access-tokens').post(data = {}, params = {}, headers = {}) => Promise<{result}>`

 :fa-gears: See [Restie Response Data](https://github.com/raisely/restie#reading-and-handling-responses) for a more detailed overview of responses through the client wrapper

## Path parameters

- `uuid` string, required

## Headers

- `Authorization` string

## Request body

- object
  - `data` object
    - `redirectTo` string — Optional relative path to redirect to after the access token is consumed.

## Response `200`

The newly generated access token

- object
  - `data` object
    - `accessToken` string — The generated access token (UUID format)
    - `expiresAt` string, date-time — Token expiration timestamp based on the organisation's configured access-token expiry policy (default 48 hours)

## Other responses

- `401` — Authorization credentials were missing or invalid
- `403` — The user is authenticated, but is not allowed to perform the requested operation
- `404` — User not found or access token generation is not enabled
- `410` — The requested record no longer exists, or that API has been deprecated
- `429` — You have made too many requests to the given endpoint, please try again later
- `500` — An unexpected error has occurred with Raisely. If the error persists you can contact support@raisely.com

---

[API](https://skmtc.net/raisely/apis/raisely-api.md) · [All operations](https://skmtc.net/raisely/apis/raisely-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/raisely/raisely-api/versions/d7f8dd294cb0/schema)
