Embeddable Components
Embeddable Components enable platforms and marketplaces to integrate EasyPost’s pre-built UI experiences directly within their applications.
A temporary session ID is obtained through the embeddables/session endpoint to initialize each embedded component.
Note: A Forge-enabled EasyPost account is required to create and initialize embeddable component sessions.
Endpoints
object
string
Always returns "EmbeddablesSession".
session_id
string
Short-lived, one-time-use token that authorizes an Embeddables Components session. Must be provided to the client-side Embeddables script to initialize the component.
created_at
timestamp
ISO 8601 timestamp indicating when the session was created.
expires_at
timestamp
ISO 8601 timestamp indicating when the session expires.
EmbeddablesSession Object
{
"object": "EmbeddablesSession",
"session_id": "esess_123",
"created_at": "2026-10-06T17:30:30Z",
"expires_at": "2026-10-06T17:35:30Z"
}Production OnlyThis call will only work with your Production API Key.
The embeddables/session endpoint creates a temporary session for initializing embeddable components.
This session is requested from EasyPost’s API by the platform’s server using its production API key.
For detailed implementation steps and sample code, see the Embeddable Components Guide.
Request Parameters
origin_host
REQUIRED
string
The allowed origin host where embeddable components are rendered.
user_id
REQUIRED
string
The User ID of the sub account for which the embeddable session is being created.
POST / embeddables/ session
1curl -X POST https://api.easypost.com/v2/embeddables/session \
2 -u "EASYPOST_API_KEY": \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "origin_host": "https://example.com",
6 "user_id": "user_..."
7 }'Response
1{
2 "object": "EmbeddablesSession",
3 "session_id": "esess_123",
4 "created_at": "2026-10-06T17:30:30Z",
5 "expires_at": "2026-10-06T17:35:30Z"
6}