Lydira API
TR

API reference

Account

2 endpoints

Who the key is, and the ids every other call needs. GET /api/v1/me resolves the account, the companies and branches the key can reach, and the plan features that decide which endpoints answer at all; a key runs as the account owner unless the agency bound it to a role, in which case that role's permission set applies and masked fields come back null.

GET /api/v1/users is the seat directory, which is where an assigned_to_id comes from.

Who this key is

GET/api/v1/me

Needs a key with the full scope.

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.

Response · 200

  • userobject
    Show fields
    • iduuid
    • namestringnullable
    • emailstring
    • rolestring
    • localestring
    • ai_response_localestringnullable
    • verifiedboolean
  • accountobject
    Show fields
    • iduuid
    • external_account_idinteger

      The number that appears in browser URLs for this account.

    • namestring
  • current_branchobjectnullable

    Always null for an API key: a key belongs to the account, not to a desk. Name a branch per call instead.

    Show fields
    • iduuid
    • namestring
    • codestringnullable
    • is_headquartersboolean
    • company_iduuid
    • company_namestringnullable
  • companiesobject[]

    Every company the principal can reach, default first, each with its branches.

    Show fields
    • iduuid
    • namestring
    • company_typestringnullable
    • is_defaultboolean
    • activeboolean
    • branchesobject[]
      Show fields
      • iduuid
      • namestring
      • codestringnullable
      • is_headquartersboolean
      • activeboolean
  • policiesobject

    What the principal may do, as booleans.

  • featuresobject

    Plan features, as booleans. api_access is the one that decides whether a key works at all: false here means every authenticated call answers 403 plan_upgrade_required.

  • billingobjectnullable
    Show fields
    • statusstring
    • plan_slugstringnullable
    • plan_namestringnullable
    • trialingboolean
    • activeboolean
    • trial_ends_atdate-timenullable
    • cancel_at_period_endboolean
  • server_timedate-time

    Useful for checking clock drift before you sign or schedule anything.

Responses

  • 401Missing or invalid Bearer token
  • 403Policy denied or account has no owner
  • 429Rate limit exceeded
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/me' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "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"
}

Seat directory

GET/api/v1/users

Needs a key with the full scope.

Everyone who can be assigned work on this account, ordered by name. Bounded at 50 rows and not cursored: this is a picker source, so narrow it with ?q= rather than paging it.

Parameters

Query

  • qstring

    Case-insensitive match on name or email.

Response · 200

  • dataobject[]required
    Show fields
    • iduuid
    • namestringnullable
    • emailstringnullable

Responses

  • 401Missing or invalid Bearer token
  • 403Policy denied or account has no owner
  • 429Rate limit exceeded
curl -X GET 'https://YOUR-CELL.lydira.com/api/v1/users' \
  -H 'Authorization: Bearer sek_YOUR_API_KEY'
Response
200
{
  "data": [
    {
      "id": "9d2f7c3a-1b4e-4a7d-8e51-2c0f6b9a4d18",
      "name": "Ayşe Yılmaz",
      "email": "ayse@example.com"
    }
  ]
}