Getting Started

Create a scoped API key in Connections to call the supported Agent API. The generated reference below lists the active operations. Legacy OAuth2 examples apply only to clients that are already provisioned.

External Gateway origin

https://api.billixi.com

This is the public Gateway origin in the production Nginx configuration. Set BILLIXI_API_BASE_URL to your own public Gateway origin when self-hosting. The site's /api/gateway path is a browser BFF route, not the external Agent API base URL.

Authentication

Connection keys authorize only the operations in the generated Agent API contract, with your current account and workspace permissions still enforced. Public catalog operations need no key. Existing OAuth2 clients use the separate legacy examples below.

  1. Create a connection and choose only the capabilities your tool needs
  2. Save the one-time API key on your server; it cannot be retrieved later
  3. Find an enabled operation and request example in the Agent API reference below
  4. Send the key as Authorization: Bearer <API_KEY> to the public Gateway

Webhooks

Receive signed HTTPS events when sales complete, fail, or are refunded.

Configure personal endpoints in Connections → Webhooks.

Security notes (quick)

Treat API keys and webhook signing secrets like passwords: store them on your server, never ship them to browsers, rotate if exposed, and grant only needed capabilities.

Error Handling

Use the downloadable Agent OpenAPI schema for each operation's responses. Invalid keys return 401, missing grants return 403, quota limits return 429, and dependency failures can return 503. Legacy Payment and Workspace APIs may use this `ApiResponse` envelope:

{
  "success": false,
  "data": null,
  "errors": [
    { "message": "Human-readable error message", "code": "OptionalCode" }
  ],
  "meta": null
}

Agent API reference

The public contract lists the operations enabled for an opaque connection key. Anonymous catalog endpoints are marked Public. Connection and webhook management require a human session.

Loading API reference…

API keys and permissions

Agent connections

Create a named, expiring connection in Account settings → Connections. The opaque API key is shown once. Grant only the capabilities needed, store the key server side, and rotate or revoke it from the same page. Current user and workspace permissions still apply.

BILLIXI_API_BASE_URL=https://api.billixi.com
BILLIXI_API_KEY=bxk_…
Authorization: Bearer <BILLIXI_API_KEY>

Agent keys cannot manage connections or webhook destinations. Checkout and other money flows can return a human continuation; an API response is not an approval or completed payment. See the generated contract and request examples below.

Legacy integrations reference

The OAuth2, Payment and Workspace sections below are retained for already-provisioned clients. New Agent API integrations should use named connections and the generated operation contract above.

OAuth2 Overview

This legacy guide is for already-provisioned OAuth2 clients. It does not provide a self-service client creation path. Request only the scopes assigned to that client, such as payment:read or workspaces:read.

Getting Access Token

If you already have a provisioned OAuth2 client, POST its credentials to the token endpoint to request an access token.

Request

POST https://auth.billixi.com/oauth2/token
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET
scope=payment:read workspaces:read

Response

{
  "access_token": "eyJhbGc...",
  "token_type": "Bearer",
  "expires_in": 3600
}

Code Examples

// Get OAuth2 token using Client Credentials flow
const response = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read workspaces:read'
  })
});

const { access_token } = await response.json();

// Use access_token in Authorization header: Bearer {access_token}

Token Refresh

Use the token response's expires_in value. When the token expires, request another with the same provisioned client credentials; this flow has no separate refresh token.

Workflows

Use the connection context for workspace identity, then grant only the capabilities a workflow needs. Mutations that create or change resources need endpoint-specific idempotency and revision checks; human approval remains required where the contract says so.

  • Support: create a ticket with an idempotency key, replay an uncertain request with the same key and body, then use the returned revision for a reply.
  • Seller draft: create and update with the returned revision; upload through the supported chunk flow and submit for review. Submission does not mean publication.
  • Buyer access: read owned orders and entitlements; request delivery only for an active entitlement. Checkout responses can require a human continuation.

Webhook receiver workflow

Errors and rate limits

The operation reference shows response codes and descriptions from the generated contract. Common outcomes include 401 invalid/expired/revoked key, 403 missing capability/current permission, 404 hidden ownership, 409 conflict, 412 stale revision, 428 missing precondition, 429 rate limit, and 503 unavailable owner/dependency.

Honor Retry-After when returned. Connection quota is shared across services and endpoint limits may be stricter. A tester timeout does not cancel a request already accepted by the Gateway.

Idempotency and concurrency

A network timeout leaves the outcome unknown. Retry only documented idempotent operations with the same key and byte-equivalent request. Use If-Match with the latest ETag for revision-protected writes; a 412 requires reading current state. Do not repeat financial or provider effects just because a response was lost.

Payment API (legacy catalog)

Legacy reference for existing OAuth2 clients and public catalog calls. Availability depends on the deployed public Gateway and assigned scopes. Connection-key operations are listed only in the generated Agent API reference above.

GET
/api/v1/payment/workspaces/{workspaceId}/products

List workspace products (owner + promoted)

OAuth2payment:read

Parameters

workspaceId
Required
uuid

Workspace ID

relationship
string

all | owner | promoted

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/products', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/workspaces/{workspaceId}/products/capabilities

Workspace product capabilities (seller vs promoter)

OAuth2payment:read

Parameters

workspaceId
Required
uuid

Workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/products/capabilities', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/workspaces/{workspaceId}/catalog/products

List catalog products (seller)

OAuth2payment:read

Parameters

workspaceId
Required
uuid

Workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/catalog/products', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}

Get catalog product by ID

OAuth2payment:read

Parameters

workspaceId
Required
uuid

Workspace ID

productId
Required
uuid

Product ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
POST
/api/v1/payment/workspaces/{workspaceId}/catalog/products

Create catalog product (requires payment:write scope)

OAuth2payment:write

Parameters

workspaceId
Required
uuid

Workspace ID

Request Body

{
  "name": "Digital course",
  "shortDescription": "Short summary for the store",
  "fullDescription": "Full product description",
  "digitalSubtype": 2,
  "basePrice": 29.99,
  "network": 1,
  "affiliateFeePercentage": 20,
  "affiliateEnabled": true,
  "publishToStore": false,
  "ownerWallet": "0x0000000000000000000000000000000000000001"
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/catalog/products', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "Digital course",
    "shortDescription": "Short summary for the store",
    "fullDescription": "Full product description",
    "digitalSubtype": 2,
    "basePrice": 29.99,
    "network": 1,
    "affiliateFeePercentage": 20,
    "affiliateEnabled": true,
    "publishToStore": false,
    "ownerWallet": "0x0000000000000000000000000000000000000001"
}),
});

const data = await response.json();
console.log(data);
PUT
/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}

Update catalog product

OAuth2payment:write

Parameters

workspaceId
Required
uuid

Workspace ID

productId
Required
uuid

Product ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
POST
/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/submit-for-review

Submit the current product version for moderation; this never publishes directly

OAuth2payment:write

Parameters

workspaceId
Required
uuid

Workspace ID

productId
Required
uuid

Product ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/submit-for-review', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
POST
/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/hide

Hide a live product while preserving its current moderation approval

OAuth2payment:write

Parameters

workspaceId
Required
uuid

Workspace ID

productId
Required
uuid

Product ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/hide', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
POST
/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/unhide

Make a seller-hidden product live only when its exact current version is approved

OAuth2payment:write

Parameters

workspaceId
Required
uuid

Workspace ID

productId
Required
uuid

Product ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/unhide', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/workspaces/{workspaceId}/payment-links

List payment links

OAuth2payment:read

Parameters

workspaceId
Required
uuid

Workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/payment-links', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/workspaces/{workspaceId}/payment-links/{paymentLinkId}

Get payment link by ID

OAuth2payment:read

Parameters

workspaceId
Required
uuid

Workspace ID

paymentLinkId
Required
uuid

Payment link ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/payment-links/{paymentLinkId}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
POST
/api/v1/payment/workspaces/{workspaceId}/payment-links/{paymentLinkId}/affiliate-link

Create affiliate (child) payment link

OAuth2payment:write

Parameters

workspaceId
Required
uuid

Workspace ID

paymentLinkId
Required
uuid

Canonical payment link ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/payment-links/{paymentLinkId}/affiliate-link', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/catalog/public/products

List public store products (marketplace)

Public

Parameters

search
string

Search query

sort
string

newest | commission | price_asc | price_desc | popular

kind
string

digital | physical | service

affiliateOnly
boolean

Only affiliate-enabled listings

page
number

Page number

pageSize
number

Page size (max 100)

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/catalog/public/products', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/catalog/public/marketplace/stats

Public marketplace stats (product counts, purchases)

Public

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/catalog/public/marketplace/stats', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/catalog/public/marketplace/activity

Anonymized recent marketplace activity feed

Public

Parameters

limit
number

Max items (1-50)

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/catalog/public/marketplace/activity', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/catalog/public/marketplace/top-promoters

Anonymized affiliate earnings leaderboard

Public

Parameters

limit
number

Max promoters (1-25)

period
string

7d | 30d | 90d

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/catalog/public/marketplace/top-promoters', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/catalog/public/products/{slug}

Get public store product details by slug

Public

Parameters

slug
Required
string

Product slug

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/catalog/public/products/{slug}', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/catalog/public/memberships/{slug}

Get public membership listing by slug

Public

Parameters

slug
Required
string

Membership slug

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/catalog/public/memberships/{slug}', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/catalog/public/licenses/{slug}

Get public license listing by slug

Public

Parameters

slug
Required
string

License slug

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/catalog/public/licenses/{slug}', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/workspaces/{workspaceId}/analytics/promote/pulse

Promoter analytics pulse

OAuth2payment:read

Parameters

workspaceId
Required
uuid

Workspace ID

period
string

7d | 30d | 90d

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'payment:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/workspaces/{workspaceId}/analytics/promote/pulse', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/me/library

Buyer library — purchased products (account-scoped, not workspace)

OAuth2

Parameters

status
string

all | ready | in_progress

page
integer

Page number

pageSize
integer

Page size

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/me/library', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/payment/me/orders/{intentId}

Buyer order detail with timeline (entitlement owner only)

OAuth2

Parameters

intentId
Required
uuid

Payment intent ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/me/orders/{intentId}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
POST
/api/v1/payment/me/orders/{intentId}/download-url

Issue short-lived signed download URL for an active entitlement

OAuth2

Parameters

intentId
Required
uuid

Payment intent ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/payment/me/orders/{intentId}/download-url', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);

Workspace API (legacy catalog)

Legacy reference for existing OAuth2 clients. Availability depends on the deployed public Gateway and assigned scopes. Use Connections for personal webhooks and scoped API keys.

GET
/api/v1/workspace/workspaces

List workspaces

OAuth2workspaces:read

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/workspace/workspaces/{workspaceId}

Get workspace by ID

OAuth2workspaces:read

Parameters

workspaceId
Required
uuid

The workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
POST
/api/v1/workspace/workspaces

Create workspace

OAuth2

Request Body

{
  "name": "My New Workspace",
  "slug": "my-new-workspace",
  "description": "Workspace description",
  "ownerDisplayName": "John Doe",
  "ownerEmail": "john@example.com"
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "My New Workspace",
    "slug": "my-new-workspace",
    "description": "Workspace description",
    "ownerDisplayName": "John Doe",
    "ownerEmail": "john@example.com"
}),
});

const data = await response.json();
console.log(data);
PUT
/api/v1/workspace/workspaces/{workspaceId}

Update workspace

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

Request Body

{
  "name": "Updated Workspace Name",
  "slug": "updated-slug",
  "description": "Updated description"
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "Updated Workspace Name",
    "slug": "updated-slug",
    "description": "Updated description"
}),
});

const data = await response.json();
console.log(data);
DELETE
/api/v1/workspace/workspaces/{workspaceId}

Delete workspace

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID to delete

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/workspace/workspaces/{workspaceId}/preferences/appearance

Get appearance preferences

OAuth2workspaces:read

Parameters

workspaceId
Required
uuid

The workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/preferences/appearance', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
PUT
/api/v1/workspace/workspaces/{workspaceId}/preferences/appearance

Update appearance preferences

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

Request Body

{
  "primaryColor": "green",
  "accentColor": "teal",
  "fontFamily": "inter",
  "theme": "light",
  "borderRadius": "md",
  "animationSpeed": "normal",
  "logoUrl": "",
  "faviconUrl": ""
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/preferences/appearance', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "primaryColor": "green",
    "accentColor": "teal",
    "fontFamily": "inter",
    "theme": "light",
    "borderRadius": "md",
    "animationSpeed": "normal",
    "logoUrl": "",
    "faviconUrl": ""
}),
});

const data = await response.json();
console.log(data);
GET
/api/v1/workspace/workspaces/{workspaceId}/preferences/team

List team members

OAuth2workspaces:read

Parameters

workspaceId
Required
uuid

The workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/preferences/team', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
PUT
/api/v1/workspace/workspaces/{workspaceId}/preferences/team

Update team preferences

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

Request Body

{
  "allowInvites": true,
  "requireTwoFactor": false,
  "allowedDomains": [
    "example.com"
  ]
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/preferences/team', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "allowInvites": true,
    "requireTwoFactor": false,
    "allowedDomains": [
        "example.com"
    ]
}),
});

const data = await response.json();
console.log(data);
POST
/api/v1/workspace/workspaces/{workspaceId}/members

Invite member

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

Request Body

{
  "email": "user@example.com",
  "displayName": "Jane Doe",
  "avatarUrl": null,
  "role": "member"
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/members', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "email": "user@example.com",
    "displayName": "Jane Doe",
    "avatarUrl": null,
    "role": "member"
}),
});

const data = await response.json();
console.log(data);
PUT
/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}

Update member role & grants

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

memberId
Required
uuid

Member ID

Request Body

{
  "role": "admin",
  "moduleRoles": [],
  "customGrants": []
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "role": "admin",
    "moduleRoles": [],
    "customGrants": []
}),
});

const data = await response.json();
console.log(data);
PUT
/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}/status

Update member status

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

memberId
Required
uuid

Member ID

Request Body

{
  "status": "active"
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}/status', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "status": "active"
}),
});

const data = await response.json();
console.log(data);
DELETE
/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}

Remove member

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

memberId
Required
uuid

Member ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/workspace/workspaces/{workspaceId}/preferences/notification-settings

Get notification settings

OAuth2workspaces:read

Parameters

workspaceId
Required
uuid

The workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/preferences/notification-settings', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
PUT
/api/v1/workspace/workspaces/{workspaceId}/preferences/notification-settings

Update notification settings

OAuth2workspaces:write

Parameters

workspaceId
Required
uuid

The workspace ID

Request Body

{
  "email": {
    "enabled": true
  }
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/preferences/notification-settings', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "email": {
        "enabled": true
    }
}),
});

const data = await response.json();
console.log(data);
GET
/api/v1/workspace/workspaces/permissions

List permission catalog

OAuth2permissions:read

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'permissions:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/permissions', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/workspace/workspaces/{workspaceId}/permissions

Get role permissions for workspace

OAuth2permissions:read

Parameters

workspaceId
Required
uuid

The workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'permissions:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/permissions', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
PUT
/api/v1/workspace/workspaces/{workspaceId}/permissions

Update role permissions for workspace

OAuth2permissions:write

Parameters

workspaceId
Required
uuid

The workspace ID

Request Body

{
  "mappings": [
    {
      "role": 2,
      "permission": 9,
      "allowed": true
    }
  ]
}

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'permissions:write'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/permissions', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "mappings": [
        {
            "role": 2,
            "permission": 9,
            "allowed": true
        }
    ]
}),
});

const data = await response.json();
console.log(data);
POST
/api/v1/workspace/workspaces/{workspaceId}/logo

Upload workspace logo

OAuth2

Parameters

workspaceId
Required
uuid

The workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/logo', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
DELETE
/api/v1/workspace/workspaces/{workspaceId}/logo

Delete workspace logo

OAuth2

Parameters

workspaceId
Required
uuid

The workspace ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/workspaces/{workspaceId}/logo', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer ${access_token}',
  },
});

const data = await response.json();
console.log(data);
GET
/api/v1/workspace/invitations/validate

Validate invitation token (public)

Public

Parameters

token
Required
string

Invitation token

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/invitations/validate', {
  method: 'GET',
});

const data = await response.json();
console.log(data);
POST
/api/v1/workspace/invitations/accept

Accept invitation (public)

Public

Request Body

{
  "token": "invitation_token"
}

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/invitations/accept', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "token": "invitation_token"
}),
});

const data = await response.json();
console.log(data);
POST
/api/v1/workspace/invitations/decline

Decline invitation (public)

Public

Request Body

{
  "token": "invitation_token"
}

Code example

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/invitations/decline', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "token": "invitation_token"
}),
});

const data = await response.json();
console.log(data);
POST
/api/v1/workspace/invitations/workspaces/{workspaceId}/members/{memberId}/resend

Resend invitation

OAuth2

Parameters

workspaceId
Required
uuid

The workspace ID

memberId
Required
uuid

Member ID

Code example

// Get OAuth2 token
const tokenResponse = await fetch('https://auth.billixi.com/oauth2/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
  body: new URLSearchParams({
    grant_type: 'client_credentials',
    client_id: 'YOUR_CLIENT_ID',
    client_secret: 'YOUR_CLIENT_SECRET',
    scope: 'workspaces:read'
  })
});
const { access_token } = await tokenResponse.json();

// Make API request
const response = await fetch('https://api.billixi.com/api/v1/workspace/invitations/workspaces/{workspaceId}/members/{memberId}/resend', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ${access_token}',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);