Get the workspace
curl -sS https://api.speccapture.com/v1/workspace \ -H "Authorization: Bearer $SPECCAPTURE_API_KEY"using System.Text.Json;
using HttpClient http = new() { BaseAddress = new Uri("https://api.speccapture.com") };http.DefaultRequestHeaders.Authorization = new("Bearer", Environment.GetEnvironmentVariable("SPECCAPTURE_API_KEY"));
HttpResponseMessage response = await Call(HttpMethod.Get, "/v1/workspace");Console.WriteLine(await response.Content.ReadAsStringAsync());
// Sends a request; stops with the problem's code and detail if the API refuses it.async Task<HttpResponseMessage> Call(HttpMethod method, string path, HttpContent? body = null, string? idempotencyKey = null) { using HttpRequestMessage request = new(method, path) { Content = body }; if (idempotencyKey is not null) request.Headers.Add("Idempotency-Key", idempotencyKey); HttpResponseMessage response = await http.SendAsync(request); if (!response.IsSuccessStatusCode) { JsonElement problem = await Json(response); string? detail = (problem.TryGetProperty("detail", out JsonElement text) ? text : problem.GetProperty("title")).GetString(); Console.Error.WriteLine($"{(int)response.StatusCode} {problem.GetProperty("code")}: {detail}"); Environment.Exit(1); } return response;}
// Reads an answer as JSON.static async Task<JsonElement> Json(HttpResponseMessage response) => JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;import osimport sys
import requests
API = "https://api.speccapture.com"session = requests.Session()session.headers["Authorization"] = f"Bearer {os.environ['SPECCAPTURE_API_KEY']}"
def call(method, path, **kwargs): """Send a request; stop with the problem's code and detail if the API refuses it.""" response = session.request(method, API + path, **kwargs) if not response.ok: problem = response.json() sys.exit(f"{response.status_code} {problem['code']}: {problem.get('detail', problem['title'])}") return response
print(call("GET", "/v1/workspace").text)const API = "https://api.speccapture.com";const headers = { Authorization: `Bearer ${process.env.SPECCAPTURE_API_KEY}` };
console.log(await call("GET", "/v1/workspace").then((response) => response.text()));
// Sends a request; stops with the problem's code and detail if the API refuses it.async function call(method, path, init = {}) { const response = await fetch(API + path, { ...init, method, headers: { ...headers, ...init.headers } }); if (!response.ok) { const problem = await response.json(); console.error(`${response.status} ${problem.code}: ${problem.detail ?? problem.title}`); process.exit(1); } return response;}The workspace the key belongs to: its name, its plan or where its free trial stands, its credits as GET /v1/account reports them, and how many people are in it. Read-only: the workspace is managed in the dashboard. Any key.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
The caller’s workspace: GET /v1/workspace. Read-only; the workspace is managed in the dashboard.
object
The workspace’s name.
What the workspace is on, as GET /v1/account reports it.
object
The plan while the workspace is on one, else where its free trial stands.
When the free trial ends or ended; null when the workspace never had one.
When the plan renews and its next month’s credits arrive; null when it is set to end, or there is no plan.
When a canceled plan ends, at the end of the month paid for; null otherwise.
True when the plan’s last payment failed and is being retried: reading continues meanwhile, and the workspace’s owner updates the card on the dashboard’s Credits page. Null when there is no plan.
The workspace’s credits, as GET /v1/account reports them.
object
What can be reserved now.
Reserved for jobs still being read.
What read sheets have cost, all time.
What one drawing sheet costs.
How many more sheets the available credits pay for.
How many people are in the workspace now.
Examples
A workspace of three people on the Pro plan
{ "name": "Northfield Precision", "plan": { "name": "pro", "trialEndsAt": "2026-09-13T14:02:41+00:00", "renewsAt": "2026-11-03T00:00:00+00:00", "endsAt": null, "paymentFailed": false }, "credits": { "available": 1832, "held": 0, "spent": 1168, "perSheet": 4, "sheetsAvailable": 458, "nextExpiry": { "credits": 1832, "expiresAt": "2026-11-03T00:00:00+00:00" } }, "memberCount": 3}