> 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/web-search-keys.md).

# Web search keys

## List Org Web Search Keys

> List the caller's organization's web search and fetch keys. Organization owners and admins only.

```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":{"OrgWebSearchKeysPublic":{"properties":{"count":{"title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/OrgWebSearchKeyPublic"},"title":"Data","type":"array"}},"required":["data","count"],"title":"OrgWebSearchKeysPublic","type":"object"},"OrgWebSearchKeyPublic":{"description":"One key as the API shows it: never the key itself, only ``last4``.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The key's provider options, with any value whose name looks like a secret masked.","title":"Options"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"False when this deployment cannot decrypt the stored key, so no call uses it. It is still listed, because replacing or deleting it is what fixes it.","title":"Usable","type":"boolean"}},"required":["id","organization_id","kind","provider","name","is_org_default","usable","created_at"],"title":"OrgWebSearchKeyPublic","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/organizations/me/web-search-keys":{"get":{"description":"List the caller's organization's web search and fetch keys. Organization owners and admins only.","operationId":"web-search-keys-list_org_web_search_keys","parameters":[{"description":"Include archived keys.","in":"query","name":"include_archived","required":false,"schema":{"default":false,"description":"Include archived keys.","title":"Include Archived","type":"boolean"}},{"description":"Number of records to skip","in":"query","name":"skip","required":false,"schema":{"default":0,"description":"Number of records to skip","minimum":0,"title":"Skip","type":"integer"}},{"description":"Maximum number of records to return","in":"query","name":"limit","required":false,"schema":{"default":100,"description":"Maximum number of records to return","maximum":1000,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeysPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Org Web Search Keys","tags":["web-search-keys"]}}}}
```

## Create Org Web Search Key

> Add a search or fetch key to the caller's organization. Organization owners and admins only.\
> \
> A workspace with a usable key of a kind uses it for that kind's calls rather than the deployment's instance.

```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":{"OrgWebSearchKeyCreateRequest":{"description":"What a caller sends to add a key. The service keeps only its ciphertext and ``last4``.","properties":{"api_base":{"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}],"description":"The provider's endpoint, when not its own. Must be https when the key carries an API key.","title":"Api Base"},"api_key":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"Required unless the provider takes no key.","title":"Api Key"},"kind":{"default":"search","description":"Whether the key serves the search tool or the fetch tool, and enrichment. Fixed once created.","enum":["search","fetch"],"title":"Kind","type":"string"},"name":{"description":"How the organization tells this key apart from its others.","maxLength":255,"title":"Name","type":"string"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Provider options, under the names the provider catalog lists for the provider.","title":"Options"},"provider":{"description":"The provider the key is for: one the provider catalog, GET /api/v1/search-tools/providers, lists for the key's kind, other than searxng, or tavily or brave for a search key.","maxLength":255,"title":"Provider","type":"string"}},"required":["provider","name"],"title":"OrgWebSearchKeyCreateRequest","type":"object"},"OrgWebSearchKeyPublic":{"description":"One key as the API shows it: never the key itself, only ``last4``.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The key's provider options, with any value whose name looks like a secret masked.","title":"Options"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"False when this deployment cannot decrypt the stored key, so no call uses it. It is still listed, because replacing or deleting it is what fixes it.","title":"Usable","type":"boolean"}},"required":["id","organization_id","kind","provider","name","is_org_default","usable","created_at"],"title":"OrgWebSearchKeyPublic","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/organizations/me/web-search-keys":{"post":{"description":"Add a search or fetch key to the caller's organization. Organization owners and admins only.\n\nA workspace with a usable key of a kind uses it for that kind's calls rather than the deployment's instance.","operationId":"web-search-keys-create_org_web_search_key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeyCreateRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Create Org Web Search Key","tags":["web-search-keys"]}}}}
```

## Update Org Web Search Key

> Rename a key, replace its secret, or change its api\_base or options. Organization owners and admins only.\
> \
> Its kind and provider are fixed. A new api\_base on a key that holds a secret\
> needs that secret in the same request, \`api\_key\` and any masked \`options\`\
> entry, since the next call sends it to the new host. Clearing api\_base needs\
> neither.

```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":{"OrgWebSearchKeyUpdateRequest":{"description":"A partial update: only what is set is applied, and ``null`` clears ``api_base`` or ``options``.\n\n``kind`` is fixed once a key is created, so sending it is refused.","properties":{"api_base":{"anyOf":[{"maxLength":1024,"type":"string"},{"type":"null"}],"title":"Api Base"},"api_key":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"title":"Api Key"},"name":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"title":"Name"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Options"}},"title":"OrgWebSearchKeyUpdateRequest","type":"object"},"OrgWebSearchKeyPublic":{"description":"One key as the API shows it: never the key itself, only ``last4``.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The key's provider options, with any value whose name looks like a secret masked.","title":"Options"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"False when this deployment cannot decrypt the stored key, so no call uses it. It is still listed, because replacing or deleting it is what fixes it.","title":"Usable","type":"boolean"}},"required":["id","organization_id","kind","provider","name","is_org_default","usable","created_at"],"title":"OrgWebSearchKeyPublic","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/organizations/me/web-search-keys/{key_id}":{"patch":{"description":"Rename a key, replace its secret, or change its api_base or options. Organization owners and admins only.\n\nIts kind and provider are fixed. A new api_base on a key that holds a secret\nneeds that secret in the same request, `api_key` and any masked `options`\nentry, since the next call sends it to the new host. Clearing api_base needs\nneither.","operationId":"web-search-keys-update_org_web_search_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeyUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Update Org Web Search Key","tags":["web-search-keys"]}}}}
```

## Delete Org Web Search Key

> Delete an archived key. Organization owners and admins only.

```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":{"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/organizations/me/web-search-keys/{key_id}":{"delete":{"description":"Delete an archived key. Organization owners and admins only.","operationId":"web-search-keys-delete_org_web_search_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"204":{"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Delete Org Web Search Key","tags":["web-search-keys"]}}}}
```

## Archive Org Web Search Key

> Take a key out of use. Organization owners and admins only.

```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":{"OrgWebSearchKeyPublic":{"description":"One key as the API shows it: never the key itself, only ``last4``.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The key's provider options, with any value whose name looks like a secret masked.","title":"Options"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"False when this deployment cannot decrypt the stored key, so no call uses it. It is still listed, because replacing or deleting it is what fixes it.","title":"Usable","type":"boolean"}},"required":["id","organization_id","kind","provider","name","is_org_default","usable","created_at"],"title":"OrgWebSearchKeyPublic","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/organizations/me/web-search-keys/{key_id}/archive":{"post":{"description":"Take a key out of use. Organization owners and admins only.","operationId":"web-search-keys-archive_org_web_search_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Archive Org Web Search Key","tags":["web-search-keys"]}}}}
```

## Set Org Default Web Search Key

> Make a key the organization's default of its kind, in place of the previous one.\
> \
> Organization owners and admins only.

```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":{"OrgWebSearchKeyPublic":{"description":"One key as the API shows it: never the key itself, only ``last4``.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The key's provider options, with any value whose name looks like a secret masked.","title":"Options"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"False when this deployment cannot decrypt the stored key, so no call uses it. It is still listed, because replacing or deleting it is what fixes it.","title":"Usable","type":"boolean"}},"required":["id","organization_id","kind","provider","name","is_org_default","usable","created_at"],"title":"OrgWebSearchKeyPublic","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/organizations/me/web-search-keys/{key_id}/default":{"post":{"description":"Make a key the organization's default of its kind, in place of the previous one.\n\nOrganization owners and admins only.","operationId":"web-search-keys-set_org_default_web_search_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Set Org Default Web Search Key","tags":["web-search-keys"]}}}}
```

## Restore Org Web Search Key

> Put an archived key back in use. Organization owners and admins only.

```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":{"OrgWebSearchKeyPublic":{"description":"One key as the API shows it: never the key itself, only ``last4``.","properties":{"api_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Base"},"archived_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Archived At"},"created_at":{"format":"date-time","title":"Created At","type":"string"},"id":{"format":"uuid","title":"Id","type":"string"},"is_org_default":{"title":"Is Org Default","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"options":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The key's provider options, with any value whose name looks like a secret masked.","title":"Options"},"organization_id":{"format":"uuid","title":"Organization Id","type":"string"},"provider":{"title":"Provider","type":"string"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"title":"Updated At"},"usable":{"description":"False when this deployment cannot decrypt the stored key, so no call uses it. It is still listed, because replacing or deleting it is what fixes it.","title":"Usable","type":"boolean"}},"required":["id","organization_id","kind","provider","name","is_org_default","usable","created_at"],"title":"OrgWebSearchKeyPublic","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/organizations/me/web-search-keys/{key_id}/restore":{"post":{"description":"Put an archived key back in use. Organization owners and admins only.","operationId":"web-search-keys-restore_org_web_search_key","parameters":[{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgWebSearchKeyPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Restore Org Web Search Key","tags":["web-search-keys"]}}}}
```

## List Workspace Web Search Keys

> The organization's keys as this workspace sees them, and which of each kind it uses.\
> \
> Any member of the workspace may read it. \`\`is\_effective\`\` is decided across every key, not only this page,\
> and \`\`search\_provider\`\` and \`\`fetch\_provider\`\` say what the workspace's searches and fetches run on.

```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":{"WorkspaceWebSearchKeysPublic":{"properties":{"count":{"description":"Every live key of the organization, not only this page.","title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/WorkspaceWebSearchKeyPublic"},"title":"Data","type":"array"},"fetch_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The provider the workspace's fetch tool runs on, and the enrichment of its search hits unless the search's instance names a fetch instance of its own: its effective fetch key's, else the deployment's default fetch instance's, which is builtin for the built-in fetcher.","title":"Fetch Provider"},"search_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The provider the workspace's searches run on: its effective search key's, else the deployment's default search's. Null when nothing searches for it.","title":"Search Provider"}},"required":["data","count"],"title":"WorkspaceWebSearchKeysPublic","type":"object"},"WorkspaceWebSearchKeyPublic":{"description":"One of the organization's keys, as one workspace sees it.","properties":{"disabled":{"description":"The workspace turned this key off.","title":"Disabled","type":"boolean"},"is_default":{"description":"The workspace pinned this key as its own for its kind.","title":"Is Default","type":"boolean"},"is_effective":{"description":"This is the key the workspace's calls of its kind use.","title":"Is Effective","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"org_web_search_key_id":{"format":"uuid","title":"Org Web Search Key Id","type":"string"},"provider":{"title":"Provider","type":"string"},"usable":{"title":"Usable","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["org_web_search_key_id","workspace_id","kind","provider","name","is_default","disabled","is_effective","usable"],"title":"WorkspaceWebSearchKeyPublic","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-keys":{"get":{"description":"The organization's keys as this workspace sees them, and which of each kind it uses.\n\nAny member of the workspace may read it. ``is_effective`` is decided across every key, not only this page,\nand ``search_provider`` and ``fetch_provider`` say what the workspace's searches and fetches run on.","operationId":"web-search-keys-list_workspace_web_search_keys","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"description":"Number of records to skip","in":"query","name":"skip","required":false,"schema":{"default":0,"description":"Number of records to skip","minimum":0,"title":"Skip","type":"integer"}},{"description":"Maximum number of records to return","in":"query","name":"limit","required":false,"schema":{"default":100,"description":"Maximum number of records to return","maximum":1000,"minimum":1,"title":"Limit","type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchKeysPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"List Workspace Web Search Keys","tags":["web-search-keys"]}}}}
```

## Set Workspace Web Search Key Override

> Pin a key as this workspace's own for its kind, or turn it off for this workspace.\
> \
> Organization owners and admins, or this workspace's owners and admins. Answers with the list's first page.

```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":{"WorkspaceWebSearchKeyOverrideRequest":{"description":"Tri-state: an omitted flag keeps its value.\n\nPinning a key re-enables it and unpins the workspace's other key of its kind, and turning a\nkey off unpins it. Sending both flags true is refused. Both false deletes the override.","properties":{"disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disabled"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"title":"WorkspaceWebSearchKeyOverrideRequest","type":"object"},"WorkspaceWebSearchKeysPublic":{"properties":{"count":{"description":"Every live key of the organization, not only this page.","title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/WorkspaceWebSearchKeyPublic"},"title":"Data","type":"array"},"fetch_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The provider the workspace's fetch tool runs on, and the enrichment of its search hits unless the search's instance names a fetch instance of its own: its effective fetch key's, else the deployment's default fetch instance's, which is builtin for the built-in fetcher.","title":"Fetch Provider"},"search_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The provider the workspace's searches run on: its effective search key's, else the deployment's default search's. Null when nothing searches for it.","title":"Search Provider"}},"required":["data","count"],"title":"WorkspaceWebSearchKeysPublic","type":"object"},"WorkspaceWebSearchKeyPublic":{"description":"One of the organization's keys, as one workspace sees it.","properties":{"disabled":{"description":"The workspace turned this key off.","title":"Disabled","type":"boolean"},"is_default":{"description":"The workspace pinned this key as its own for its kind.","title":"Is Default","type":"boolean"},"is_effective":{"description":"This is the key the workspace's calls of its kind use.","title":"Is Effective","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"org_web_search_key_id":{"format":"uuid","title":"Org Web Search Key Id","type":"string"},"provider":{"title":"Provider","type":"string"},"usable":{"title":"Usable","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["org_web_search_key_id","workspace_id","kind","provider","name","is_default","disabled","is_effective","usable"],"title":"WorkspaceWebSearchKeyPublic","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-keys/{key_id}":{"patch":{"description":"Pin a key as this workspace's own for its kind, or turn it off for this workspace.\n\nOrganization owners and admins, or this workspace's owners and admins. Answers with the list's first page.","operationId":"web-search-keys-set_workspace_web_search_key_override","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchKeyOverrideRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchKeysPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Set Workspace Web Search Key Override","tags":["web-search-keys"]}}}}
```

## Reset Workspace Web Search Key Override

> Return this workspace to inheriting the key. Idempotent. Answers with the list's first page.

```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":{"WorkspaceWebSearchKeysPublic":{"properties":{"count":{"description":"Every live key of the organization, not only this page.","title":"Count","type":"integer"},"data":{"items":{"$ref":"#/components/schemas/WorkspaceWebSearchKeyPublic"},"title":"Data","type":"array"},"fetch_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The provider the workspace's fetch tool runs on, and the enrichment of its search hits unless the search's instance names a fetch instance of its own: its effective fetch key's, else the deployment's default fetch instance's, which is builtin for the built-in fetcher.","title":"Fetch Provider"},"search_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The provider the workspace's searches run on: its effective search key's, else the deployment's default search's. Null when nothing searches for it.","title":"Search Provider"}},"required":["data","count"],"title":"WorkspaceWebSearchKeysPublic","type":"object"},"WorkspaceWebSearchKeyPublic":{"description":"One of the organization's keys, as one workspace sees it.","properties":{"disabled":{"description":"The workspace turned this key off.","title":"Disabled","type":"boolean"},"is_default":{"description":"The workspace pinned this key as its own for its kind.","title":"Is Default","type":"boolean"},"is_effective":{"description":"This is the key the workspace's calls of its kind use.","title":"Is Effective","type":"boolean"},"kind":{"enum":["search","fetch"],"title":"Kind","type":"string"},"last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last4"},"name":{"title":"Name","type":"string"},"org_web_search_key_id":{"format":"uuid","title":"Org Web Search Key Id","type":"string"},"provider":{"title":"Provider","type":"string"},"usable":{"title":"Usable","type":"boolean"},"workspace_id":{"format":"uuid","title":"Workspace Id","type":"string"}},"required":["org_web_search_key_id","workspace_id","kind","provider","name","is_default","disabled","is_effective","usable"],"title":"WorkspaceWebSearchKeyPublic","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-keys/{key_id}":{"delete":{"description":"Return this workspace to inheriting the key. Idempotent. Answers with the list's first page.","operationId":"web-search-keys-reset_workspace_web_search_key_override","parameters":[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace Id","type":"string"}},{"in":"path","name":"key_id","required":true,"schema":{"format":"uuid","title":"Key Id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWebSearchKeysPublic"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"summary":"Reset Workspace Web Search Key Override","tags":["web-search-keys"]}}}}
```


---

# 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/web-search-keys.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.
