---
title: "Create a JSON Web Token."
method: POST
path: "/v1/auth/jwt"
tags: ["API Tokens"]
---

# Create a JSON Web Token.

`POST /v1/auth/jwt`

Create a short lived JWT for authentication to specific GitGuardian services,
including HasMySecretLeaked.

## Request body

- object
  - `audience` string, required — Audience of the JWT.
  - `audience_type` string — Type of audience.

## Response `200`

Created JWT

- object
  - `token` string — JWT

## Other responses

- `400` — Invalid data
- `401` — Invalid API key

---

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