Who this key is
/api/v1/mefull kapsamlı bir anahtar ister.
The call to make first. It resolves the account behind the key, the companies and branches it can file against, the permissions it acts with and the plan features that decide which other endpoints answer.
One of the few responses with no data envelope: the object is the
payload.
Yanıt · 200
userobjectAlanları gösterAlanları gizle
iduuidnamestringnull olabiliremailstringrolestringlocalestringai_response_localestringnull olabilirverifiedboolean
accountobjectAlanları gösterAlanları gizle
iduuidexternal_account_idintegerThe number that appears in browser URLs for this account.
namestring
current_branchobjectnull olabilirAlways
nullfor an API key: a key belongs to the account, not to a desk. Name a branch per call instead.Alanları gösterAlanları gizle
iduuidnamestringcodestringnull olabiliris_headquartersbooleancompany_iduuidcompany_namestringnull olabilir
companiesobject[]Every company the principal can reach, default first, each with its branches.
Alanları gösterAlanları gizle
iduuidnamestringcompany_typestringnull olabiliris_defaultbooleanactivebooleanbranchesobject[]Alanları gösterAlanları gizle
iduuidnamestringcodestringnull olabiliris_headquartersbooleanactiveboolean
policiesobjectWhat the principal may do, as booleans.
featuresobjectPlan features, as booleans.
api_accessis the one that decides whether a key works at all: false here means every authenticated call answers403 plan_upgrade_required.billingobjectnull olabilirAlanları gösterAlanları gizle
statusstringplan_slugstringnull olabilirplan_namestringnull olabilirtrialingbooleanactivebooleantrial_ends_atdate-timenull olabilircancel_at_period_endboolean
server_timedate-timeUseful for checking clock drift before you sign or schedule anything.
Yanıtlar
401Missing or invalid Bearer token403Policy denied or account has no owner429Rate limit exceeded
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/me' \
-H 'Authorization: Bearer sek_YOUR_API_KEY'{
"user": {
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"name": "Ayşe Yılmaz",
"email": "ayse@example.com",
"role": "owner",
"locale": "tr",
"ai_response_locale": "string",
"verified": true
},
"account": {
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"external_account_id": 1000001,
"name": "Ayşe Yılmaz"
},
"current_branch": {
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"name": "Ayşe Yılmaz",
"code": "CUST-0042",
"is_headquarters": true,
"company_id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"company_name": "Ayşe Yılmaz"
},
"companies": [
{
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"name": "Ayşe Yılmaz",
"company_type": "agency",
"is_default": true,
"active": true,
"branches": [
{
"id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
"name": "Ayşe Yılmaz",
"code": "CUST-0042",
"is_headquarters": true,
"active": true
}
]
}
],
"policies": {},
"features": {},
"billing": {
"status": "active",
"plan_slug": "studio",
"plan_name": "Studio",
"trialing": true,
"active": true,
"trial_ends_at": "2026-03-14T09:30:00Z",
"cancel_at_period_end": true
},
"server_time": "2026-03-14T09:30:00Z"
}