---
title: "Create a JWT"
method: POST
path: "/embedded/authz"
tags: ["Embedded Authorization"]
---

# Create a JWT

`POST /embedded/authz`

## Request

- Base URL: `https://api.goshippo.com`
- URL: `https://api.goshippo.com/embedded/authz`
- Auth: one of:
  - API key in header `Authorization`
  - OAuth 2
    - Authorization code: `https://goshippo.com/oauth/authorize`
    - Token URL: `https://goshippo.com/oauth/access_token`

Creates a short-lived JSON Web Token (JWT) that client-side applications can use
to authenticate against the Shippo API without exposing a long-lived API token.

Authenticate this request with either a Shippo API token
(`Authorization: ShippoToken <API_TOKEN>`) or an OAuth bearer token
(`Authorization: Bearer <OAUTH_BEARER_TOKEN>`). Platform accounts can mint a token
on behalf of a Managed Shippo Account by setting the `SHIPPO-ACCOUNT-ID` header.

The returned token is valid for 12 hours. Send it on subsequent requests as
`Authorization: JWT <JWT_TOKEN>`.

## Headers

- `SHIPPO-API-VERSION` string
- `Shippo-Account-Id` string

## Request body

- EmbeddedAuthorizationRequest
  - `scope` string, required: The scope requested for the token.

## Response `200`

Success

- EmbeddedAuthorization
  - `token` string: The encoded JSON Web Token. Pass it on subsequent API requests as `Authorization: JWT <JWT_TOKEN>`.
  - `expiresIn` integer: Unix timestamp (seconds) of when the token expires. This matches the `exp` claim inside the token itself. Tokens are valid for 12 hours from issue.

## Other responses

- `400`: Bad request

## Changes

- **2026-10-28** `0eab5a94b0c3`: 1 warning, 1 info
  - deleted the `header` request parameter `SHIPPO-ACCOUNT-ID`
  - added the new optional `header` request parameter `Shippo-Account-Id`
- **2026-09-22** `89a0aedb2b88`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/goshippo/apis/shippo-external-api/changes/embedded/authz/post.md)

---

[API](https://skmtc.dev/goshippo/apis/shippo-external-api.md) - [All operations](https://skmtc.dev/goshippo/apis/shippo-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/goshippo/apis/shippo-external-api/revisions/0eab5a94b0c3?raw)
