Unidy Docs

SDK HTTP API overview

Understand the non-administrative API and when to call it directly.

The SDK HTTP API powers customer-facing applications at /api/sdk/v1. Use the JavaScript components or React hooks for browser state management, or call HTTP directly when you need a custom client. Server-rendered applications can still use the React package in their client-side boundary.

For administrative integrations working across customers, use the REST API.

Send the right credentials

HeaderValuePurpose
AuthorizationBearer YOUR_SDK_CLIENT_KEYIdentifies the application. Required throughout this API.
X-ID-TokenThe signed-in customer's SDK JWTAuthorizes customer operations. It is not an OAuth REST access token.
Content-Typeapplication/jsonUse for JSON request bodies.

Authentication discovery and some newsletter operations work before customer sign-in. Newsletter preference operations can instead accept a scoped preference token; follow the individual operation's contract. Never substitute the API key for the customer's token.

Get the tenant or brand base URL and SDK key from your administrator. The host selects the brand; the SDK client must be associated with that brand. Allowed Hosts participates in browser CORS configuration and in validation of supported redirect URLs. It does not authenticate non-browser callers.

Make a first read

After obtaining a customer token through sign-in and registration, request that customer's profile form:

http
GET /api/sdk/v1/profile HTTP/1.1
Host: login.example.com
Authorization: Bearer YOUR_SDK_CLIENT_KEY
X-ID-Token: CUSTOMER_SDK_JWT
Accept: application/json

Use the returned field definitions for editing. /user returns a customer record, while /profile returns form metadata and values; they are different contracts.

Choose your task

TaskGuide
Authenticate, register or resume registrationSign-in and registration operations
Restore, refresh or end a sessionAPI keys, JWTs and refresh tokens
Read or edit profile data; manage connected servicesProfile and user operations
List customer assets or obtain export linksTickets, subscriptions and transactions
Diagnose a failed requestSDK troubleshooting
Browse paths, schemas and parametersSDK HTTP API reference

Read each operation's response

The API does not use one universal response envelope. Sign-in returns a state or credentials; /user returns a serialized record; /profile returns form fields; list operations return a collection with pagination metadata. Newsletter bulk operations can report partial success with 207, and deletion can return 204 without JSON.

Paginated SDK collections use page and limit, defaulting to 50 with a maximum of 250. The JavaScript libraries expose a perPage option and translate it into the HTTP request. Follow each response's metadata. Do not read response.json() on an empty 204, and do not treat a partial-success newsletter response as a complete failure.

Authorization and feature requirements are specific to each operation. For example, ticket transfer has its own feature and ownership checks. Review the asset guide's brand and export boundaries before designing isolation or export behavior.

Was this page helpful?