---
title: "Create Csrf Token"
method: GET
path: "/api/csrf-token"
---

# Create Csrf Token

`GET /api/csrf-token`

Create or update a CSRF token for a client

## Query parameters

- `client` string, required — The client to create a CSRF token for

## Headers

- `x-prefect-api-version` string

## Response `200`

Successful Response

- CsrfToken — A PrefectBaseModel with an auto-generated UUID ID value and created / updated timestamps, intended for compatibility with our standard ORM models. The ID, created, and updated fields are reset on copy() and not included in equality comparisons.
  - `id` string, uuid
  - `created` string, date-time
  - `updated` string, date-time
  - `token` string, required — The CSRF token
  - `client` string, required — The client id associated with the CSRF token
  - `expiration` string, date-time, required — The expiration time of the CSRF token

## Other responses

- `422` — Validation Error

---

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