همهٔ سیستم‌ها عملیاتی‌اند

مرجع API · نسخهٔ v1

API حساب کاربری

پروفایل، کلیدهای SSH، تنظیم اعلان‌ها و نشست‌های ورود به پنل. این گروه با شناسهٔ account در فایل OpenAPI آمده و ۹ endpoint دارد.

نمونه‌های curl توکن را از متغیر محیطی IRANCLAUD_TOKEN می‌خوانند؛ ساخت توکن و تنظیم این متغیر در راهنمای شروع سریع آمده است.

GET /api/v1/account #

Get your profile and wallet balance

دسترسی لازم: account:read محدودیت نرخ: خواندن
پاسخ‌ها (۴)
  • 200 Profile data: uuidemailmobilemobile_verifiedkyc_statusnamelocalerolestatuswallet_balance_irrcurrencycreated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/account"

بازگشت به فهرست این بخش

GET /api/v1/me #

Alias of GET /api/v1/account

دسترسی لازم: account:read محدودیت نرخ: خواندن
پاسخ‌ها (۴)
  • 200 Same payload as /api/v1/account data: uuidemailmobilemobile_verifiedkyc_statusnamelocalerolestatuswallet_balance_irrcurrencycreated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/me"

بازگشت به فهرست این بخش

GET /api/v1/account/ssh-keys #

List your SSH keys

دسترسی لازم: account:read محدودیت نرخ: خواندن
پاسخ‌ها (۴)
  • 200 All keys (not paginated; meta.total = count) data[]: uuidlabelfingerprintkey_typepublic_keycreated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/account/ssh-keys"

بازگشت به فهرست این بخش

POST /api/v1/account/ssh-keys #

Add an SSH public key

دسترسی لازم: account:write محدودیت نرخ: تغییر
فیلدهای بدنه (JSON) (۲)
label string
الزامی max 100 chars
public_key string
الزامی One OpenSSH public key line (ssh-ed25519, ssh-rsa, ecdsa-…) — max 8192 chars
نمونهٔ بدنهٔ درخواست (JSON)
application/json
{
    "label": "laptop",
    "public_key": "ssh-ed25519 AAAA… user@laptop"
}
پاسخ‌ها (۵)
  • 201 Key added; Location header set data: uuidlabelfingerprintkey_typepublic_keycreated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:write (details.required_scope)
  • 422 validation_failed — label/public_key missing or too long, key not parseable, or the same key (fingerprint) already exists
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X POST \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"label":"laptop","public_key":"ssh-ed25519 AAAA… user@laptop"}' \
  "https://iranclaud.ir/api/v1/account/ssh-keys"

بازگشت به فهرست این بخش

DELETE /api/v1/account/ssh-keys/{uuid} #

Delete an SSH key

دسترسی لازم: account:write محدودیت نرخ: تغییر
پارامترهای مسیر (۱)
uuid string
الزامی Key UUID
پاسخ‌ها (۵)
  • 204 Deleted (servers that already have the key keep it)
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:write (details.required_scope)
  • 404 not_found — unknown key
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X DELETE \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/account/ssh-keys/YOUR_UUID"

بازگشت به فهرست این بخش

GET /api/v1/account/notifications #

Get your e-mail notification preferences

دسترسی لازم: account:read محدودیت نرخ: خواندن
پاسخ‌ها (۴)
  • 200 Current preferences data: low_balancetopupticket_reply
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/account/notifications"

بازگشت به فهرست این بخش

PATCH /api/v1/account/notifications #

Update notification preferences (send only the keys you want to change)

دسترسی لازم: account:write محدودیت نرخ: تغییر
فیلدهای بدنه (JSON) (۳)

All keys optional; omitted keys keep their current value. Values are read as booleans (true/false, 1/0, "yes"/"no"); anything else counts as false.

low_balance boolean
اختیاری Low wallet balance alerts
topup boolean
اختیاری Wallet top-up receipts
ticket_reply boolean
اختیاری Support replies on your tickets
نمونهٔ بدنهٔ درخواست (JSON)
application/json
{
    "low_balance": true,
    "ticket_reply": false
}
پاسخ‌ها (۴)
  • 200 Preferences after the update (all three keys) data: low_balancetopupticket_reply
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:write (details.required_scope)
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X PATCH \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"low_balance":true,"ticket_reply":false}' \
  "https://iranclaud.ir/api/v1/account/notifications"

بازگشت به فهرست این بخش

GET /api/v1/account/sessions #

List active panel login sessions (not API tokens)

دسترسی لازم: account:read محدودیت نرخ: خواندن
پاسخ‌ها (۴)
  • 200 Non-expired web sessions, most recently active first data[]: idiplast_activity_atexpires_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/account/sessions"

بازگشت به فهرست این بخش

DELETE /api/v1/account/sessions/{id} #

Sign out one panel session

دسترسی لازم: account:write محدودیت نرخ: تغییر
پارامترهای مسیر (۱)
id string
الزامی Full session id: 32-128 lowercase hex characters. The 8-character prefix from the list endpoint is not accepted.
پاسخ‌ها (۵)
  • 200 Session revoked data: revoked
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks account:write (details.required_scope)
  • 404 not_found — no such session on your account. Ids that are not 32-128 hex characters do not match the route at all (plain 404)
  • 429 rate_limited — write limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl -X DELETE \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/account/sessions/YOUR_ID"

بازگشت به فهرست این بخش

همهٔ گروه‌های API