SkyLight Chat
API Reference

Account

Read and update your account profile, subscription plan, and connected channel status.

Get account profile

GET /api/v1/account

Returns your client account details. The API key is never included in the response for security reasons.

curl https://dashboard.skylightchat.com/api/v1/account \
  -H "X-Api-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "id": 12,
    "company_name": "Nakheel Trading",
    "slug": "nakheel-trading-xyz",
    "address": "طريق الملك عبدالله، الرياض",
    "timezone": "Asia/Riyadh",
    "country": { "id": 194, "name": "Saudi Arabia", "code": "SA" },
    "primary_user": {
      "id": 13,
      "first_name": "Ahmad",
      "last_name": "Ali",
      "email": "ahmad@nakheel.sa",
      "phone": "+966501234567"
    },
    "status": 1,
    "created_at": "2025-06-01T10:00:00+03:00"
  }
}

Update account profile

PATCH /api/v1/account

Update your account settings: company name, address, timezone, or country.

Request body

{
  "company_name": "Nakheel Trading International",
  "address": "طريق الأمير محمد بن سلمان، جدة",
  "timezone": "Europe/London",
  "country_id": 194
}
FieldTypeDescription
company_namestringAccount display name
addressstringBusiness address
timezonestringIANA timezone (e.g., Asia/Riyadh)
country_idintegerCountry ID from the countries list

Response

{
  "success": true,
  "message": "Account updated successfully."
}

Get subscription details

GET /api/v1/account/subscription

Returns your current plan, limits, and feature flags.

curl https://dashboard.skylightchat.com/api/v1/account/subscription \
  -H "X-Api-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": {
    "plan": {
      "id": 3,
      "name": "Business",
      "slug": "business"
    },
    "status": "active",
    "expires_at": "2027-03-01T00:00:00.000000Z",
    "limits": {
      "contacts": { "max": 10000, "used": 4238 },
      "team_members": { "max": 10, "used": 4 },
      "messages_per_month": { "max": 50000, "used": 12800 }
    },
    "features": {
      "webhooks": true,
      "api_access": true,
      "booking": true,
      "omni_channel": true,
      "advanced_analytics": true
    }
  }
}

Get connected channels

GET /api/v1/account/channels

Returns the connection status for each messaging channel.

curl https://dashboard.skylightchat.com/api/v1/account/channels \
  -H "X-Api-Key: YOUR_API_KEY"

Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "type": "whatsapp",
      "name": "دعم نخيل",
      "username": "+966512345678",
      "is_connected": true,
      "status": "active",
      "last_synced_at": "2026-01-10T08:00:00Z"
    },
    {
      "id": 2,
      "type": "telegram",
      "name": "بوت نخيل",
      "username": "@NakheelSupport",
      "is_connected": true,
      "status": "active",
      "last_synced_at": "2026-02-01T09:30:00Z"
    },
    {
      "id": 3,
      "type": "instagram",
      "name": null,
      "username": null,
      "is_connected": false,
      "status": "inactive",
      "last_synced_at": null
    }
  ]
}
FieldTypeDescription
idintegerChannel setting ID
typestringChannel identifier: whatsapp, telegram, instagram
namestring|nullDisplay name configured for this channel
usernamestring|nullAccount username or phone number
is_connectedbooleanWhether the channel is actively connected
statusstringactive or inactive
last_synced_atstring|nullISO 8601 timestamp of last sync