Get All Spaces
Spaces
Get All Spaces
Retrieve details of all created spaces in your organization
GET
Get All Spaces
Documentation Index
Fetch the complete documentation index at: https://docs.unpod.dev/llms.txt
Use this file to discover all available pages before exploring further.
Get All Spaces
Retrieve a list of all spaces within your organization. Spaces are containers that organize your tasks, runs, and data collections.Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | API Key format: Token <token> |
| Org-Handle | string | Yes | Organization domain handle |
Response Fields
| Field | Type | Description |
|---|---|---|
| count | integer | Total number of spaces |
| status_code | integer | HTTP status code |
| message | string | Response message |
| data | array | Array of space objects |
Space Object Fields
| Field | Type | Description |
|---|---|---|
| id | string | Unique space identifier |
| name | string | Space display name |
| token | string | Public token for API access (use as space_token) |
| agent_handle | string | Handle of the agent assigned to the space |
| created_at | string | Space creation timestamp (ISO 8601) |
Common Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters provided |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Access denied to the resource |
| 404 | Not Found - Organization not found |
| 500 | Internal Server Error - Server-side error |
Code Examples
Best Practices
- Org-Handle: Always include the correct organization handle in your requests
- Space Token: Note the
tokenfield — it is used as thespace_tokenpath parameter in other endpoints - Agent Handle: Use the
agent_handlewhen creating tasks to assign them to the correct agent - Error Handling: Always handle potential errors and edge cases
- Caching: Consider caching space data to reduce API calls since spaces change infrequently