Skip to main content
GET
/
context
Get customer context
curl --request GET \
  --url https://app.bily.ai/api/customer/v1/context \
  --header 'x-api-key: <api-key>'
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://app.bily.ai/api/customer/v1/context', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://app.bily.ai/api/customer/v1/context"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "user": {
    "id": "<string>",
    "email": "jsmith@example.com",
    "emailVerified": true,
    "name": "<string>",
    "image": "<string>"
  },
  "organizations": [
    {
      "id": "<string>",
      "name": "<string>",
      "slug": "<string>",
      "createdAt": "<string>",
      "stores": [
        {
          "id": "<string>",
          "url": "store.example.com",
          "type": "<string>",
          "currency": "<string>",
          "createdAt": "<string>",
          "updatedAt": "<string>"
        }
      ],
      "role": "<string>"
    }
  ]
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}

Authorizations

x-api-key
string
header
required

A server-side Bily API key created under Settings > MCP > Access key fallback. Select the intended store before creating it.

Query Parameters

organizationId
string

An explicitly selected accessible organization. Omit this parameter for an ordinary store-scoped API key; Bily uses the organization and store recorded on the key.

Response

Request completed successfully.

user
object
required
organizations
object[]
required