Skip to content
Median
Esc
↑↓navigate↵open⌘Jpreview

Get a customer

The whole person: their history, the browser context the widget noticed, and the facts learned from resolved conversations.

GET/customers/{id}
Authorization
AuthorizationBearer token · headerrequired
`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Path parameters
idstringrequired
A customer id.
Responses
200The customer.
idstring
namestring | null
customerNumberinteger | null
emailstring | null
isVerifiedboolean
The host's site vouched for who this is.
firstSeenAtinteger
lastSeenAtinteger | null
conversationCountinteger
hasMoreConversationsboolean
metadataobject
contextobject | null
What the widget noticed about their browser, or null.
Show properties
timeZonestring
localestring
browserstring
osstring
devicestring
Allowed:desktoptabletmobile
screenstring
conversationsobject[]
Show properties
Array of object
idstring
threadIdstring | null
subjectstring
previewstring
statusstring
aiStatusstring
lastMessageAtinteger
factsobject[]
Show properties
Array of object
idstring
kindstring
Allowed:identitysetupbillingpreferencepromise
textstring
learnedAtinteger
401The bearer token is missing, revoked, or expired.
errorobject
Show properties
codestring
messagestring
404Not one of yours, or not there at all.
errorobject
Show properties
codestring
messagestring
429Too many requests. Wait the seconds in `Retry-After`. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobject
Show properties
codestring
messagestring
Request
curl -X GET "https://api.median.sh/v1/customers/string" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "id": "string",
  "name": "string",
  "customerNumber": 0,
  "email": "string",
  "isVerified": true,
  "firstSeenAt": 0,
  "lastSeenAt": 0,
  "conversationCount": 0,
  "hasMoreConversations": true,
  "metadata": {},
  "context": {
    "timeZone": "string",
    "locale": "string",
    "browser": "string",
    "os": "string",
    "device": "desktop",
    "screen": "string"
  },
  "conversations": [
    {
      "id": "string",
      "threadId": "string",
      "subject": "string",
      "preview": "string",
      "status": "string",
      "aiStatus": "string",
      "lastMessageAt": 0
    }
  ],
  "facts": [
    {
      "id": "string",
      "kind": "identity",
      "text": "string",
      "learnedAt": 0
    }
  ]
}