# Workplace API

## GET /team/settings

> Retrieve team settings.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"TeamSettingsApiDTO":{"type":"object","properties":{"team_id":{"type":"string"},"team_name":{"type":"string"},"color":{"type":"string"},"head_count":{"type":"integer"},"space_type_preference":{"type":"string","enum":["AUTO","SPACE","ROOM"]},"default_location":{"type":"object","additionalProperties":true},"linked_locations":{"type":"array","items":{"type":"string"}},"settings":{"type":"array","items":{"type":"object","properties":{"location_id":{"type":"string"},"type":{"type":"string"},"min_capacity":{"type":"integer"},"max_capacity":{"type":"integer"},"contingency":{"type":"integer"},"fixed_days":{"type":"array","items":{"type":"integer"}}},"additionalProperties":true}}},"additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/team/settings":{"get":{"operationId":"getTeamSettings","description":"Retrieve team settings.","parameters":[{"name":"team_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"external_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"team_settings":{"type":"array","items":{"$ref":"#/components/schemas/TeamSettingsApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## PUT /team/settings

> Update team settings.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"TeamSettingsApiDTO":{"type":"object","properties":{"team_id":{"type":"string"},"team_name":{"type":"string"},"color":{"type":"string"},"head_count":{"type":"integer"},"space_type_preference":{"type":"string","enum":["AUTO","SPACE","ROOM"]},"default_location":{"type":"object","additionalProperties":true},"linked_locations":{"type":"array","items":{"type":"string"}},"settings":{"type":"array","items":{"type":"object","properties":{"location_id":{"type":"string"},"type":{"type":"string"},"min_capacity":{"type":"integer"},"max_capacity":{"type":"integer"},"contingency":{"type":"integer"},"fixed_days":{"type":"array","items":{"type":"integer"}}},"additionalProperties":true}}},"additionalProperties":true}}},"paths":{"/team/settings":{"put":{"operationId":"putTeamSettings","description":"Update team settings.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["team_settings"],"properties":{"team_settings":{"type":"array","items":{"type":"object","required":["team_id","settings"],"properties":{"team_id":{"type":"string"},"space_type_preference":{"type":"string","enum":["AUTO","SPACE","ROOM"]},"settings":{"type":"array","items":{"type":"object","required":["location_id"],"properties":{"location_id":{"type":"string"},"type":{"type":"string"},"min_capacity":{"type":"integer"},"max_capacity":{"type":"integer"},"contingency":{"type":"integer"},"fixed_days":{"type":"array","items":{"type":"integer"}}}}}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TeamSettingsApiDTO"}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## POST /occupancy

> Create occupancy records.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"OccupancyApiDTO":{"type":"object","properties":{"occupancy_id":{"type":"string"},"location_id":{"type":"string"},"people_id":{"type":"string"},"external_ids":{"type":"array","items":{"type":"string"}},"seen_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"door_external_id":{"type":"string"},"wap_external_id":{"type":"string"},"dock_external_id":{"type":"string"}},"additionalProperties":true}}},"paths":{"/occupancy":{"post":{"operationId":"postOccupancy","description":"Create occupancy records.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["location_id","occupancy"],"properties":{"location_id":{"type":"string"},"occupancy":{"type":"array","items":{"type":"object","required":["people_id","seen_at"],"properties":{"people_id":{"type":"string"},"seen_at":{"type":"string","description":"UTC ISO 8601 format."}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"info":{"type":"string"},"occupancy":{"type":"array","items":{"$ref":"#/components/schemas/OccupancyApiDTO"}}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## GET /occupancy

> Retrieve occupancy records.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"OccupancyApiDTO":{"type":"object","properties":{"occupancy_id":{"type":"string"},"location_id":{"type":"string"},"people_id":{"type":"string"},"external_ids":{"type":"array","items":{"type":"string"}},"seen_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"door_external_id":{"type":"string"},"wap_external_id":{"type":"string"},"dock_external_id":{"type":"string"}},"additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/occupancy":{"get":{"operationId":"getOccupancy","description":"Retrieve occupancy records.","parameters":[{"name":"location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"people_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"occupancy_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"starts_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"ends_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"name"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"occupancy":{"type":"array","items":{"$ref":"#/components/schemas/OccupancyApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## DELETE /occupancy

> Delete occupancy records.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/occupancy":{"delete":{"operationId":"deleteOccupancy","description":"Delete occupancy records.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["location_id"],"properties":{"location_id":{"type":"string"},"timezone":{"type":"string"},"people_id":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"occupancy":{"type":"array","items":{"type":"object","required":["occupancy_id"],"properties":{"occupancy_id":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"info":{"type":"string"},"deleted_records":{"type":"integer"}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## POST /forecast/start

> Start a forecasting job.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ForecastJobApiDTO":{"type":"object","properties":{"job_id":{"type":"string"},"location_id":{"type":"string"},"status":{"type":"string"},"service_processing":{"type":"object","additionalProperties":true},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"additionalProperties":true}}},"paths":{"/forecast/start":{"post":{"operationId":"startForecast","description":"Start a forecasting job.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["location_id"],"properties":{"location_id":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"force_rebuild":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/ForecastJobApiDTO"},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## GET /forecast/status

> Retrieve forecasting job status.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"ForecastJobApiDTO":{"type":"object","properties":{"job_id":{"type":"string"},"location_id":{"type":"string"},"status":{"type":"string"},"service_processing":{"type":"object","additionalProperties":true},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/forecast/status":{"get":{"operationId":"getForecastStatus","description":"Retrieve forecasting job status.","parameters":[{"name":"location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"job_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"created_at"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"forecast_jobs":{"type":"array","items":{"$ref":"#/components/schemas/ForecastJobApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## GET /forecast/locations

> Retrieve forecasted location capacity.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"LocationForecastApiDTO":{"type":"object","additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/forecast/locations":{"get":{"operationId":"getLocationForecast","description":"Retrieve forecasted location capacity.","parameters":[{"name":"location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"external_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"starts_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"ends_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"starts_at"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"forecast":{"type":"array","items":{"$ref":"#/components/schemas/LocationForecastApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## GET /forecast/teams

> Retrieve forecasted team attendance.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"TeamForecastApiDTO":{"type":"object","additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/forecast/teams":{"get":{"operationId":"getTeamForecast","description":"Retrieve forecasted team attendance.","parameters":[{"name":"location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"people_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"team_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"starts_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"ends_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"starts_at"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"forecast":{"type":"array","items":{"$ref":"#/components/schemas/TeamForecastApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## GET /forecast/people

> Retrieve forecasted people attendance.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PeopleForecastApiDTO":{"type":"object","additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/forecast/people":{"get":{"operationId":"getPeopleForecast","description":"Retrieve forecasted people attendance.","parameters":[{"name":"location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"people_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"team_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"starts_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"ends_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"starts_at"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"forecast":{"type":"array","items":{"$ref":"#/components/schemas/PeopleForecastApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## POST /evolve/start

> Trigger an AIDRA evolution run.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"EvolveApiDTO":{"type":"object","properties":{"evolution_id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}},"paths":{"/evolve/start":{"post":{"operationId":"triggerEvolve","description":"Trigger an AIDRA evolution run.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["location_id","date"],"properties":{"location_id":{"type":"string"},"date":{"type":"string","format":"date-time"},"settings":{"type":"object","properties":{"disturbance":{"type":"string","enum":["MIN","MAX"],"default":"MIN"},"run_by_zone":{"type":"boolean","default":false},"future_days":{"type":"integer","minimum":0,"maximum":14,"default":0},"model":{"type":"string","enum":["AIDRA-D1","AIDRA-T1"],"default":"AIDRA-D1"}},"additionalProperties":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/EvolveApiDTO"},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## GET /evolve/status

> Retrieve evolution status.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"EvolveApiDTO":{"type":"object","properties":{"evolution_id":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}},"paths":{"/evolve/status":{"get":{"operationId":"getEvolveStatus","description":"Retrieve evolution status.","parameters":[{"name":"evolution_id","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"$ref":"#/components/schemas/EvolveApiDTO"},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## GET /allocations

> Retrieve allocations with filters.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"AllocationApiDTO":{"type":"object","properties":{"allocation_id":{"type":"string"},"location_id":{"type":"string"},"location_name":{"type":"string"},"location_timezone":{"type":"string"},"layer_id":{"type":"string"},"layer_name":{"type":"string"},"room_id":{"type":"string"},"room_name":{"type":"string"},"zone_id":{"type":"string"},"zone_name":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"people_id":{"type":"string"},"people_first_name":{"type":"string"},"people_last_name":{"type":"string"},"people_email":{"type":"string"},"spaces":{"type":"array","items":{}},"type":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"performance":{"type":"object","additionalProperties":true}},"additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/allocations":{"get":{"operationId":"getAllocations","description":"Retrieve allocations with filters.","parameters":[{"name":"location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"layer_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"room_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"zone_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"people_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"team_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"starts_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"ends_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"location_timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"starts_at"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"allocations":{"type":"array","items":{"$ref":"#/components/schemas/AllocationApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## POST /allocations

> Create allocations.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/allocations":{"post":{"operationId":"postAllocations","description":"Create allocations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["allocations"],"properties":{"allocations":{"type":"array","items":{"type":"object","required":["location_id","location_name","location_timezone","layer_id","layer_name","spaces","starts_at","ends_at","type"],"properties":{"location_id":{"type":"string"},"location_name":{"type":"string"},"location_timezone":{"type":"string"},"layer_id":{"type":"string"},"layer_name":{"type":"string"},"spaces":{"type":"array","items":{}},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"type":{"type":"string"},"room_id":{"type":"string"},"room_name":{"type":"string"},"zone_id":{"type":"string"},"zone_name":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"people_id":{"type":"string"},"people_first_name":{"type":"string"},"people_last_name":{"type":"string"},"people_email":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"identifier":{"type":"string"}},"required":["success","identifier"]}}}}}}}}}
```

## PUT /allocations

> Update allocations.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/allocations":{"put":{"operationId":"putAllocations","description":"Update allocations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["allocations"],"properties":{"allocations":{"type":"array","items":{"type":"object","required":["allocation_id"],"properties":{"allocation_id":{"type":"string"},"location_name":{"type":"string"},"layer_id":{"type":"string"},"layer_name":{"type":"string"},"room_id":{"type":"string"},"room_name":{"type":"string"},"zone_id":{"type":"string"},"zone_name":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"people_id":{"type":"string"},"people_first_name":{"type":"string"},"people_last_name":{"type":"string"},"people_email":{"type":"string"},"spaces":{"type":"array","items":{}},"type":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"identifier":{"type":"string"}},"required":["success","identifier"]}}}}}}}}}
```

## DELETE /allocations

> Delete allocations.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/allocations":{"delete":{"operationId":"deleteAllocations","description":"Delete allocations.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["allocations"],"properties":{"allocations":{"type":"array","items":{"type":"object","required":["allocation_id"],"properties":{"allocation_id":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"identifier":{"type":"string"}},"required":["success","identifier"]}}}}}}}}}
```

## GET /intentions

> Retrieve intentions with optional filters. Only LIVE configuration is supported; scenario keys are ignored.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"IntentionApiDTO":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string"},"location_id":{"type":"string"},"location_name":{"type":"string"},"location_timezone":{"type":"string"},"status":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"people_id":{"type":"string"},"people_first_name":{"type":"string"},"people_last_name":{"type":"string"},"people_email":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"room_id":{"type":"string"},"room_name":{"type":"string"},"invite_list":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":true},"amenities":{"type":"object","additionalProperties":true},"visitors":{"type":"array","items":{}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"additionalProperties":true},"Pagination":{"type":"object","properties":{"current_results":{"type":"object","properties":{"from":{"type":"integer"},"to":{"type":"integer"}}},"total_results":{"type":"integer"}},"additionalProperties":true}}},"paths":{"/intentions":{"get":{"operationId":"getIntentions","description":"Retrieve intentions with optional filters. Only LIVE configuration is supported; scenario keys are ignored.","parameters":[{"name":"location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"external_location_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"layer_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"room_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"zone_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"people_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"team_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"starts_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"ends_at","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"location_timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"external_location_timezone","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"external_type","in":"query","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":25}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"intentions":{"type":"array","items":{"$ref":"#/components/schemas/IntentionApiDTO"}}}},"pagination":{"$ref":"#/components/schemas/Pagination"},"identifier":{"type":"string"}},"required":["success","data","pagination","identifier"]}}}}}}}}}
```

## POST /intentions

> Create an intention. Only LIVE configuration is supported; scenario keys are ignored.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"IntentionPublicDTO":{"type":"object","additionalProperties":true}}},"paths":{"/intentions":{"post":{"operationId":"createIntention","description":"Create an intention. Only LIVE configuration is supported; scenario keys are ignored.","parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","location_id","people_id","people_first_name","people_last_name","people_email","dates"],"properties":{"status":{"type":"string"},"type":{"type":"string"},"location_id":{"type":"string"},"people_id":{"type":"string"},"people_first_name":{"type":"string"},"people_last_name":{"type":"string"},"people_email":{"type":"string"},"team_id":{"type":"string"},"team_name":{"type":"string"},"invite_list":{"type":"array","items":{}},"preferences":{"type":"object","additionalProperties":true},"amenities":{"type":"object","additionalProperties":true},"visitors":{"type":"array","items":{}},"dates":{"type":"array","items":{"type":"object","additionalProperties":true}},"custom_time":{"type":"object","additionalProperties":true},"skip_auto_accept":{"type":"boolean","default":false},"fixed_day":{"type":"object","additionalProperties":true},"allocation":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"intentions":{"type":"array","items":{"$ref":"#/components/schemas/IntentionPublicDTO"}},"errors":{"type":"array","items":{}}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}},"207":{"description":"Partial Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"intentions":{"type":"array","items":{"$ref":"#/components/schemas/IntentionPublicDTO"}},"errors":{"type":"array","items":{}}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## POST /intentions/external

> Create external intentions. Only LIVE configuration is supported; scenario keys are ignored.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"IntentionPublicDTO":{"type":"object","additionalProperties":true}}},"paths":{"/intentions/external":{"post":{"operationId":"createExternalIntention","description":"Create external intentions. Only LIVE configuration is supported; scenario keys are ignored.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["intentions"],"properties":{"intentions":{"type":"array","minItems":1,"items":{"type":"object","required":["people_id","people_email","people_first_name","people_last_name","starts_at","ends_at","external_location_id","external_location_name","external_location_timezone","external_type"],"properties":{"people_id":{"type":"string"},"people_email":{"type":"string"},"people_first_name":{"type":"string"},"people_last_name":{"type":"string"},"starts_at":{"type":"string","format":"date-time"},"ends_at":{"type":"string","format":"date-time"},"external_location_id":{"type":"string"},"external_location_name":{"type":"string"},"external_location_timezone":{"type":"string"},"external_type":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/IntentionPublicDTO"}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}},"207":{"description":"Partial Success","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/IntentionPublicDTO"}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## PUT /intentions/{intention\_id}/accept

> Accept an intention. Only LIVE configuration is supported; scenario keys are ignored.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/intentions/{intention_id}/accept":{"put":{"operationId":"acceptIntention","description":"Accept an intention. Only LIVE configuration is supported; scenario keys are ignored.","parameters":[{"name":"intention_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"force","in":"query","required":false,"schema":{"type":"string","default":"false"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"_id":{"type":"string"},"status":{"type":"string"},"allocation":{"type":"object","additionalProperties":true},"allcoated_at":{"type":"string"}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}},"409":{"description":"Conflicting intentions detected","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"existing_intentions":{"type":"array","items":{}},"existing_meetings":{"type":"array","items":{}}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## PUT /intentions/{intention\_id}/decline

> Decline an intention. Only LIVE configuration is supported; scenario keys are ignored.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/intentions/{intention_id}/decline":{"put":{"operationId":"declineIntention","description":"Decline an intention. Only LIVE configuration is supported; scenario keys are ignored.","parameters":[{"name":"intention_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"_id":{"type":"string"},"status":{"type":"string"},"reason":{"type":"string"}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## PUT /intentions/{intention\_id}/cancel

> Cancel an intention. Only LIVE configuration is supported; scenario keys are ignored.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/intentions/{intention_id}/cancel":{"put":{"operationId":"cancelIntention","description":"Cancel an intention. Only LIVE configuration is supported; scenario keys are ignored.","parameters":[{"name":"intention_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"cancel_for_all":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"_id":{"type":"string"},"status":{"type":"string"},"reason":{"type":"string"}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```

## DELETE /intentions/{intention\_id}

> Delete an intention. Only LIVE configuration is supported; scenario keys are ignored.

```json
{"openapi":"3.0.3","info":{"title":"Workplace API","version":"2.0"},"servers":[{"url":"https://api.gospace.app/workplace/v1"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}}},"paths":{"/intentions/{intention_id}":{"delete":{"operationId":"deleteIntention","description":"Delete an intention. Only LIVE configuration is supported; scenario keys are ignored.","parameters":[{"name":"intention_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"_id":{"type":"string"}}},"identifier":{"type":"string"}},"required":["success","data","identifier"]}}}}}}}}}
```
