Skip to content
cloudhostDocs
API reference

Teams

People, roles, invites and shared teams.

GET/v1/me

The person and their teams#

Credential
An API key or a dashboard session
Roles
Any role

Response

200Me

  • personPerson | nullrequired
  • teamTeamrequired
  • teamsTeam[]required

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

Example

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

Switch the session's team#

Credential
A dashboard session only (API keys are refused)
Roles
Any role

Request bodyapplication/json

  • teamstring (uuid)required

Response

200object

  • teamstring (uuid)
  • rolestring

    one of owner, admin, developer, billing, viewer

Errors

StatusDescription
400Bad request: bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
404Not found: not_found
500internal: an unexpected failure

Example

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#

Credential
A dashboard session only (API keys are refused)
Roles
Any role

Request bodyapplication/json

  • namestringrequired

    1–60 characters

Response

201object

  • idstring (uuid)
  • namestring

Errors

StatusDescription
400Bad request: bad_name, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: session_only
500internal: an unexpected failure

Example

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.

Credential
An API key or a dashboard session
Roles
Any role

Response

200object

  • membersMember[]required
  • seatsinteger
  • invitesInvite[]required

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

Example

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).

Credential
An API key or a dashboard session
Roles
owner, admin
Step-up
With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.

Request bodyapplication/json

  • emailstringrequired
  • 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

Response

200object

  • invitestring (uuid)
  • emailstring
  • rolestring

    one of owner, admin, developer, billing, viewer

  • expires_in_daysinteger

Errors

StatusDescription
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

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin

Parameters

  • idstring (uuid)pathrequired

    invite id

Response

200object

  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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#

Credential
None

Parameters

  • tokenstringquery

    the invite token

Response

200object

  • teamstring
  • emailstring
  • rolestring

    one of owner, admin, developer, billing, viewer

Errors

StatusDescription
404Not found: bad_invite
500internal: an unexpected failure

Example

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).

Credential
A dashboard session only (API keys are refused)
Roles
Any role

Request bodyapplication/json

  • tokenstringrequired

Response

200object

  • teamstring (uuid)
  • rolestring

    one of owner, admin, developer, billing, viewer

Errors

StatusDescription
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

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin to remove others (not a wider role); any member to leave
Step-up
With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.

Parameters

  • personstring (uuid)pathrequired

    the person's id

Response

200object

  • removedstring (uuid)

Errors

StatusDescription
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

Example

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.

Credential
An API key or a dashboard session
Roles
owner
Step-up
With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.

Parameters

  • personstring (uuid)pathrequired

    the person's id

Request bodyapplication/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

Response

200object

  • personstring (uuid)
  • rolestring

    one of owner, admin, developer, billing, viewer

Errors

StatusDescription
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

Example

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#

Credential
A dashboard session only (API keys are refused)
Roles
owner
Step-up
With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.

Response

200object

  • deletedstring

Errors

StatusDescription
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

Example

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.

Credential
An API key or a dashboard session
Roles
owner, admin

Request bodyapplication/json

  • namestringrequired

    1–60 characters

Response

200object

  • idstring (uuid)
  • namestring

Errors

StatusDescription
400Bad request: bad_name, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

Example

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

List shared variables#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • environmentstringquery

    the variables that apply there

    one of production, preview, development

  • keystringquery

    one key

  • projectstringquery

    the ones linked to this app or function

  • decryptstringquery

    1: plain values (owner, admin, developer)

    one of 1

Response

200EnvVarList

  • variablesEnvVar[]required
    • idstring (uuid)required
    • keystringrequired

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

    • environmentsstring[]required
    • branchstring | nullrequired

      a git branch; only with environments [preview]

    • scopestringrequired

      team: a shared variable

      one of project, team

    • typestringrequired

      sensitive: never shown again, production and preview only

      one of plain, sensitive

    • valuestring | nullrequired

      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)required
    • keystringrequired

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

    • environmentsstring[]required
    • branchstring | nullrequired

      a git branch; only with environments [preview]

    • scopestringrequired

      team: a shared variable

      one of project, team

    • typestringrequired

      sensitive: never shown again, production and preview only

      one of plain, sensitive

    • valuestring | nullrequired

      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

Errors

StatusDescription
400Bad request: bad_environments
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
500internal: an unexpected failure

Example

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.

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Request bodyapplication/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

Response

201EnvVarAdded

  • variablesEnvVar[]required
  • createdintegerrequired
  • updatedintegerrequired

Errors

StatusDescription
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

Example

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#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • idstring (uuid)pathrequired

    the variable's id

  • decryptstringquery

    1: plain values (owner, admin, developer)

    one of 1

Response

200EnvVar

  • idstring (uuid)required
  • keystringrequired

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

  • environmentsstring[]required
  • branchstring | nullrequired

    a git branch; only with environments [preview]

  • scopestringrequired

    team: a shared variable

    one of project, team

  • typestringrequired

    sensitive: never shown again, production and preview only

    one of plain, sensitive

  • valuestring | nullrequired

    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

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Parameters

  • idstring (uuid)pathrequired

    the variable's id

Response

200object

  • idstring (uuid)
  • keystring
  • deletedboolean

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden
404Not found: not_found
500internal: an unexpected failure

Example

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#

Credential
An API key or a dashboard session
Roles
owner, admin, developer

Parameters

  • idstring (uuid)pathrequired

    the variable's id

Request bodyapplication/json

  • keystring
  • valuestring

    up to 5120 characters

  • environmentsstring[]
  • branchstring | null
  • typestring

    one of plain, sensitive

  • sensitiveboolean
  • projectsstring[]

    shared variables only: replaces the links

Response

200EnvVar

  • idstring (uuid)required
  • keystringrequired

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

  • environmentsstring[]required
  • branchstring | nullrequired

    a git branch; only with environments [preview]

  • scopestringrequired

    team: a shared variable

    one of project, team

  • typestringrequired

    sensitive: never shown again, production and preview only

    one of plain, sensitive

  • valuestring | nullrequired

    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

Errors

StatusDescription
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

Example

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#

Credential
An API key or a dashboard session
Roles
Any role

Response

200EnvSummary

  • totalintegerrequired
  • projectintegerrequired

    projects' own variables

  • sharedintegerrequired

    the team's shared variables

  • sensitiveintegerrequired
  • projectsintegerrequired

    projects with variables of their own

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

Example

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

The team policy for variables#

Credential
An API key or a dashboard session
Roles
Any role

Response

200object

  • sensitive_by_defaultbooleanrequired

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

Example

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.

Credential
An API key or a dashboard session
Roles
owner
Step-up
With a dashboard session, a second factor confirmed in the last 10 minutes; API keys pass.

Request bodyapplication/json

  • sensitive_by_defaultbooleanrequired

Response

200object

  • sensitive_by_defaultboolean

Errors

StatusDescription
400Bad request: bad_policy, bad_json
401unauthorized: missing, invalid, expired or revoked credential
403Not allowed: forbidden, step_up_required
500internal: an unexpected failure

Example

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.

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • sincestringquery

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

  • untilstringquery

    ISO time or epoch ms

  • levelstringquery

    error, warning, info (comma list)

  • sourcestringquery

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

  • statusstringquery

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

  • pathstringquery

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

  • environmentstringquery

    production or preview

  • branchstringquery

    a preview's branch

  • deploymentstringquery

    a version number, e.g. 12 or v12

  • qstringquery

    text the entry contains

  • limitintegerquery

    1-1000, default 100

    1–1000 · default 100

  • cursorstringquery

    next_cursor of the page before

  • facetsstringquery

    1: counts per filter value

  • bucketsintegerquery

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

    0–120

  • projectstringquery

    project names (comma list)

Response

200LogPage

  • logsLogEntry[]required

    newest last

  • next_cursorstring | nullrequired

    pass as cursor for older entries

  • matchedintegerrequired

    entries in the range that match

  • scannedintegerrequired
  • 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

Errors

StatusDescription
400Bad request: bad_param
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

Example

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

The team's previews across its projects#

Credential
An API key or a dashboard session
Roles
Any role

Parameters

  • limitintegerquery

    1-200, default 20

    1–200 · default 20

Response

200object

  • previewsTeamPreview[]required
    • branchstringrequired
    • urlstringrequired
    • versionintegerrequired
    • updated_atstring (date-time)
    • git_branchstring | null

      the git branch the build came from

    • commitstring | null
    • messagestring | null

      the commit's first line

    • projectstringrequired
    • kindstringrequired

      one of function, app

Errors

StatusDescription
401unauthorized: missing, invalid, expired or revoked credential
500internal: an unexpected failure

Example

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