Get started
Fast path to a working request against the gospace public APIs.
Follow these steps to call any gospace public API surface.
1) Pick an environment
- Production:
https://api.gospace.ai - UAT/sandbox:
https://api.uat.gospace.ai
Most service URLs are https://<base>/v1/<service>.
MCP uses https://<base>/api/v1/mcp.
2) Obtain credentials
- Sign in (email, Google, or GitHub) and exchange your refresh token for an access token:
POST https://api.gospace.ai/v1/auth/token
Content-Type: application/json
{ "refresh_token": "<refresh_token>" }
Response (trimmed):
{ "success": true, "data": { "access_token": "...", "refresh_token": "..." } }
- Create a workspace API key (recommended for server-to-server calls):
POST https://api.gospace.ai/v1/auth/api-key
Authorization: Bearer <access_token>
Content-Type: application/json
Response:
{ "success": true, "data": { "api_key": "key_...<workspace>...<uuid>" } }
API keys embed the shard, location, and workspace, so you usually do not need an X-Workspace-Key header.
3) Call your first endpoint
Using an API key:
curl -X GET "https://api.gospace.ai/v1/system/workspaces" \
-H "x-api-key: key_abc.UK.WORKSPACE123.abcd1234"
Using a bearer token:
curl -X GET "https://api.gospace.ai/v1/auth/me" \
-H "Authorization: Bearer <access_token>"
Requests use JSON bodies and return JSON responses. Start with Authentication and use Overview to find the right service prefix.