GET/api/v2/account
لقطة الحساب
حقول الملف الآمنة، رصيد المحفظة، ملخص الاشتراك النشط، ومنح الرسائل المجانية (freeMessageGrants). لا تُعاد أسرار أو توكنات.
مثال الاستجابة
لقطة تتضمن منح الرسائل المجانية
{
"success": true,
"data": {
"profile": {
"id": "6800user123def4567890ffff",
"name": "Acme Co",
"email": "ops@acme.example",
"phone": "+963912345678",
"avatar": null,
"phoneVerified": true,
"businessName": "Acme",
"appName": "Acme App",
"businessNameVerified": true,
"appNameVerified": true,
"ownerId": null,
"memberPermissions": null,
"createdAt": "2026-01-10T08:00:00.000Z"
},
"wallet": {
"balance": 4.88,
"availableBalance": 4.88,
"currency": "USD"
},
"subscription": {
"access": {
"canSend": true,
"reason": "ok",
"poolExhausted": false,
"effectiveLimit": 1000,
"periodMessageLimit": 1000,
"bonusMessagesGranted": 0,
"remainingSegments": 800,
"usageCount": 200,
"usageByChannel": {},
"channelLimits": null,
"cycleStart": "2026-07-01T00:00:00.000Z",
"cycleEnd": "2026-08-01T00:00:00.000Z"
},
"active": {
"planName": "Growth",
"status": "active",
"startAt": "2026-07-01T00:00:00.000Z",
"endAt": "2026-08-01T00:00:00.000Z",
"isTrial": false,
"billingCycleMonths": 1
},
"pool": {
"hasActivePlan": true,
"poolSuppressed": false,
"effectiveLimit": 1000,
"usedSegments": 200,
"remainingSegments": 800,
"usedMessages": 180,
"usageByChannel": {},
"channelLimits": null,
"cycleStart": "2026-07-01T00:00:00.000Z",
"cycleEnd": "2026-08-01T00:00:00.000Z",
"poolExhausted": false,
"planName": "Growth"
}
},
"freeMessageGrants": {
"summary": {
"totals": {
"granted": 100,
"consumed": 10,
"reserved": 0,
"withdrawn": 0,
"remaining": 90,
"activeRemaining": 90
},
"activeGrantCount": 1,
"grantCount": 1,
"byScope": [
{
"channel": "sms_local",
"providerKey": null,
"messageType": "all",
"granted": 100,
"consumed": 10,
"reserved": 0,
"withdrawn": 0,
"remaining": 90,
"activeRemaining": 90,
"grantCount": 1
}
]
},
"grants": [
{
"id": "6800abc123def4567890fedc",
"channel": "sms_local",
"providerKey": null,
"messageType": "all",
"initialQuantity": 100,
"consumedQuantity": 10,
"reservedQuantity": 0,
"withdrawnQuantity": 0,
"remainingQuantity": 90,
"status": "active",
"cycleStart": "2026-07-01T00:00:00.000Z",
"cycleEnd": "2026-08-01T00:00:00.000Z",
"expiresAt": "2026-08-31T23:59:59.000Z",
"reason": "admin_gift",
"userNote": "Complimentary SMS gift from support",
"subscriptionId": null,
"createdAt": "2026-07-15T10:00:00.000Z"
}
]
}
}
}طلب HTTP
GET /api/v2/account
ترويسات الطلب
| الترويسة | النوع | الوصف |
|---|---|---|
| X-API-Key | string | مفتاح Rasel API. أرسله في كل طلب موثّق ما عدا الويب هوك الوارد. * |
حقول الاستجابة
| الحقل | النوع | الوصف | مثال |
|---|---|---|---|
| success | boolean | صحيح عندما ينجح الإجراء، أو عندما ينجح مستلم واحد على الأقل في الدفعة. | true |
| data | object | الحمولة الأساسية لمسارات القائمة واللقطة. |
رموز الحالة
| الحالة | الوصف |
|---|---|
| 200 | نجاح. |
| 401 | مفتاح API مفقود أو غير صالح. |
| 403 | الهاتف غير موثّق، أو الصلاحية ناقصة، أو الحساب لا يستطيع تنفيذ هذا الإجراء. |
| 429 | تم تجاوز حد المعدل، أو وصل عدد محاولات التحقق إلى الحد الأقصى. |
جرّب الطلب
الاستجابة
نفّذ طلباً لعرض الاستجابة.