---
title: "Create actor token"
method: POST
path: "/actor_tokens"
tags: ["Actor Tokens"]
---

# Create actor token

`POST /actor_tokens`

Create an actor token that can be used to impersonate the given user.
The `actor` parameter needs to include at least a "sub" key whose value is the ID of the actor (impersonating) user.

## Request body

- object
  - `user_id` string, required — The ID of the user being impersonated.
  - `actor` object, required — The actor payload. It needs to include a sub property which should contain the ID of the actor. This whole payload will be also included in the JWT session token.
    - `sub` string, required — The ID of the actor.
  - `expires_in_seconds` integer — Optional parameter to specify the life duration of the actor token in seconds. By default, the duration is 1 hour.
  - `session_max_duration_in_seconds` integer — The maximum duration that the session which will be created by the generated actor token should last. By default, the duration of a session created via an actor token, lasts 30 minutes.

## Response `200`

Success

- ActorToken
  - `object` 'actor_token', required
  - `id` string, required
  - `status` 'pending' | 'accepted' | 'revoked', required
  - `user_id` string, required
  - `actor` object, required
  - `token` string
  - `url` string
  - `created_at` integer, required — Unix timestamp of creation.
  - `updated_at` integer, required — Unix timestamp of last update.

## Other responses

- `400` — Request was not successful
- `402` — Payment required
- `422` — Invalid request parameters

---

[API](https://skmtc.net/clerk/apis/clerk-backend-api.md) · [All operations](https://skmtc.net/clerk/apis/clerk-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clerk/clerk-backend-api/revisions/75df3a43fcb2/schema)
