Headers
Most RealtimeX API endpoints require one or more HTTP headers to authenticate requests, identify the tenant, and specify the request format.
The following headers are commonly used throughout the API.
Standard Headers
Content-Type
When sending data in the request body, specify the content type as JSON.
http
Content-Type: application/jsonThis header is required for most POST, PUT, and PATCH requests.
Tenant Headers
For tenant-specific operations, include both of the following headers:
http
is-tenant: truex-client-id: <client_id>These headers allow the API to identify the tenant context and process the request against the correct client workspace.
Complete Request Example
A typical authenticated, tenant-scoped request includes the headers below:
http
POST /api/v1/user/login/client HTTP/1.1Host: api.example.comAuthorization: Bearer <access_token>Content-Type: application/jsonAccept: application/jsonis-tenant: truex-client-id: your_client_idCommon Errors
Missing or invalid headers typically result in one of the following responses:
Best Practices
- Always send requests over HTTPS.
- Store access tokens securely and never expose them in client-side source code.
- Use the latest access token after every successful token refresh.
- Include tenant headers only for tenant-scoped endpoints.
- Set
Content-Type: application/jsonwhenever sending a JSON request body.