Get my context
GET /api/v1/me
The bootstrap call. It answers four questions at once:
- which organization the key opens — it is the entire scope of the key, and it can never be changed by a request;
- what the bearer may do there (
owner,adminormember); - the settings every other endpoint depends on: timezone, currency, buffer, hold expiry;
- the plan: the limit, the current usage and what remains for villas, bookings and customers.
Authorization
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Allowed |
Membership is enough — an agent has to be able to discover that it may not write.
Parameters
None.
Example
bash
curl -H "x-api-key: $VILLASLOT_API_KEY" \
"https://villaslot.app/api/v1/me"Response
200 OK— the context.
json
{
"success": true,
"data": {
"organization": {
"id": "a379bb76-…",
"name": "TechCorp Solutions",
"slug": "techcorp-solutions"
},
"key": {"userId": "8105d4bd-…", "organizationRole": "owner"},
"settings": {
"timezone": "Asia/Makassar",
"currency": "IDR",
"bufferMinutes": 30,
"holdExpirationHours": 24,
"configured": true
},
"plan": {
"name": "free",
"hasSubscription": true,
"limits": {
"properties": {"limit": 1, "usage": 4, "remaining": 0},
"bookings": {"limit": 10, "usage": 7, "remaining": 3},
"customers": {"limit": 15, "usage": 4, "remaining": 11}
}
}
}
}What it refuses
401 Unauthorized— missing or invalid key, or a key whose bearer left the organization.429 Too Many Requests— over 120 requests in a minute for this key.
Notes
settings.configured: falsemeans no currency has been chosen yet. Creating a booking will be refused until one is.plan.limits.*.remaining: 0is a promise, not a hint: the same verdict is checked again by the service before any write, and the creation will answer409.