> For the complete documentation index, see [llms.txt](https://docs.otari.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otari.ai/otari/for-integrators/api-reference/workspace-web-search.md).

# Workspace web search

## Get Workspace Web Search Config

> Read a workspace's web-access configuration.\
> \
> Takes the same role as setting it (an organization owner/admin, or an\
> owner/admin of this workspace), because the row describes the workspace's\
> posture rather than one member's allowance. A workspace with no row answers\
> with the unconfigured shape (\`\`configured: false\`\`), which is the\
> deployment's own behavior described in the same shape rather than a 404.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"WorkspaceWebSearchConfigPublic":{"description":"A workspace's web-search configuration, or the unconfigured one it has without a row.","properties":{"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Domains"},"configured":{"title":"Configured","type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"default_enabled":{"title":"Default Enabled","type":"boolean"},"enabled":{"title":"Enabled","type":"boolean"},"max_results":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Results"},"provider_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Options"},"purpose_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose Hint"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"web_search_configured":{"title":"Web Search Configured","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["workspace_id","configured","web_search_configured","default_enabled","enabled","max_results","purpose_hint","allowed_domains","blocked_domains","provider_options","created_at","updated_at"],"title":"WorkspaceWebSearchConfigPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/web-search":{"get":{"description":"Read a workspace's web-access configuration.\n\nTakes the same role as setting it (an organization owner/admin, or an\nowner/admin of this workspace), because the row describes the workspace's\nposture rather than one member's allowance. A workspace with no row answers\nwith the unconfigured shape (``configured: false``), which is the\ndeployment's own behavior described in the same shape rather than a 404.","operationId":"workspace-web-search-get_workspace_web_search_config","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchConfigPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Get Workspace Web Search Config","tags":["workspace-web-search"]}}}}
```

## Set Workspace Web Search Config

> Set a workspace's web-access configuration, replacing any existing one.\
> \
> An organization owner/admin, or an owner/admin of this workspace, may write\
> it. The configuration can only narrow what the deployment permits: turning\
> web access off for the workspace, lowering the Search result ceiling, and\
> constraining domains for Search and Fetch. It never turns on a backend the\
> deployment has not configured, and it carries no credential.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"WorkspaceWebSearchConfigUpdate":{"description":"The configuration to store for a workspace, as a whole.\n\n``PUT`` semantics, ported from the hosted ``WorkspaceWebSearchConfigUpdate``:\nwhat is sent is what the workspace has afterwards, so an omitted field is\ncleared rather than left as it was.","properties":{"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Filters Search results and constrains initial and redirected Fetch destinations; intersected with any list the request sends","title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"Filters Search results and blocks initial and redirected Fetch destinations; added to any list the request sends","title":"Blocked Domains"},"enabled":{"description":"False refuses web access for this workspace through otari_web_search, otari_web_fetch, and POST /api/v1/search.","title":"Enabled","type":"boolean"},"max_results":{"anyOf":[{"exclusiveMinimum":0,"maximum":2147483647,"type":"integer"},{"type":"null"}],"description":"Search only: ceiling on results one search returns, through otari_web_search and POST /api/v1/search; it only ever lowers the count a request asks for. Unset, the provider's own maximum is the only limit.","title":"Max Results"},"provider_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Search only: provider-specific knobs forwarded to the backend; request keys win","title":"Provider Options"},"purpose_hint":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"description":"Search only: hint used when a request declares otari_web_search without one of its own","title":"Purpose Hint"}},"required":["enabled"],"title":"WorkspaceWebSearchConfigUpdate","type":"object"},"WorkspaceWebSearchConfigPublic":{"description":"A workspace's web-search configuration, or the unconfigured one it has without a row.","properties":{"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Domains"},"configured":{"title":"Configured","type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"default_enabled":{"title":"Default Enabled","type":"boolean"},"enabled":{"title":"Enabled","type":"boolean"},"max_results":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Results"},"provider_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Options"},"purpose_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose Hint"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"web_search_configured":{"title":"Web Search Configured","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["workspace_id","configured","web_search_configured","default_enabled","enabled","max_results","purpose_hint","allowed_domains","blocked_domains","provider_options","created_at","updated_at"],"title":"WorkspaceWebSearchConfigPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/web-search":{"put":{"description":"Set a workspace's web-access configuration, replacing any existing one.\n\nAn organization owner/admin, or an owner/admin of this workspace, may write\nit. The configuration can only narrow what the deployment permits: turning\nweb access off for the workspace, lowering the Search result ceiling, and\nconstraining domains for Search and Fetch. It never turns on a backend the\ndeployment has not configured, and it carries no credential.","operationId":"workspace-web-search-set_workspace_web_search_config","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchConfigUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchConfigPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Set Workspace Web Search Config","tags":["workspace-web-search"]}}}}
```

## Clear Workspace Web Search Config

> Drop a workspace's configuration, returning it to the deployment's behavior.\
> \
> Idempotent: a workspace that has no configuration is already in the state\
> this asks for, so it answers with the unconfigured shape rather than a 404.

```json
{"openapi":"3.1.0","info":{"title":"otari","version":"0.33.0"},"security":[{"ApiKeyAuth":[]},{"XApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"description":"Enter your API key here (sent as Otari-Key header).","in":"header","name":"Otari-Key","type":"apiKey"},"XApiKeyAuth":{"description":"Anthropic-native clients send credentials here (no Bearer prefix).","in":"header","name":"x-api-key","type":"apiKey"}},"schemas":{"WorkspaceWebSearchConfigPublic":{"description":"A workspace's web-search configuration, or the unconfigured one it has without a row.","properties":{"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"blocked_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Domains"},"configured":{"title":"Configured","type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"default_enabled":{"title":"Default Enabled","type":"boolean"},"enabled":{"title":"Enabled","type":"boolean"},"max_results":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Results"},"provider_options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Provider Options"},"purpose_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Purpose Hint"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"web_search_configured":{"title":"Web Search Configured","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["workspace_id","configured","web_search_configured","default_enabled","enabled","max_results","purpose_hint","allowed_domains","blocked_domains","provider_options","created_at","updated_at"],"title":"WorkspaceWebSearchConfigPublic","type":"object"},"HTTPValidationError":{"properties":{"code":{"const":"invalid_request","description":"Stable error code, also sent as the Otari-Error-Code header.","title":"Code","type":"string"},"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"}}},"paths":{"/api/v1/workspaces/{workspace_id}/web-search":{"delete":{"description":"Drop a workspace's configuration, returning it to the deployment's behavior.\n\nIdempotent: a workspace that has no configuration is already in the state\nthis asks for, so it answers with the unconfigured shape rather than a 404.","operationId":"workspace-web-search-clear_workspace_web_search_config","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchConfigPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Clear Workspace Web Search Config","tags":["workspace-web-search"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otari.ai/otari/for-integrators/api-reference/workspace-web-search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
