رفتن به محتوا
cloudhostمستندات
مرجع API

تیم‌ها

اعضا، نقش‌ها، دعوت‌ها و تیم‌های مشترک.

توضیح هر مسیر به انگلیسی است، همان متنی که مرجع از کد ساخته می‌شود. مسیرها، نام فیلدها و کدها همان‌اند که در درخواست می‌نویسید.
GET/v1/me

The person and their teams#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پاسخ

200Me

  • personPerson | nullالزامی
  • teamTeamالزامی
  • teamsTeam[]الزامی

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/me" \
  -H "Authorization: Bearer $KEY"
POST/v1/me/team

Switch the session's team#

دسترسی
فقط نشست داشبورد (کلید API پذیرفته نمی‌شود)
نقش‌ها
همهٔ نقش‌ها

بدنهٔ درخواستapplication/json

  • teamstring (uuid)الزامی

پاسخ

200object

  • teamstring (uuid)
  • rolestring

    one of owner, admin, developer, billing, viewer

خطاها

وضعیتتوضیح
400Bad request: bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/me/team" \
  -H "Authorization: Bearer $SESSION" \
  -d '{"team":"8c1e0c55-1f2a-4d3b-9e8f-0a1b2c3d4e5f"}'
POST/v1/teams

Make a shared team#

دسترسی
فقط نشست داشبورد (کلید API پذیرفته نمی‌شود)
نقش‌ها
همهٔ نقش‌ها

بدنهٔ درخواستapplication/json

  • namestringالزامی

    1–60 characters

پاسخ

201object

  • idstring (uuid)
  • namestring

خطاها

وضعیتتوضیح
400Bad request: bad_name, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/teams" \
  -H "Authorization: Bearer $SESSION" \
  -d '{"name":"Shop team"}'
GET/v1/team/members

Members and open invites#

invites is filled only for admins and owners. seats: members that take a developer seat.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پاسخ

200object

  • membersMember[]الزامی
  • seatsinteger
  • invitesInvite[]الزامی

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/team/members" \
  -H "Authorization: Bearer $KEY"
POST/v1/team/invites

Invite a person by email#

An admin or developer invite needs a seat: refused on Hobby (one seat, the owner's); on Pro the wallet must pay the seat now (charged when the invite is accepted).

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

بدنهٔ درخواستapplication/json

  • emailstringالزامی
  • rolestring

    one of admin, developer, billing, viewer · default "developer"

  • restrictedboolean

    developer or viewer only: the member joins limited to chosen projects

  • groupsstring (uuid)[]

    access groups the member joins (with restricted: true)

    0–20 items

پاسخ

200object

  • invitestring (uuid)
  • emailstring
  • rolestring

    one of owner, admin, developer, billing, viewer

  • expires_in_daysinteger

خطاها

وضعیتتوضیح
400Bad request: bad_email, bad_role, bad_json
401unauthorized: missing, invalid, expired or revoked credential
402Payment required: insufficient_balance
403Not allowed: forbidden, role_too_wide, step_up_required
409Conflict: member, seat_limit
429Too many requests: rate_limited
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/team/invites" \
  -H "Authorization: Bearer $KEY" \
  -d '{"email":"you@example.com"}'
DELETE/v1/team/invites/{id}

Withdraw an invite#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

پارامترها

  • idstring (uuid)مسیرالزامی

    invite id

پاسخ

200object

  • deletedboolean

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/team/invites/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
GET/v1/team/invites/lookup

What an invite link is for#

دسترسی
بدون اعتبارنامه

پارامترها

  • tokenstringکوئری

    the invite token

پاسخ

200object

  • teamstring
  • emailstring
  • rolestring

    one of owner, admin, developer, billing, viewer

خطاها

وضعیتتوضیح
404Not found: bad_invite
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/team/invites/lookup"
POST/v1/team/invites/accept

Join a team with an invite#

Joining with a seat role charges the team's wallet for the seat (the days left in the month).

دسترسی
فقط نشست داشبورد (کلید API پذیرفته نمی‌شود)
نقش‌ها
همهٔ نقش‌ها

بدنهٔ درخواستapplication/json

  • tokenstringالزامی

پاسخ

200object

  • teamstring (uuid)
  • rolestring

    one of owner, admin, developer, billing, viewer

خطاها

وضعیتتوضیح
400Bad request: bad_invite, bad_json
401unauthorized: missing, invalid, expired or revoked credential
402Payment required: insufficient_balance
403Not allowed: bad_invite, session_only
404Not found: bad_invite
409Conflict: seat_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/team/invites/accept" \
  -H "Authorization: Bearer $SESSION" \
  -d '{"token":"…"}'
DELETE/v1/team/members/{person}

Remove a member, or leave#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
owner, admin to remove others (not a wider role); any member to leave
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

پارامترها

  • personstring (uuid)مسیرالزامی

    the person's id

پاسخ

200object

  • removedstring (uuid)

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
404Not found: not_found
409Conflict: last_owner, personal
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/team/members/5b0f4c2e-8f1d-4a7e-9c3b-2d6e1f0a9b8c" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/team/members/{person}

Change a member's role#

To a seat role from viewer or billing: refused on Hobby; on Pro the days left in the month are charged now. To a free role: no refund, the seat stays paid to the month's end.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

پارامترها

  • personstring (uuid)مسیرالزامی

    the person's id

بدنهٔ درخواستapplication/json

  • rolestring

    one of owner, admin, developer, billing, viewer

  • restrictedboolean

    limit a developer or viewer to chosen projects (access groups), or give the whole team back

پاسخ

200object

  • personstring (uuid)
  • rolestring

    one of owner, admin, developer, billing, viewer

خطاها

وضعیتتوضیح
400Bad request: bad_role, bad_json
401unauthorized: missing, invalid, expired or revoked credential
402Payment required: insufficient_balance
403Not allowed: forbidden, step_up_required
404Not found: not_found
409Conflict: last_owner, seat_limit
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/team/members/5b0f4c2e-8f1d-4a7e-9c3b-2d6e1f0a9b8c" \
  -H "Authorization: Bearer $KEY" \
  -d '{"role":"owner","restricted":true}'
DELETE/v1/team

Delete the current shared team#

دسترسی
فقط نشست داشبورد (کلید API پذیرفته نمی‌شود)
نقش‌ها
مالک
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

پاسخ

200object

  • deletedstring

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required, session_only
409Conflict: personal, not_empty, unpaid, balance
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/team" \
  -H "Authorization: Bearer $SESSION"
PATCH/v1/team

Rename the current team#

Body {"name"}, 1-60 characters.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین

بدنهٔ درخواستapplication/json

  • namestringالزامی

    1–60 characters

پاسخ

200object

  • idstring (uuid)
  • namestring

خطاها

وضعیتتوضیح
400Bad request: bad_name, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/team" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"Shop team"}'
GET/v1/team/env

List shared variables#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • environmentstringکوئری

    the variables that apply there

    one of production, preview, development

  • keystringکوئری

    one key

  • projectstringکوئری

    the ones linked to this app or function

  • decryptstringکوئری

    1: plain values (owner, admin, developer)

    one of 1

پاسخ

200EnvVarList

  • variablesEnvVar[]الزامی
    • idstring (uuid)الزامی
    • keystringالزامی

      pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

    • environmentsstring[]الزامی
    • branchstring | nullالزامی

      a git branch; only with environments [preview]

    • scopestringالزامی

      team: a shared variable

      one of project, team

    • typestringالزامی

      sensitive: never shown again, production and preview only

      one of plain, sensitive

    • valuestring | nullالزامی

      the text only when revealed (?decrypt=1) and plain

    • created_atstring (date-time)
    • updated_atstring (date-time)
    • created_byobject | null
    • updated_byobject | null
    • projectsobject[]

      shared variables only

  • sharedEnvVar[]

    a project's list: the team's shared variables linked to it

    • idstring (uuid)الزامی
    • keystringالزامی

      pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

    • environmentsstring[]الزامی
    • branchstring | nullالزامی

      a git branch; only with environments [preview]

    • scopestringالزامی

      team: a shared variable

      one of project, team

    • typestringالزامی

      sensitive: never shown again, production and preview only

      one of plain, sensitive

    • valuestring | nullالزامی

      the text only when revealed (?decrypt=1) and plain

    • created_atstring (date-time)
    • updated_atstring (date-time)
    • created_byobject | null
    • updated_byobject | null
    • projectsobject[]

      shared variables only

خطاها

وضعیتتوضیح
400Bad request: bad_environments
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/team/env" \
  -H "Authorization: Bearer $KEY"
POST/v1/team/env

Add or import shared variables#

Linked to the apps and functions in projects; a project's own variable with the same key wins.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

بدنهٔ درخواستapplication/json

one of: {key, value, …}, {variables: [...]}, {dotenv}

  • keystring
  • valuestring

    up to 5120 characters

  • variablesEnvVarInput[]

    several, up to 128

  • dotenvstring

    .env text to import

  • environmentsstring[]

    for every row that leaves them out

  • branchstring

    projects only

  • typestring

    one of plain, sensitive

  • sensitiveboolean
  • upsertboolean

    replace the value of a variable with the same key, branch and environments

  • projectsstring[]

    shared variables only: the apps and functions it reaches

پاسخ

201EnvVarAdded

  • variablesEnvVar[]الزامی
  • createdintegerالزامی
  • updatedintegerالزامی

خطاها

وضعیتتوضیح
400Bad request: bad_variable, bad_key, bad_value, bad_environments, bad_type, bad_branch, sensitive_development, policy_sensitive, bad_dotenv, duplicate, bad_projects, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: env_conflict, sensitive, too_many
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/team/env" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","value":"s3cr3t","variables":[{"key":"STRIPE_KEY","value":"s3cr3t","environments":["production"],"branch":"dev","type":"plain","sensitive":true}],"dotenv":"…","environments":["production"],"branch":"dev","type":"plain","sensitive":true,"upsert":true,"projects":["…"]}'
GET/v1/team/env/{id}

One shared variable#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • idstring (uuid)مسیرالزامی

    the variable's id

  • decryptstringکوئری

    1: plain values (owner, admin, developer)

    one of 1

پاسخ

200EnvVar

  • idstring (uuid)الزامی
  • keystringالزامی

    pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

  • environmentsstring[]الزامی
  • branchstring | nullالزامی

    a git branch; only with environments [preview]

  • scopestringالزامی

    team: a shared variable

    one of project, team

  • typestringالزامی

    sensitive: never shown again, production and preview only

    one of plain, sensitive

  • valuestring | nullالزامی

    the text only when revealed (?decrypt=1) and plain

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_byobject | null
  • updated_byobject | null
  • projectsobject[]

    shared variables only

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/team/env/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/team/env/{id}

Delete a shared variable#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • idstring (uuid)مسیرالزامی

    the variable's id

پاسخ

200object

  • idstring (uuid)
  • keystring
  • deletedboolean

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/team/env/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/team/env/{id}

Change a shared variable#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • idstring (uuid)مسیرالزامی

    the variable's id

بدنهٔ درخواستapplication/json

  • keystring
  • valuestring

    up to 5120 characters

  • environmentsstring[]
  • branchstring | null
  • typestring

    one of plain, sensitive

  • sensitiveboolean
  • projectsstring[]

    shared variables only: replaces the links

پاسخ

200EnvVar

  • idstring (uuid)الزامی
  • keystringالزامی

    pattern ^[A-Za-z_][A-Za-z0-9_]{0,63}$

  • environmentsstring[]الزامی
  • branchstring | nullالزامی

    a git branch; only with environments [preview]

  • scopestringالزامی

    team: a shared variable

    one of project, team

  • typestringالزامی

    sensitive: never shown again, production and preview only

    one of plain, sensitive

  • valuestring | nullالزامی

    the text only when revealed (?decrypt=1) and plain

  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_byobject | null
  • updated_byobject | null
  • projectsobject[]

    shared variables only

خطاها

وضعیتتوضیح
400Bad request: bad_key, bad_value, bad_environments, bad_type, bad_branch, sensitive_development, policy_sensitive, bad_projects, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
409Conflict: env_conflict, sensitive, too_many
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/team/env/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY" \
  -d '{"key":"STRIPE_KEY","value":"s3cr3t","environments":["production"],"branch":"dev","type":"plain","sensitive":true,"projects":["…"]}'
GET/v1/team/env-summary

How many variables the team has#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پاسخ

200EnvSummary

  • totalintegerالزامی
  • projectintegerالزامی

    projects' own variables

  • sharedintegerالزامی

    the team's shared variables

  • sensitiveintegerالزامی
  • projectsintegerالزامی

    projects with variables of their own

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/team/env-summary" \
  -H "Authorization: Bearer $KEY"
GET/v1/team/env-policy

The team policy for variables#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پاسخ

200object

  • sensitive_by_defaultbooleanالزامی

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/team/env-policy" \
  -H "Authorization: Bearer $KEY"
PUT/v1/team/env-policy

Sensitive by default: on or off#

When on, every new variable for production or preview is sensitive and cannot be made plain.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک
تایید دوم
با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.

بدنهٔ درخواستapplication/json

  • sensitive_by_defaultbooleanالزامی

پاسخ

200object

  • sensitive_by_defaultboolean

خطاها

وضعیتتوضیح
400Bad request: bad_policy, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/team/env-policy" \
  -H "Authorization: Bearer $KEY" \
  -d '{"sensitive_by_default":true}'
GET/v1/logs

The team's logs across its apps and functions#

Every project's entries merged newest first (newest last in the page), each naming its project and product.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • sincestringکوئری

    ISO time, epoch ms, or back from now: 30m, 1h, 7d

  • untilstringکوئری

    ISO time or epoch ms

  • levelstringکوئری

    error, warning, info (comma list)

  • sourcestringکوئری

    request, static, fetch, cron, console (comma list)

  • statusstringکوئری

    codes or classes, e.g. 404,5xx

  • pathstringکوئری

    request paths (comma list); end with * for a prefix

  • environmentstringکوئری

    production or preview

  • branchstringکوئری

    a preview's branch

  • deploymentstringکوئری

    a version number, e.g. 12 or v12

  • qstringکوئری

    text the entry contains

  • limitintegerکوئری

    1-1000, default 100

    1–1000 · default 100

  • cursorstringکوئری

    next_cursor of the page before

  • facetsstringکوئری

    1: counts per filter value

  • bucketsintegerکوئری

    a histogram of the range in this many bars (up to 120)

    0–120

  • projectstringکوئری

    project names (comma list)

پاسخ

200LogPage

  • logsLogEntry[]الزامی

    newest last

  • next_cursorstring | nullالزامی

    pass as cursor for older entries

  • matchedintegerالزامی

    entries in the range that match

  • scannedintegerالزامی
  • truncatedboolean

    the team's request read only part of its logs

  • facetsobject

    with facets=1: counts per filter value, each over what the other filters leave

  • histogramobject

    with buckets=n: the range in n bars, per level

خطاها

وضعیتتوضیح
400Bad request: bad_param
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/logs" \
  -H "Authorization: Bearer $KEY"
GET/v1/previews

The team's previews across its projects#

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • limitintegerکوئری

    1-200, default 20

    1–200 · default 20

پاسخ

200object

  • previewsTeamPreview[]الزامی
    • branchstringالزامی
    • urlstringالزامی
    • versionintegerالزامی
    • updated_atstring (date-time)
    • git_branchstring | null

      the git branch the build came from

    • commitstring | null
    • messagestring | null

      the commit's first line

    • projectstringالزامی
    • kindstringالزامی

      one of function, app

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/previews" \
  -H "Authorization: Bearer $KEY"