Skip to main content
POST
/
client-tokens
JavaScript
import Reminix from '@reminix/sdk';

const client = new Reminix({
  apiKey: process.env['REMINIX_API_KEY'], // This is the default and can be omitted
});

const clientToken = await client.clientTokens.create({
  context: { userId: 'user_123', sessionId: 'sess_abc' },
});

console.log(clientToken.id);
{
  "token": "reminix_ct_abc123def456...",
  "id": "ct_abc123",
  "expiresAt": "2024-01-15T11:30:00Z"
}

Authorizations

Authorization
string
header
required

API Key or Personal Access Token (PAT). When using PAT, include X-Project header.

Body

application/json
context
object
required

Public context accessible to the client via /client/context (e.g., { userId: "...", sessionId: "..." })

serverContext
object

Private context only accessible to agents/handlers, never exposed to client (e.g., { internalId: "..." })

ttlSeconds
integer

Time-to-live in seconds. Default: 3600 (1 hour). Max: 86400 (24 hours).

Required range: 0 < x <= 86400

Response

Client token created successfully

token
string
required

The client token. Store this securely - it will not be shown again.

id
string
required

Token ID for management purposes

expiresAt
string<date-time>
required

ISO 8601 timestamp when the token expires