JWT from Fern API key

Get a JWT to access protected documentation endpoints, optionally scoped to specific roles.

Authentication

FERN_API_KEYstring

Fern API key, from fern generate token.

Headers

ROLESstringOptional

Comma-separated list of roles (e.g., “botanist,seedling”). Sets roles for returned JWT if provided, otherwise, roles are empty.

x-fern-hoststringOptional

Domain (required on preview URLs)

Response

Successfully generated JWT
fern_tokenstring
JWT token for authenticating subsequent requests
roleslist of strings
Roles included in the JWT

Errors