# workspace_required (/errors/workspace_required)

| HTTP status | Type | Code |
| --- | --- | --- |
| 400 | `invalid_request_error` | `workspace_required` |

## What it means [#what-it-means]

This endpoint works on one workspace's data, and the caller is not acting inside a workspace (for example a platform admin session). Use an API key or sign in to a workspace.

## How to handle it [#how-to-handle-it]

Fix the request before sending it again; retrying the same request returns the same error. `error.param` names the offending field when there is one.

## Example response [#example-response]

```json
{
  "detail": "Merchant workspace required",
  "error": {
    "type": "invalid_request_error",
    "code": "workspace_required",
    "message": "Merchant workspace required",
    "param": null,
    "docUrl": "https://docs.callmitra.ai/errors/workspace_required",
    "requestId": "req_3f9c2a7d1b8e4c6a9f0e2d4b6a8c0e1f"
  }
}
```

Branch on `error.code`; it never changes once published. The `message` text can change. See [Errors](/errors) for the envelope.

## Returned by [#returned-by]

- `GET /api/v1/sip-trunks/{trunk_id}` — Get a SIP trunk
- `GET /api/v1/callbacks` — List scheduled callbacks
- `GET /api/v1/sip-trunks` — List SIP trunks