---
title: "Get JWT protected URL"
method: POST
path: "/v2/files/jwt"
tags: ["v2"]
---

# Get JWT protected URL

`POST /v2/files/jwt`

JWT protection is a powerful way to protect your files from being seen without permission. Use this API method to generate a token that can be appended to a URL or set of URLs, allowing a file to be served. Without a valid token, requests for any file within a JWT protected folder will be denied.
Before using this method, you must enable JWT folder protection and obtain a key.
Read the documentation to learn how to enable and use JWT protection: https://sirv.com/help/json-web-token-protected-signed-url#enable-jwt-protection

## Request body

- Model29
  - `filename` string, required
  - `key` string, required — Specify JWT secret
  - `alias` string — Specify account alias if your account has multiple aliases
  - `insecureParams` Minify
  - `secureParams` SecureParams
  - `expiresIn` number, required — Token expiration time in seconds

## Response `default`

Successful

---

[API](https://skmtc.dev/sirv/apis/api-documentation.md) · [All operations](https://skmtc.dev/sirv/apis/api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sirv/api-documentation/revisions/80ff016d7d3a/schema)
