Get started
Responses and errors
Every answer has one of two shapes. Test `error.code`, never the text.
Success: data
HTTP/1.1 200 OK{ "data": { "items": [ { "id": "9c1f…", "status": "open", "unreadCount": 2 } ], "nextCursor": "MjAyNi0wOS0xOFQw…", "hasMore": true }}Refusal: error
HTTP/1.1 409 Conflict{ "error": { "status": 409, "code": "window_closed", "message": "The 24-hour customer service window is closed: only an approved template can be sent.", "detail": "…", "requestId": "a1b2c3d4" }}codeis stable and documented below.messageis in English.detailis the specific reason, and may be in French.requestIdidentifies the call in our logs and inGET /api-requests: quote it if you need help.- Some refusals carry
datawith more facts —template_holes_unfilledlists the unfilled placeholders indata.issues.
Pagination
Lists are cursor-paginated: pass limit, then send back nextCursor as cursor until it is null. Cursors are opaque; do not build them.
let cursordo { const url = new URL('https://nodium.io/api/v1/inbox/conversations') url.searchParams.set('limit', '100') if (cursor) url.searchParams.set('cursor', cursor) const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.NODIUM_KEY}` } }) const body = await res.json() if (body.error) throw new Error(`${body.error.code}: ${body.error.message}`) for (const conversation of body.data.items) handle(conversation) cursor = body.data.nextCursor} while (cursor)