---
title: "PUT /playwrightworkspaces/{workspaceId}/access-tokens/{accessTokenId}"
method: PUT
path: "/playwrightworkspaces/{workspaceId}/access-tokens/{accessTokenId}"
---

# PUT /playwrightworkspaces/{workspaceId}/access-tokens/{accessTokenId}

`PUT /playwrightworkspaces/{workspaceId}/access-tokens/{accessTokenId}`

Creates an access token for the workspace with the specified access token ID and name. The ID and name must be unique among active access tokens for the user within a Playwright workspace. Requires Bearer JWT access token provided by Entra ID.

## Path parameters

- `workspaceId` string, required
- `accessTokenId` string, required

## Query parameters

- `api-version` string, required

## Headers

- `x-ms-client-request-id` string, uuid
- `x-ms-useragent` string

## Request body

- AccessToken — Model of an access token linked to a workspace.
  - `id` string, required — The access token ID in GUID format.
  - `name` string, required — The access token name.
  - `jwtToken` string — The access token value in JWT format.
  - `createdAt` string, date-time, required — The access token creation timestamp in UTC.
  - `expiryAt` string, date-time, required — The access token expiration timestamp in UTC.
  - `state` 'Active' | 'Expired', required — The access token state.

## Response `200`

The request has succeeded.

- AccessToken — Model of an access token linked to a workspace.
  - `id` string, required — The access token ID in GUID format.
  - `name` string, required — The access token name.
  - `jwtToken` string — The access token value in JWT format.
  - `createdAt` string, date-time, required — The access token creation timestamp in UTC.
  - `expiryAt` string, date-time, required — The access token expiration timestamp in UTC.
  - `state` 'Active' | 'Expired', required — The access token state.

## Other responses

- `201` — The request has succeeded and a new resource has been created as a result.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/loadtestservice-playwright.md) · [All operations](https://skmtc.net/azure/apis/loadtestservice-playwright/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/loadtestservice-playwright/versions/7e7fa8e8788b/schema)
