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.comThis 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.
- Create a connection and choose only the capabilities your tool needs
- Save the one-time API key on your server; it cannot be retrieved later
- Find an enabled operation and request example in the Agent API reference below
- 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/tokenContent-Type: application/x-www-form-urlencodedgrant_type=client_credentials
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET
scope=payment:read workspaces:readResponse
{
"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.
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.
/api/v1/payment/workspaces/{workspaceId}/productsList workspace products (owner + promoted)
Parameters
workspaceIdWorkspace ID
relationshipall | 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);/api/v1/payment/workspaces/{workspaceId}/products/capabilitiesWorkspace product capabilities (seller vs promoter)
Parameters
workspaceIdWorkspace 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);/api/v1/payment/workspaces/{workspaceId}/catalog/productsList catalog products (seller)
Parameters
workspaceIdWorkspace 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);/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}Get catalog product by ID
Parameters
workspaceIdWorkspace ID
productIdProduct 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);/api/v1/payment/workspaces/{workspaceId}/catalog/productsCreate catalog product (requires payment:write scope)
Parameters
workspaceIdWorkspace 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);/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}Update catalog product
Parameters
workspaceIdWorkspace ID
productIdProduct 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);/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/submit-for-reviewSubmit the current product version for moderation; this never publishes directly
Parameters
workspaceIdWorkspace ID
productIdProduct 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);/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/hideHide a live product while preserving its current moderation approval
Parameters
workspaceIdWorkspace ID
productIdProduct 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);/api/v1/payment/workspaces/{workspaceId}/catalog/products/{productId}/unhideMake a seller-hidden product live only when its exact current version is approved
Parameters
workspaceIdWorkspace ID
productIdProduct 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);/api/v1/payment/workspaces/{workspaceId}/payment-linksList payment links
Parameters
workspaceIdWorkspace 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);/api/v1/payment/workspaces/{workspaceId}/payment-links/{paymentLinkId}Get payment link by ID
Parameters
workspaceIdWorkspace ID
paymentLinkIdPayment 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);/api/v1/payment/workspaces/{workspaceId}/payment-links/{paymentLinkId}/affiliate-linkCreate affiliate (child) payment link
Parameters
workspaceIdWorkspace ID
paymentLinkIdCanonical 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);/api/v1/payment/catalog/public/productsList public store products (marketplace)
Parameters
searchSearch query
sortnewest | commission | price_asc | price_desc | popular
kinddigital | physical | service
affiliateOnlyOnly affiliate-enabled listings
pagePage number
pageSizePage 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);/api/v1/payment/catalog/public/marketplace/statsPublic marketplace stats (product counts, purchases)
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);/api/v1/payment/catalog/public/marketplace/activityAnonymized recent marketplace activity feed
Parameters
limitMax 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);/api/v1/payment/catalog/public/marketplace/top-promotersAnonymized affiliate earnings leaderboard
Parameters
limitMax promoters (1-25)
period7d | 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);/api/v1/payment/catalog/public/products/{slug}Get public store product details by slug
Parameters
slugProduct 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);/api/v1/payment/catalog/public/memberships/{slug}Get public membership listing by slug
Parameters
slugMembership 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);/api/v1/payment/catalog/public/licenses/{slug}Get public license listing by slug
Parameters
slugLicense 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);/api/v1/payment/workspaces/{workspaceId}/analytics/promote/pulsePromoter analytics pulse
Parameters
workspaceIdWorkspace ID
period7d | 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);/api/v1/payment/me/libraryBuyer library — purchased products (account-scoped, not workspace)
Parameters
statusall | ready | in_progress
pagePage number
pageSizePage 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);/api/v1/payment/me/orders/{intentId}Buyer order detail with timeline (entitlement owner only)
Parameters
intentIdPayment 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);/api/v1/payment/me/orders/{intentId}/download-urlIssue short-lived signed download URL for an active entitlement
Parameters
intentIdPayment 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.
/api/v1/workspace/workspacesList workspaces
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);/api/v1/workspace/workspaces/{workspaceId}Get workspace by ID
Parameters
workspaceIdThe 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);/api/v1/workspace/workspacesCreate workspace
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);/api/v1/workspace/workspaces/{workspaceId}Update workspace
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}Delete workspace
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/preferences/appearanceGet appearance preferences
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/preferences/appearanceUpdate appearance preferences
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/preferences/teamList team members
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/preferences/teamUpdate team preferences
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/membersInvite member
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}Update member role & grants
Parameters
workspaceIdThe workspace ID
memberIdMember 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);/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}/statusUpdate member status
Parameters
workspaceIdThe workspace ID
memberIdMember 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);/api/v1/workspace/workspaces/{workspaceId}/members/{memberId}Remove member
Parameters
workspaceIdThe workspace ID
memberIdMember 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);/api/v1/workspace/workspaces/{workspaceId}/preferences/notification-settingsGet notification settings
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/preferences/notification-settingsUpdate notification settings
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/permissionsList permission catalog
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);/api/v1/workspace/workspaces/{workspaceId}/permissionsGet role permissions for workspace
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/permissionsUpdate role permissions for workspace
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/logoUpload workspace logo
Parameters
workspaceIdThe 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);/api/v1/workspace/workspaces/{workspaceId}/logoDelete workspace logo
Parameters
workspaceIdThe 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);/api/v1/workspace/invitations/validateValidate invitation token (public)
Parameters
tokenInvitation 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);/api/v1/workspace/invitations/acceptAccept invitation (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);/api/v1/workspace/invitations/declineDecline invitation (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);/api/v1/workspace/invitations/workspaces/{workspaceId}/members/{memberId}/resendResend invitation
Parameters
workspaceIdThe workspace ID
memberIdMember 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);