> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://onepin.ai/docs/reference/api-reference/workspaces/get-workspace-api-v-1-workspaces-workspace-id-get/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://onepin.ai/_mcp/server. # Get Workspace GET https://api.onepin.ai/api/v1/workspaces/{workspace_id} Fetch a single workspace by ID. Returns the workspace if the current user is an active member (any role). Returns 404 if the workspace does not exist, has been deleted, or the caller is not a member — the two cases are intentionally indistinguishable to prevent workspace enumeration. Reference: https://onepin.ai/docs/reference/api-reference/workspaces/get-workspace-api-v-1-workspaces-workspace-id-get ## Authentication - `Authorization` header (bearer token, required) — Clerk JWT token ## Servers - `https://api.onepin.ai` (prod, default) - `https://dev-api.onepin.ai` (dev) ## Request ### Path parameters - `workspace_id` (string, required) ## Response ### 200 Successful Response - `data` (WorkspaceOut, required) - `meta` (Meta, required) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### WorkspaceOut - `id` (string, required) — Unique workspace identifier. Pass as `X-Workspace-Id` header to scope resource requests. - `name` (string, required) — Human-readable workspace name. - `slug` (string, required) — URL-safe workspace identifier (lowercase kebab-case). - `color_idx` (integer, required) — Index into the workspace color palette. - `created_at` (datetime, required) — When the workspace was created (UTC). - `updated_at` (datetime, required) — When the workspace was last modified (UTC). - `routing_price_sensitivity` (double, required) — Voice-selection price/quality balance (0.0 = pure quality, 1.0 = pure price, 0.5 = balanced). - `routing_llm_fit` (boolean, required) — Whether automatic voice selection also weighs content fit. - `created_by` (string, optional, nullable) — User ID of the workspace owner. Null for an enterprise org workspace, which is owned by its organization (see organization_id) rather than a user. - `organization_id` (string, optional, nullable) — Owning organization when this is an enterprise org workspace, else null. ### Meta - `request_id` (string, required) - `timestamp` (datetime, required) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `input` (any, optional) - `ctx` (ValidationErrorCtx, optional) ### ValidationErrorLocItems ### ValidationErrorCtx ## Examples **Response** ```json { "data": { "id": "string", "name": "string", "slug": "string", "color_idx": 1, "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", "routing_price_sensitivity": 1.1, "routing_llm_fit": true, "created_by": "string", "organization_id": "string" }, "meta": { "request_id": "string", "timestamp": "2024-01-15T09:30:00Z" } } ``` **SDK Code** ```python import requests url = "https://api.onepin.ai/api/v1/workspaces/workspace_id" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.onepin.ai/api/v1/workspaces/workspace_id'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.onepin.ai/api/v1/workspaces/workspace_id" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.onepin.ai/api/v1/workspaces/workspace_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.onepin.ai/api/v1/workspaces/workspace_id") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.onepin.ai/api/v1/workspaces/workspace_id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.onepin.ai/api/v1/workspaces/workspace_id"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.onepin.ai/api/v1/workspaces/workspace_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` > Onepin is a voice workflow platform that orchestrates, validates, and ships production-ready audio across 33 TTS models.