Skip to main content

Overview

Workspaces let you tag every API request with a sub-account identifier, so you can track and rebill usage per client, department, or entity. This is especially useful for resellers, multi-entity organizations, and platforms that need granular cost attribution. Each workspace has a legal name tied to it, perfect for invoicing and compliance.

Per-Client Billing

Track exactly how many credits each of your clients consumes

Legal Entity Mapping

Associate each workspace with a legal name for invoicing

Usage Reporting API

Pull usage reports programmatically to automate rebilling

How It Works

1

Create workspaces for each client

Use POST /v2/workspaces to create a workspace with a name and legal entity name.
2

Tag requests with the x-topograph-workspace-id header

Pass x-topograph-workspace-id: workspace-name on every API call. If omitted, requests go to the default workspace.
3

Pull usage reports

Call GET /v2/workspaces/usage to get a per-workspace breakdown of credits consumed, filterable by date range.
4

Rebill your clients

Use the usage report to generate invoices for each client based on their actual consumption.

Managing Workspaces

Every account starts with a default workspace. You can create additional workspaces, one per client, department, or legal entity.

Create a Workspace

Response
Workspace names must be alphanumeric with hyphens and underscores only (max 64 characters). The name default is reserved. Use the workspace name in request headers and workspace URLs; the UUID id is returned for reference.

List Workspaces

Update a Workspace

Update the legal name associated with a workspace:

Delete a Workspace

You cannot delete the default workspace, or any workspace that has existing requests associated with it.

Tagging Requests

Add the x-topograph-workspace-id header to any data retrieval or onboarding request:
If the x-topograph-workspace-id header is omitted, the request is automatically tagged to the default workspace. If the workspace name doesn’t exist, the API returns a 400 Bad Request.
The workspace tag is propagated to all billing events generated by the request, so every credit consumed is attributed to the correct workspace.

Workspace in API Responses

The workspace is returned in every API response inside the request object:

Workspace in Webhooks

When you receive a webhook notification for a completed request, the workspace is included in the payload:
You can use the workspace info in webhook payloads to automatically route results to the correct client or trigger per-client processing pipelines.

Usage Reporting

The usage report endpoint gives you a per-workspace breakdown of all credits consumed, exactly what you need to rebill your clients.

Get Full Report

Response

Filter by Date Range

Filter by Workspace

Combine Filters


Use Cases

You resell Topograph to your own clients. Create one workspace per client, tag all their requests, and pull monthly usage reports to generate invoices.
Your company has multiple legal entities or branches. Each entity gets its own workspace with the correct legal name, so you can allocate costs internally.
You build a platform where your users trigger Topograph requests. Tag each request with the user’s workspace to track per-tenant consumption and enforce usage limits.
Set up a cron job to pull usage at the end of each month and generate invoices automatically.

API Reference

The x-topograph-workspace-id header is supported on /v2/company (all modes, including mode: "onboarding"). The legacy /v2/onboarding route also accepts it.