Skip to main content

REST API

clepit's REST surface covers tenant administration: members, invitations, billing and tenant settings. Every operation needs an access token.

HostServes
https://api.clepit.comProduction
https://staging.api.clepit.comStaging

members

POST/v1/tenants/me/members/listhttps://api.clepit.com

List the caller's tenant members

Cursor-paginated. The body carries the filter and cursor; POST rather than GET because the filter is structured.

Auth bearerAuth

Responses

A page of members

JSON
{
  "nextCursor?": "string | null",
  "rows": [
    {
      "id": "string",
      "userId": "string",
      "email": "string",
      "name?": "string | null",
      "status": "string",
      "roleId?": "string | null",
      "roleName?": "string | null",
      "joinedAt": "string",
      "suspendedAt?": "string | null",
      "suspensionSource?": "string | null",
      "removedAt?": "string | null",
      "removedById?": "string | null"
    }
  ],
  "total": "integer"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/members/list" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/members/{id}/suspendhttps://api.clepit.com

Suspend a member

Suspends one membership in the caller's tenant.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe membership id to suspend.

Responses

The suspended membership

JSON
{
  "id": "string",
  "suspendedAt": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/members/:id/suspend" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/members/{id}/unsuspendhttps://api.clepit.com

Reinstate a suspended member

Lifts a suspension on one membership in the caller's tenant.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe membership id to reinstate.

Responses

The reinstated membership

JSON
{
  "id": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/members/:id/unsuspend" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/members/{id}https://api.clepit.com

Remove a member

Removes one membership from the caller's tenant. Requires a fresh MFA-backed session; forward the ID token in X-Id-Token.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe membership id to remove.

Responses

The removed membership

JSON
{
  "id": "string",
  "removedAt": "string"
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/members/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/membershiphttps://api.clepit.com

Leave the tenant

Removes the caller's own membership. An owner must transfer ownership first.

Auth bearerAuth

Responses

The removed membership

JSON
{
  "id": "string",
  "removedAt": "string"
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/membership" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/members/bulk-removehttps://api.clepit.com

Remove several members

Each result reports its own outcome, so a partial success is still a 200. A membership that would leave the tenant without an owner is refused; so is your own, which is what leave is for. Requires a fresh MFA-backed session.

Auth bearerAuth

Responses

Per-membership results

JSON
{
  "results": "unknown"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/members/bulk-remove" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/members/bulk-rolehttps://api.clepit.com

Assign one role to several members

Rows apply in order within one transaction, so demoting every owner in a batch refuses the last one rather than leaving the tenant ownerless.

Auth bearerAuth

Responses

Per-membership results

JSON
{
  "results": "unknown"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/members/bulk-role" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/members/{id}/rolehttps://api.clepit.com

Change a member's role

Replaces the member's current role assignment.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe membership id whose role changes.

Responses

Role changed

JSON
{
  "ok": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/members/:id/role" \
  -H "Authorization: Bearer $BEARER_AUTH"

invitations

POST/v1/tenants/me/invitationshttps://api.clepit.com

Invite people to the tenant

Creates invitations in bulk. Each result reports its own outcome, so a partial success is still a 200.

Auth bearerAuth

Responses

Per-invitation results

JSON
{
  "results": "unknown"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/invitations" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/invitations/listhttps://api.clepit.com

List the tenant's invitations

Cursor-paginated, same shape as the member list.

Auth bearerAuth

Responses

A page of invitations

JSON
{
  "nextCursor?": "string | null",
  "rows": [
    {
      "id": "string",
      "email": "string",
      "status": "string",
      "roleId?": "string | null",
      "roleName?": "string | null",
      "invitedById?": "string | null",
      "sentAt": "string",
      "expiresAt": "string",
      "acceptedAt?": "string | null",
      "revokedAt?": "string | null"
    }
  ],
  "total": "integer"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/invitations/list" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/invitations/{id}/resendhttps://api.clepit.com

Resend an invitation

Re-sends the invitation email and extends its expiry.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe invitation id to resend.

Responses

The resent invitation

JSON
{
  "id": "string",
  "email": "string",
  "expiresAt": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/invitations/:id/resend" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/invitations/{id}https://api.clepit.com

Revoke an invitation

Revokes a pending invitation so its link stops working.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe invitation id to revoke.

Responses

The revoked invitation

JSON
{
  "id": "string",
  "revokedAt": "string"
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/invitations/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"

tenant-settings

POST/v1/tenants/me/transfer-ownershiphttps://api.clepit.com

Transfer tenant ownership

Moves ownership of the caller's tenant to another member. Requires a fresh MFA-backed session.

Auth bearerAuth

Responses

Ownership transferred

JSON
{
  "ok": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/transfer-ownership" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/allowed-email-domainshttps://api.clepit.com

Read the tenant's allowed email domains

An empty list means invitations are not restricted by domain.

Auth bearerAuth

Responses

The current policy

JSON
{
  "allowedEmailDomains": []
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/allowed-email-domains" \
  -H "Authorization: Bearer $BEARER_AUTH"
PUT/v1/tenants/me/allowed-email-domainshttps://api.clepit.com

Replace the tenant's allowed email domains

Replaces the whole list; an empty list clears the restriction. Domains are normalised to lowercase and matched exactly — a subdomain must be listed in its own right. Requires a fresh MFA-backed session.

Auth bearerAuth

Responses

The stored policy

JSON
{
  "allowedEmailDomains": []
}

Try it

curl -X PUT "https://api.clepit.com/v1/tenants/me/allowed-email-domains" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/roleshttps://api.clepit.com

Create a custom role

Defines a tenant role centrally as the acting person, then mirrors it locally. The central service refuses a definition carrying privileges the caller cannot pass on.

Auth bearerAuth

Responses

Role created

JSON
{
  "id": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/roles" \
  -H "Authorization: Bearer $BEARER_AUTH"
PATCH/v1/tenants/me/roles/{id}https://api.clepit.com

Update a custom role

Replaces the role's name, description and privilege bundle. System roles marked not editable are refused. Subject to the same delegation intersection as creation.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe role id being edited.

Responses

Role updated

JSON
{
  "ok": "boolean"
}

Try it

curl -X PATCH "https://api.clepit.com/v1/tenants/me/roles/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/roles/{id}https://api.clepit.com

Delete a custom role

Deletes the role and answers who lost it. A held role deletes with a warning rather than a veto; system roles marked not deletable are refused. Requires a fresh MFA-backed session.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe role id being deleted.

Responses

Role deleted

JSON
{
  "lostBy": [
    {
      "email": "string",
      "name?": "string | null",
      "userId": "string"
    }
  ]
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/roles/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/roles/{id}/holdershttps://api.clepit.com

List a role's holders

The members currently holding the role, for the delete warning and the Roles tab.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe role id whose holders are listed.

Responses

The holders

JSON
{
  "holders": [
    {
      "email": "string",
      "name?": "string | null",
      "userId": "string"
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/roles/:id/holders" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/scim-tokenshttps://api.clepit.com

List SCIM tokens

The tenant's live SCIM tokens, newest first, with when each last authenticated. A token's secret is never returned here.

Auth bearerAuth

Responses

The tenant's SCIM tokens

JSON
{
  "tokens": [
    {
      "id": "string",
      "displayName": "string",
      "createdAt": "string",
      "lastUsedAt?": "string | null"
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/scim-tokens" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/scim-tokenshttps://api.clepit.com

Create a SCIM token

Mints a token for the tenant's identity provider and returns its secret once. Held on Enterprise; other plans are refused with FEATURE_NOT_IN_PLAN. Requires a fresh MFA-backed session; forward the ID token in X-Id-Token.

Auth bearerAuth

Responses

The minted token and its secret

JSON
{
  "token": {
    "id": "string",
    "displayName": "string",
    "createdAt": "string",
    "lastUsedAt?": "string | null"
  },
  "secret": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/scim-tokens" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/scim-tokens/{id}https://api.clepit.com

Revoke a SCIM token

Stops the token authenticating, on any plan. Requires a fresh MFA-backed session; forward the ID token in X-Id-Token.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe SCIM token id being revoked.

Responses

Token revoked

JSON
{
  "ok": "boolean"
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/scim-tokens/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/settingshttps://api.clepit.com

Read the AI add-on settings

Whether the AI add-on is on for the organisation, the model it runs, when it was turned on, and its route: platform on clepit's account, own on the organisation's own AI account.

Auth bearerAuth

Responses

The AI add-on settings

JSON
{
  "enabled": "boolean",
  "model?": "string | null",
  "enabledAt?": "string | null",
  "route": "string"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/settings" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/modelshttps://api.clepit.com

List the AI models

The models the AI add-on offers, each with its price per million tokens, in micros.

Auth bearerAuth

Responses

The offered models

JSON
[
  {
    "id": "string",
    "displayName": "string",
    "perMillion": {
      "input": "integer",
      "output": "integer",
      "cacheWrite5M": "integer",
      "cacheWrite1H": "integer",
      "cacheRead": "integer"
    }
  }
]

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/models" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/limitshttps://api.clepit.com

List the AI spend limits

The company's AI spend limits, the company-wide one and one per member, each with what is used and left this month.

Auth bearerAuth

Responses

The AI spend limits

JSON
[
  {
    "id": "string",
    "memberId?": "string | null",
    "memberName?": "string | null",
    "unit": "string",
    "amount": "integer",
    "thresholds": [],
    "recipients": [
      {
        "kind": "string",
        "value": "string"
      }
    ],
    "used": "integer",
    "left": "integer"
  }
]

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/limits" \
  -H "Authorization: Bearer $BEARER_AUTH"
PUT/v1/tenants/me/ai/limitshttps://api.clepit.com

Set an AI spend limit

Sets the company's AI spend limit, or one member's with memberId, replacing the one it had. AI stops when the amount is reached. unit is tokens or money, a money amount in micros; thresholds are warning percentages from 1 to 99; each recipient is alerted and has kind member, role or email with its value.

Auth bearerAuth

Responses

The limit as written

JSON
{
  "id": "string",
  "memberId?": "string | null",
  "memberName?": "string | null",
  "unit": "string",
  "amount": "integer",
  "thresholds": [],
  "recipients": [
    {
      "kind": "string",
      "value": "string"
    }
  ],
  "used": "integer",
  "left": "integer"
}

Try it

curl -X PUT "https://api.clepit.com/v1/tenants/me/ai/limits" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/limit-suggestionhttps://api.clepit.com

Suggest a company AI limit

A suggested company limit in money, in micros: the plan's monthly seat price for every seat, or the nearest priced plan's.

Auth bearerAuth

Responses

The suggested limit

JSON
{
  "suggestion?": "integer | null"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/limit-suggestion" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/seat-feehttps://api.clepit.com

Read the own AI account's seat fee

The fee per seat a month for running AI on the organisation's own account: every seat on the plan counts, at the price of the band the seat count falls in. It answers the organisation's seat count, that band's price in cents, and the bands of the plan that offers an own account.

Auth bearerAuth

Responses

The seat fee

JSON
{
  "seats": "integer",
  "priceCents": "integer",
  "bands": [
    {
      "seatsUpTo?": "integer | null",
      "cents": "integer"
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/seat-fee" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/card-on-filehttps://api.clepit.com

Read whether a card is on file

Whether the company has a default card on file, which turning the AI add-on on requires.

Auth bearerAuth

Responses

Whether a default card is on file

JSON
{
  "cardOnFile": "boolean"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/card-on-file" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/membershttps://api.clepit.com

List the members for AI limits

The company's members with their ids, names and emails, and the caller's own id: the ids a member's limit and a member recipient take.

Auth bearerAuth

Responses

The members

JSON
{
  "me": "string",
  "members": [
    {
      "id": "string",
      "name?": "string | null",
      "email?": "string | null"
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/members" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/roleshttps://api.clepit.com

List the roles AI warnings can name

The organisation's roles a limit's warnings can name, each with how many people hold it; heldBy is null when the role holders could not be read. A role reaches everyone who holds it when a warning goes out.

Auth bearerAuth

Responses

The roles

JSON
[
  {
    "key": "string",
    "heldBy?": "integer | null"
  }
]

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/roles" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/usagehttps://api.clepit.com

Read the AI usage for a month

The company's AI use for one month: the total in tokens and in the money billed, in micros; a row for each member who spent and one for use with no member; totals by surface and by model. The current month also carries each limit with what is used and left, and each member's own limit. Refused with AI_MONTH for a month not written YYYY-MM.

Auth bearerAuth

Parameters

NameInTypeDescription
monthquerystringThe month to read, written YYYY-MM; this month when left out.

Responses

The month's AI usage

JSON
{
  "month": "string",
  "current": "boolean",
  "spend": {
    "tokens": "integer",
    "micros": "integer"
  },
  "limits": [
    {
      "id": "string",
      "memberId?": "string | null",
      "memberName?": "string | null",
      "unit": "string",
      "amount": "integer",
      "thresholds": [],
      "recipients": [
        {
          "kind": "string",
          "value": "string"
        }
      ],
      "used": "integer",
      "left": "integer"
    }
  ],
  "members": [
    {
      "memberId?": "string | null",
      "name?": "string | null",
      "email?": "string | null",
      "spend": {
        "tokens": "integer",
        "micros": "integer"
      },
      "limit?": {
        "id": "string",
        "memberId?": "string | null",
        "memberName?": "string | null",
        "unit": "string",
        "amount": "integer",
        "thresholds": [],
        "recipients": [
          {
            "kind": "string",
            "value": "string"
          }
        ],
        "used": "integer",
        "left": "integer"
      },
      "departed": "boolean"
    }
  ],
  "surfaces": [
    {
      "key": "string",
      "spend": {
        "tokens": "integer",
        "micros": "integer"
      }
    }
  ],
  "models": [
    {
      "key": "string",
      "spend": {
        "tokens": "integer",
        "micros": "integer"
      }
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/usage" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/seatshttps://api.clepit.com

Read a month's own-account seats

The seats a month carries on the organisation's own AI account: its highest seat count while it ran on that account, 0 for a month on clepit's account, and the price per seat of the band that count falls in, in cents. Refused with AI_MONTH for a month not written YYYY-MM.

Auth bearerAuth

Parameters

NameInTypeDescription
monthquerystringThe month to read, written YYYY-MM; this month when left out.

Responses

The month's seats

JSON
{
  "month": "string",
  "count": "integer",
  "priceCents": "integer"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/seats" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/usage/monthshttps://api.clepit.com

List the months with AI usage

The months the company used AI in, written YYYY-MM, newest first.

Auth bearerAuth

Responses

The months with AI usage

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/usage/months" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/usage/yearhttps://api.clepit.com

Read a year of AI spend by month

A year of the company's AI spend month by month, in tokens and in the money billed, in micros, with each month's seats on its own AI account (0 for a month on clepit's account) and the company's first year. Refused with AI_YEAR for a year before the first one or after this one.

Auth bearerAuth

Parameters

NameInTypeDescription
yearqueryintegerThe year to read, such as 2026; this year when left out.

Responses

The year's AI spend by month

JSON
{
  "year": "integer",
  "firstYear": "integer",
  "months": [
    {
      "month": "string",
      "spend": {
        "tokens": "integer",
        "micros": "integer"
      },
      "seats": "integer"
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/usage/year" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/ai/enablehttps://api.clepit.com

Turn the AI add-on on

Turns the AI add-on on with the model in the body. From then on the company's AI use is billed per token. Refused with MODEL_UNAVAILABLE for a model the models route does not list, and with PAYMENT_METHOD_REQUIRED when the company has no default card on file.

Auth bearerAuth

Responses

The AI add-on settings

JSON
{
  "enabled": "boolean",
  "model?": "string | null",
  "enabledAt?": "string | null",
  "route": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/ai/enable" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/ai/disablehttps://api.clepit.com

Turn the AI add-on off

Turns the AI add-on off, which stops AI for the company. Its model and limits are kept.

Auth bearerAuth

Responses

The AI add-on settings

JSON
{
  "enabled": "boolean",
  "model?": "string | null",
  "enabledAt?": "string | null",
  "route": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/ai/disable" \
  -H "Authorization: Bearer $BEARER_AUTH"
PUT/v1/tenants/me/ai/modelhttps://api.clepit.com

Change the AI model

Changes the model the AI add-on runs. Refused with MODEL_UNAVAILABLE for a model the models route does not list.

Auth bearerAuth

Responses

The AI add-on settings

JSON
{
  "enabled": "boolean",
  "model?": "string | null",
  "enabledAt?": "string | null",
  "route": "string"
}

Try it

curl -X PUT "https://api.clepit.com/v1/tenants/me/ai/model" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/ai/limits/{id}https://api.clepit.com

Remove an AI spend limit

Removes an AI spend limit, so the spend it covered is no longer capped or warned about.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe limit id being removed.

Responses

Whether a limit was removed

JSON
{
  "removed": "boolean"
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/ai/limits/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/accounthttps://api.clepit.com

Read the own AI account

The organisation's own AI account when it has connected one, on Enterprise: the provider, the key's last four characters, a Model Studio region and workspace where there is one, and who connected it when. Null when AI runs on clepit's account. The key itself is never returned.

Auth bearerAuth

Responses

The own AI account, or null

JSON
{
  "provider": "string",
  "hint": "string",
  "region?": "string | null",
  "workspace?": "string | null",
  "connectedAt": "string",
  "connectedBy": "string",
  "connectedByName?": "string | null"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/account" \
  -H "Authorization: Bearer $BEARER_AUTH"
PUT/v1/tenants/me/ai/accounthttps://api.clepit.com

Connect the own AI account

Connects the organisation's own AI account, or replaces its key, and runs AI on it with the model in the body after one short request confirms the model. enable also turns AI on. Enterprise only; refused with PAYMENT_METHOD_REQUIRED without a default card on file, MODEL_UNAVAILABLE for a model the account does not answer, and with the provider's refusals. Nothing is kept when a check fails.

Auth bearerAuth

Responses

The AI add-on settings

JSON
{
  "enabled": "boolean",
  "model?": "string | null",
  "enabledAt?": "string | null",
  "route": "string"
}

Try it

curl -X PUT "https://api.clepit.com/v1/tenants/me/ai/account" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/ai/accounthttps://api.clepit.com

Remove the own AI account

Removes the organisation's own AI account and its key, and turns AI off; turning it back on runs on clepit's account.

Auth bearerAuth

Responses

The AI add-on settings

JSON
{
  "enabled": "boolean",
  "model?": "string | null",
  "enabledAt?": "string | null",
  "route": "string"
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/ai/account" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/ai/account/modelshttps://api.clepit.com

List the own AI account's models

The models the organisation's own AI account lists that answer text, by id and name. Empty for a provider with no model list, whose model is typed by name. Refused with AI_ACCOUNT_NOT_CONNECTED when no account is connected.

Auth bearerAuth

Responses

The account's models

JSON
[
  {
    "id": "string",
    "name": "string"
  }
]

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/ai/account/models" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/ai/account/checkhttps://api.clepit.com

Check an AI account's key

Lists the models an AI account offers with the key in the body, and keeps nothing. Enterprise only: refused with FEATURE_NOT_IN_PLAN on any other plan, and with PROVIDER_KEY_REJECTED, PROVIDER_LIMIT_REACHED or PROVIDER_UNAVAILABLE when the provider refuses.

Auth bearerAuth

Responses

The account's models

JSON
[
  {
    "id": "string",
    "name": "string"
  }
]

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/ai/account/check" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/onboardinghttps://api.clepit.com

Read whether the caller needs onboarding

Answers needed when the caller belongs to no clepit organisation, with the organisations they own elsewhere that have no clepit members yet. owned is null when the login could not be asked.

Auth bearerAuth

Responses

Whether onboarding is needed

JSON
{
  "needed": "boolean",
  "owned?": [
    {
      "orgId": "string",
      "name": "string"
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/onboarding" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/onboarding/organisationhttps://api.clepit.com

Create an organisation and its first workspace

Creates an organisation named in the body through the login, seats the caller as its owner, creates the first workspace and makes the organisation the caller's active one. Refused with ORGANISATION_NAME_REQUIRED or WORKSPACE_NAME_REQUIRED for a blank name.

Auth bearerAuth

Responses

The organisation

JSON
{
  "orgId": "string",
  "workspaceCreated": "boolean",
  "switched": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/onboarding/organisation" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/onboarding/adopthttps://api.clepit.com

Use an organisation the caller owns

Brings an organisation the caller owns in another product into clepit, seats the caller as its owner alone, creates the first workspace and makes it the active organisation. Refused with NOT_AN_OWNED_ORG and ORG_ALREADY_HAS_AN_ORGANISATION.

Auth bearerAuth

Responses

The organisation

JSON
{
  "orgId": "string",
  "workspaceCreated": "boolean",
  "switched": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/onboarding/adopt" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/session/organisationshttps://api.clepit.com

List the caller's organisations

Every clepit organisation the caller belongs to, ordered by name, with their role in each when it can be read, and the one the sign-in is open in. Answers for a sign-in that names an organisation clepit does not know.

Auth bearerAuth

Responses

The caller's organisations

JSON
{
  "organisations": [
    {
      "tenantId": "string",
      "orgId": "string",
      "name": "string",
      "role?": "string | null"
    }
  ],
  "activeTenantId?": "string | null"
}

Try it

curl -X GET "https://api.clepit.com/v1/session/organisations" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/session/organisationhttps://api.clepit.com

Open one of the caller's organisations

Asks the login to make the named organisation the sign-in's active one; the client refreshes its session and reloads. Refused with NOT_YOUR_ORGANISATION for an organisation the caller does not belong to.

Auth bearerAuth

Responses

The organisation the sign-in now opens

JSON
{
  "tenantId": "string",
  "orgId": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/session/organisation" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/invitations/previewhttps://api.clepit.com

Read an invitation

Names the organisation, the person who sent the invitation and the role it gives, for the person it was sent to. Refused with INVITATION_NOT_FOUND, INVITATION_EXPIRED, INVITATION_REVOKED, INVITATION_ALREADY_ACCEPTED, INVITATION_NOT_FOR_YOU (naming nothing), EMAIL_DOMAIN_NOT_ALLOWED, TENANT_NOT_PROVISIONED and INVITER_CANNOT_GRANT_ROLE.

Auth bearerAuth

Responses

The invitation

JSON
{
  "organisation": "string",
  "inviter": "string",
  "role": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/invitations/preview" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/invitations/accepthttps://api.clepit.com

Join the organisation an invitation names

Accepts the invitation for the person it was sent to, then asks the login to make its organisation the sign-in's active one. A person who already belongs is answered with the organisation. Refused with the preview's codes.

Auth bearerAuth

Responses

The organisation joined

JSON
{
  "orgId": "string",
  "switched": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/invitations/accept" \
  -H "Authorization: Bearer $BEARER_AUTH"

billing

GET/v1/tenants/me/billinghttps://api.clepit.com

Read the tenant's billing state

Tier, status, cycle and the derived state the UI gates on.

Auth bearerAuth

Responses

The tenant's billing state

JSON
{
  "tier": "free | pro | business | enterprise",
  "billingStatus": "none | active | past_due | canceled",
  "billingCycle?": "BillingCycle | null",
  "seatCount": "integer",
  "currentPeriodEnd?": "string | null",
  "cancelAtPeriodEnd": "boolean",
  "overQuotaGraceUntil?": "string | null",
  "hasPaymentMethod": "boolean",
  "derivedState": "no_sub | active | past_due | cancel_scheduled | downgraded_grace | downgraded_locked"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/billing" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/billing/standinghttps://api.clepit.com

Read the tenant's billing standing

Whether the company's bill is paid: good, past_due with the time its team will be suspended, suspended with the time its published pages stop too, or halted once they have. Each carries when the payment failed. Open to every member, and answered while the company is suspended or halted.

Auth bearerAuth

Responses

The tenant's billing standing

JSON
{
  "status": "string",
  "suspendsAt?": "string | null",
  "haltsAt?": "string | null",
  "failedAt?": "string | null"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/billing/standing" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/billing/checkout/previewhttps://api.clepit.com

Preview a checkout

Prices a tier and cycle before starting checkout. Takes tier and cycle as query parameters.

Auth bearerAuth

Responses

The priced checkout

JSON
{
  "tier": "free | pro | business | enterprise",
  "cycle": "monthly | annual",
  "unitAmount": "integer",
  "currency": "string",
  "seatCount": "integer",
  "total": "integer",
  "priceId": "string"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/billing/checkout/preview" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/billing/checkouthttps://api.clepit.com

Start a checkout

Creates a checkout session and returns where to send the customer.

Auth bearerAuth

Responses

The started checkout

JSON
{
  "hostedUrl": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/billing/checkout" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/billing/invoiceshttps://api.clepit.com

List invoices

Cursor-paginated; pass the previous page's cursor as a query parameter.

Auth bearerAuth

Responses

A page of invoices

JSON
{
  "data": [
    {
      "id": "string",
      "number?": "string | null",
      "status?": "string | null",
      "amountDue": "integer",
      "amountPaid": "integer",
      "currency": "string",
      "hostedInvoiceUrl?": "string | null",
      "invoicePdf?": "string | null",
      "periodStart": "string",
      "periodEnd": "string",
      "created": "string"
    }
  ],
  "hasMore": "boolean"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/billing/invoices" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/billing/invoices/{id}https://api.clepit.com

Retrieve one invoice

Returns a single invoice belonging to the caller's tenant.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe invoice id.

Responses

The invoice

JSON
{
  "id": "string",
  "number?": "string | null",
  "status?": "string | null",
  "amountDue": "integer",
  "amountPaid": "integer",
  "currency": "string",
  "hostedInvoiceUrl?": "string | null",
  "invoicePdf?": "string | null",
  "periodStart": "string",
  "periodEnd": "string",
  "created": "string"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/billing/invoices/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/billing/payment-methodshttps://api.clepit.com

List payment methods

Every payment method on file for the caller's tenant.

Auth bearerAuth

Responses

The tenant's payment methods

JSON
[
  {
    "id": "string",
    "brand": "string",
    "last4": "string",
    "expMonth": "integer",
    "expYear": "integer",
    "isDefault": "boolean"
  }
]

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/billing/payment-methods" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/tenants/me/billing/plan-change/previewhttps://api.clepit.com

Preview a plan change

Returns the proration for moving to a different tier or cycle, before committing.

Auth bearerAuth

Responses

The proration preview

JSON
{
  "amountDueNow": "integer",
  "amountDueNextCycle": "integer",
  "currency": "string"
}

Try it

curl -X GET "https://api.clepit.com/v1/tenants/me/billing/plan-change/preview" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/billing/plan-changehttps://api.clepit.com

Change the plan

Moves the tenant to a different tier or cycle.

Auth bearerAuth

Responses

The plan was changed

JSON
{
  "ok": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/billing/plan-change" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/billing/cancelhttps://api.clepit.com

Cancel the subscription

Schedules cancellation at the end of the current period.

Auth bearerAuth

Responses

The cancellation was scheduled

JSON
{
  "ok": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/billing/cancel" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/billing/resumehttps://api.clepit.com

Resume a cancelling subscription

Clears a scheduled cancellation.

Auth bearerAuth

Responses

The subscription was resumed

JSON
{
  "ok": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/billing/resume" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/billing/payment-methods/setup-intenthttps://api.clepit.com

Start adding a payment method

Creates the setup intent the client confirms to attach a new payment method.

Auth bearerAuth

Responses

The setup intent

JSON
{
  "clientSecret": "string"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/billing/payment-methods/setup-intent" \
  -H "Authorization: Bearer $BEARER_AUTH"
POST/v1/tenants/me/billing/payment-methods/{id}/defaulthttps://api.clepit.com

Make a payment method the default

Future charges use this payment method.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe payment method id to make default.

Responses

The default was set

JSON
{
  "ok": "boolean"
}

Try it

curl -X POST "https://api.clepit.com/v1/tenants/me/billing/payment-methods/:id/default" \
  -H "Authorization: Bearer $BEARER_AUTH"
DELETE/v1/tenants/me/billing/payment-methods/{id}https://api.clepit.com

Detach a payment method

Removes a payment method from the tenant.

Auth bearerAuth

Parameters

NameInTypeDescription
id requiredpathstringThe payment method id to detach.

Responses

The payment method was detached

JSON
{
  "ok": "boolean"
}

Try it

curl -X DELETE "https://api.clepit.com/v1/tenants/me/billing/payment-methods/:id" \
  -H "Authorization: Bearer $BEARER_AUTH"
GET/v1/planshttps://api.clepit.com

List the plan catalogue

Every clepit plan with its entitlements and prices: the ladder the pricing page and the consoles render. Public, and cacheable for five minutes.

Auth public

Responses

The plan catalogue

JSON
{
  "plans": [
    {
      "tier": "string",
      "cycle": "string",
      "trialDays": "integer",
      "priced": "boolean",
      "entitlements": "unknown"
    }
  ]
}

Try it

curl -X GET "https://api.clepit.com/v1/plans"