Skip to content

Connections

The apps one app user has connected, with whether each is reading and when it last did.

POST/v2/connectionsTry it in the Playground
Auth
read key (project)
Cost
free; never refused for your plan

Lists the apps the app user named in X-Alexein-User has connected and not disconnected. Use it to confirm a connection after the person comes back to your app, to show them which apps their memory reads, and to find one that needs them to connect again. See Connect your users' apps.

It takes no arguments; send {}.

Headers

Authorizationstringrequired

Bearer ax_…, an API key. A read key is enough.

X-Alexein-Userstringrequired

The app user whose connections to list. See App users.

X-Request-Idstring

Your id for this request, echoed on the response.

Body

{}object

An empty object.

Response

connectionsobject[]

One entry per connected app. Empty when the app user has none.

connections[].idstring

The connection's id: the connection_id the person came back with, and the id to disconnect.

connections[].providerstring

The app, such as google-gmail.

connections[].statusstring

active: it is reading. needs_reauth: the app refused access, such as when the person revoked it, and nothing is read until they connect it again.

connections[].account_labelstring | null

The account connected, as the app names it, such as an email address. null when the app names none.

connections[].connected_atstring | null

When it was connected, in ISO 8601.

connections[].last_sync_atstring | null

When it last read the app, in ISO 8601. null until it first has.

connections[].errorstring | null

null while all is well. Otherwise a sentence to show: The app refused access; the person must connect it again. for needs_reauth, or, on an active connection one of whose sources stopped after repeated failures, which sources: Reading messages stopped after repeated failures.

Errors

400bad request

X-Alexein-User is missing or not a usable id.

401unauthorized

The bearer is not a key this service issued.

403forbidden

A personal key, whose own apps are under My memory › Connectors, or the organisation has been closed in the console.

422invalid

A body with a field in it.

429too many requests

Past your organisation's rate limits. Retry after Retry-After seconds. See Limits.

503unavailable

Connecting apps cannot be reached just now. Retry after Retry-After seconds.

Request
curl https://api.alexein.ai/v2/connections \
  -H "Authorization: Bearer $ALEXEIN_API_KEY" \
  -H "X-Alexein-User: user_42" \
  -H "Content-Type: application/json" \
  -d '{}'
200 OK
{
  "connections": [
    {
      "id": "6f1c2d9e-4b7a-4e3f-9a51-0c8d2e7b4f13",
      "provider": "google-gmail",
      "status": "active",
      "account_label": "alice@example.com",
      "connected_at": "2026-12-01T14:08:32Z",
      "last_sync_at": "2026-12-01T14:19:05Z",
      "error": null
    },
    {
      "id": "0b9e7a4c-2f61-4d38-8c15-7e3a9d2b6f40",
      "provider": "slack",
      "status": "needs_reauth",
      "account_label": "Acme",
      "connected_at": "2026-11-20T09:31:47Z",
      "last_sync_at": "2026-11-29T22:04:13Z",
      "error": "The app refused access; the person must connect it again."
    }
  ]
}