{"components":{"schemas":{"common_Collaborator":{"properties":{"email":{"type":"string"},"role":{"$ref":"#/components/schemas/common_Role"}},"required":["email","role"],"title":"Collaborator","type":"object"},"common_CustomMetadataValue":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"format":"date","type":"string"}],"title":"CustomMetadataValue"},"common_ExternalResourceId":{"properties":{"externalResourceId":{"type":"string"},"resourceType":{"$ref":"#/components/schemas/common_ResourceType"}},"required":["externalResourceId","resourceType"],"title":"ExternalResourceId","type":"object"},"common_Operator":{"enum":["<",">","<=",">=","!=","==","contains"],"title":"Operator","type":"string"},"common_ResourceIdentifier":{"discriminator":{"propertyName":"type"},"oneOf":[{"properties":{"externalResourceId":{"type":"string"},"resourceType":{"$ref":"#/components/schemas/common_ResourceType"},"type":{"description":"Discriminator value: external-resource-id","enum":["external-resource-id"],"type":"string"}},"required":["externalResourceId","resourceType","type"],"type":"object"},{"properties":{"type":{"description":"Discriminator value: url","enum":["url"],"type":"string"},"url":{"type":"string"}},"required":["type","url"],"type":"object"}],"title":"ResourceIdentifier"},"common_ResourceType":{"enum":["GOOGLE_DRIVE_ITEM","MICROSOFT_DRIVE_ITEM","ZENDESK_TICKET","ZENDESK_ARTICLE","ZENDESK_GROUP","ZENDESK_ARTICLE_SECTION","ZENDESK_ARTICLE_CATEGORY","CONFLUENCE_PAGE","CONFLUENCE_SPACE","JIRA_TICKET","JIRA_PROJECT","SALESFORCE_TASK","BOX_FILE","BOX_FOLDER","NOTION_PAGE","NOTION_DATABASE","SLACK_CHANNEL","MONGO_COLLECTION_SYNC","UNKNOWN"],"title":"ResourceType","type":"string"},"common_Role":{"enum":["viewer","editor"],"title":"Role","type":"string"},"copilots_CollectionFilteredData":{"properties":{"collectionId":{"format":"uuid","type":"string"},"filteredDataIds":{"items":{"format":"uuid","type":"string"},"type":"array"},"filters":{"items":{"$ref":"#/components/schemas/copilots_Filter"},"type":"array"}},"required":["collectionId","filteredDataIds","filters"],"title":"CollectionFilteredData","type":"object"},"copilots_Configuration":{"properties":{"description":{"type":"string"},"name":{"type":"string"},"prompt":{"type":"string"}},"title":"Configuration","type":"object"},"copilots_CreateConversationResponse":{"properties":{"conversationId":{"format":"uuid","type":"string"}},"required":["conversationId"],"title":"CreateConversationResponse","type":"object"},"copilots_CreateCopilotResponse":{"properties":{"agentId":{"format":"uuid","type":"string"}},"required":["agentId"],"title":"CreateCopilotResponse","type":"object"},"copilots_DataFilter":{"properties":{"filteredDataSourcesPerCollection":{"items":{"$ref":"#/components/schemas/copilots_CollectionFilteredData"},"type":"array"},"semanticSearchTerms":{"items":{"type":"string"},"type":"array"},"webSearchTerm":{"items":{"type":"string"},"type":"array"}},"required":["filteredDataSourcesPerCollection","semanticSearchTerms","webSearchTerm"],"title":"DataFilter","type":"object"},"copilots_DeleteCopilotResponse":{"properties":{"copilotId":{"format":"uuid","type":"string"}},"required":["copilotId"],"title":"DeleteCopilotResponse","type":"object"},"copilots_ErrorChunkData":{"properties":{"message":{"type":"string"}},"required":["message"],"title":"ErrorChunkData","type":"object"},"copilots_ExportCopilotsResponse":{"properties":{"data":{"description":"List of exported copilots matching the query filters.","items":{"$ref":"#/components/schemas/copilots_ExportedCopilot"},"type":"array"},"hasMore":{"description":"Indicates whether there are more results available for pagination.","type":"boolean"},"nextCursor":{"description":"Cursor to use for fetching the next page of results. This is a UUID string. If null or not present, there are no more results.","type":"string"}},"required":["data","hasMore"],"title":"ExportCopilotsResponse","type":"object"},"copilots_ExportedCopilot":{"properties":{"agentCreatedDatetime":{"description":"ISO 8601 timestamp when the copilot was originally created.","format":"date-time","type":"string"},"aiEndpointConfiguration":{"description":"AI endpoint configuration including base URL and authentication details."},"deploymentConfiguration":{"description":"Deployment settings and configuration."},"description":{"description":"The description of the deployed copilot version.","type":"string"},"id":{"description":"The unique identifier of the copilot.","format":"uuid","type":"string"},"inputs":{"description":"Input variable configurations for the copilot."},"isDeployed":{"description":"Indicates if the copilot is currently deployed (always true for export results).","type":"boolean"},"modelConfiguration":{"description":"Model configuration including provider, model name, temperature, and other settings."},"name":{"description":"The name of the deployed copilot version.","type":"string"},"toolConfigurations":{"description":"List of tool configurations available to the copilot."},"versionCreatedDatetime":{"description":"ISO 8601 timestamp when the deployed version was created.","format":"date-time","type":"string"}},"required":["agentCreatedDatetime","aiEndpointConfiguration","deploymentConfiguration","description","id","inputs","isDeployed","modelConfiguration","name","toolConfigurations","versionCreatedDatetime"],"title":"ExportedCopilot","type":"object"},"copilots_FeedbackEnum":{"enum":["POSITIVE","NEGATIVE"],"title":"FeedbackEnum","type":"string"},"copilots_Filter":{"discriminator":{"propertyName":"fieldType"},"oneOf":[{"properties":{"field":{"type":"string"},"fieldType":{"description":"Discriminator value: string","enum":["string"],"type":"string"},"operator":{"$ref":"#/components/schemas/common_Operator"},"value":{"type":"string"}},"required":["field","fieldType","operator","value"],"type":"object"},{"properties":{"field":{"type":"string"},"fieldType":{"description":"Discriminator value: number","enum":["number"],"type":"string"},"operator":{"$ref":"#/components/schemas/common_Operator"},"value":{"type":"integer"}},"required":["field","fieldType","operator","value"],"type":"object"},{"properties":{"field":{"type":"string"},"fieldType":{"description":"Discriminator value: boolean","enum":["boolean"],"type":"string"},"operator":{"enum":["=="],"type":"string"},"value":{"type":"boolean"}},"required":["field","fieldType","operator","value"],"type":"object"},{"properties":{"field":{"type":"string"},"fieldType":{"description":"Discriminator value: datetime","enum":["datetime"],"type":"string"},"operator":{"$ref":"#/components/schemas/common_Operator"},"value":{"format":"date","type":"string"}},"required":["field","fieldType","operator","value"],"type":"object"}],"title":"Filter"},"copilots_InputVariable":{"properties":{"ids":{"items":{"format":"uuid","type":"string"},"type":"array"},"name":{"type":"string"}},"required":["ids","name"],"title":"InputVariable","type":"object"},"copilots_InsertedAuditLog":{"properties":{"id":{"format":"uuid","type":"string"}},"required":["id"],"title":"InsertedAuditLog","type":"object"},"copilots_MessageFeedback":{"properties":{"descriptiveFeedback":{"type":"string"},"feedback":{"$ref":"#/components/schemas/copilots_FeedbackEnum"},"suggestedAnswer":{"type":"string"}},"required":["feedback"],"title":"MessageFeedback","type":"object"},"copilots_ReferencedSource":{"properties":{"externalResourceId":{"$ref":"#/components/schemas/common_ExternalResourceId"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["externalResourceId","id","name"],"title":"ReferencedSource","type":"object"},"copilots_ResponseChunk":{"properties":{"dataChunk":{"type":"string"},"message":{"type":"string"},"structuredOutput":{"description":"Any type"}},"required":["dataChunk","message"],"title":"ResponseChunk","type":"object"},"copilots_SendAgentMessageResponse":{"properties":{"sendChatResult":{"$ref":"#/components/schemas/copilots_SendMessageResponse"}},"required":["sendChatResult"],"title":"SendAgentMessageResponse","type":"object"},"copilots_SendMessageResponse":{"discriminator":{"propertyName":"type"},"oneOf":[{"description":"Returned when there is a reply\nfetched from the agent.","properties":{"conversationId":{"format":"uuid","type":"string"},"inserted_audit_log":{"$ref":"#/components/schemas/copilots_InsertedAuditLog"},"messageId":{"format":"uuid","type":"string"},"referencedSources":{"items":{"$ref":"#/components/schemas/copilots_ReferencedSource"},"type":"array"},"response":{"$ref":"#/components/schemas/copilots_ResponseChunk"},"sourcesInDataContext":{"items":{"$ref":"#/components/schemas/copilots_ReferencedSource"},"type":"array"},"type":{"description":"Discriminator value: ai_response_result","enum":["ai_response_result"],"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"},"webSearchResults":{"items":{"$ref":"#/components/schemas/copilots_WebSearchResult"},"type":"array"}},"required":["conversationId","inserted_audit_log","messageId","referencedSources","response","sourcesInDataContext","type","warnings","webSearchResults"],"type":"object"},{"description":"Returned when Credal detects possible\ninfosec violations and blocks the message.","properties":{"blocks":{"items":{"type":"string"},"type":"array"},"conversationId":{"format":"uuid","type":"string"},"inserted_audit_log":{"$ref":"#/components/schemas/copilots_InsertedAuditLog"},"type":{"description":"Discriminator value: blocked_result","enum":["blocked_result"],"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["blocks","conversationId","inserted_audit_log","type","warnings"],"type":"object"}],"title":"SendMessageResponse"},"copilots_StreamingChunk":{"discriminator":{"propertyName":"event"},"oneOf":[{"properties":{"conversationId":{"type":"string"},"dataFilters":{"$ref":"#/components/schemas/copilots_DataFilter"},"event":{"description":"Discriminator value: initial","enum":["initial"],"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"},"webSearchResults":{"items":{"$ref":"#/components/schemas/copilots_WebSearchResult"},"type":"array"}},"required":["conversationId","event","warnings","webSearchResults"],"type":"object"},{"properties":{"chunk":{"type":"string"},"event":{"description":"Discriminator value: data_chunk","enum":["data_chunk"],"type":"string"}},"required":["chunk","event"],"type":"object"},{"properties":{"event":{"description":"Discriminator value: end_of_message","enum":["end_of_message"],"type":"string"}},"required":["event"],"type":"object"},{"properties":{"event":{"description":"Discriminator value: final_chunk","enum":["final_chunk"],"type":"string"},"sources":{"items":{"$ref":"#/components/schemas/copilots_ReferencedSource"},"type":"array"}},"required":["event","sources"],"type":"object"},{"properties":{"blocks":{"items":{"type":"string"},"type":"array"},"conversationId":{"format":"uuid","type":"string"},"event":{"description":"Discriminator value: blocked","enum":["blocked"],"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["blocks","conversationId","event","warnings"],"type":"object"},{"properties":{"error":{"$ref":"#/components/schemas/copilots_ErrorChunkData"},"event":{"description":"Discriminator value: error_chunk","enum":["error_chunk"],"type":"string"}},"required":["error","event"],"type":"object"}],"title":"StreamingChunk"},"copilots_WebSearchResult":{"properties":{"contents":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["contents","title","url"],"title":"WebSearchResult","type":"object"},"documentCatalog_DocumentMetadataPatch":{"properties":{"metadata":{"additionalProperties":{"description":"Any type"},"description":"Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to `null` to effectively remove","type":"object"},"resourceIdentifier":{"$ref":"#/components/schemas/common_ResourceIdentifier","description":"The identifier for the resource you want to patch"}},"required":["metadata","resourceIdentifier"],"title":"DocumentMetadataPatch","type":"object"},"documentCatalog_DocumentMetadataPatchRequest":{"properties":{"sources":{"items":{"$ref":"#/components/schemas/documentCatalog_DocumentMetadataPatch"},"type":"array"},"uploadAsUserEmail":{"type":"string"}},"required":["sources","uploadAsUserEmail"],"title":"DocumentMetadataPatchRequest","type":"object"},"documentCatalog_SyncSourceByUrlRequest":{"properties":{"sourceUrl":{"type":"string"},"uploadAsUserEmail":{"type":"string"}},"required":["sourceUrl","uploadAsUserEmail"],"title":"SyncSourceByUrlRequest","type":"object"},"documentCatalog_SyncSourceByUrlResponse":{"properties":{"sourceId":{"format":"uuid","type":"string"}},"required":["sourceId"],"title":"SyncSourceByUrlResponse","type":"object"},"documentCatalog_UploadDocumentResponse":{"properties":{"documentId":{"format":"uuid","type":"string"}},"required":["documentId"],"title":"UploadDocumentResponse","type":"object"},"documentCollections_CreateCollectionResponse":{"properties":{"collectionId":{"format":"uuid","type":"string"}},"required":["collectionId"],"title":"CreateCollectionResponse","type":"object"},"documentCollections_DeleteCollectionResponse":{"properties":{"collectionId":{"format":"uuid","type":"string"}},"required":["collectionId"],"title":"DeleteCollectionResponse","type":"object"},"documentCollections_ListDocumentsInCollectionResponse":{"properties":{"resourceIdentifiers":{"items":{"$ref":"#/components/schemas/common_ResourceIdentifier"},"type":"array"}},"required":["resourceIdentifiers"],"title":"ListDocumentsInCollectionResponse","type":"object"},"documentCollections_MongoCollectionSyncConfig":{"properties":{"collectionName":{"type":"string"},"filterExpression":{"description":"Any type"},"sourceFields":{"$ref":"#/components/schemas/documentCollections_MongoSourceFieldsConfig"},"syncName":{"type":"string"}},"required":["collectionName","filterExpression","sourceFields","syncName"],"title":"MongoCollectionSyncConfig","type":"object"},"documentCollections_MongoCollectionSyncResponse":{"properties":{"mongoCredentialId":{"format":"uuid","type":"string"},"resourceId":{"type":"string"},"syncLaunched":{"type":"boolean"}},"required":["mongoCredentialId","resourceId","syncLaunched"],"title":"MongoCollectionSyncResponse","type":"object"},"documentCollections_MongoSourceFieldsConfig":{"properties":{"body":{"type":"string"},"sourceName":{"type":"string"},"sourceSystemUpdated":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["body","sourceName"],"title":"MongoSourceFieldsConfig","type":"object"},"search_DocumentCollectionSearchOptions":{"properties":{"enableQueryExtraction":{"description":"/ Whether to extract search terms from the user query and use them for semantic search. Defaults to false.","type":"boolean"},"enableReranking":{"description":"Whether to rerank the search results after the initial semantic search query. Defaults to false.","type":"boolean"},"enableSmartFiltering":{"description":"Whether to automatically filter the search results based on the user query and available metadata on the collection. Defaults to false.","type":"boolean"},"maxChunks":{"description":"The maximum number of chunks to return. Defaults to 10.","type":"integer"},"mergeContents":{"description":"Whether to merge the chunks for a document and just return one result per document. Defaults to false.","type":"boolean"},"threshold":{"description":"The similarity threshold between 0 and 1 for the search results. A higher number leads to fewer but more relevant results. \nDefaults to 0.45.","format":"double","type":"number"}},"title":"DocumentCollectionSearchOptions","type":"object"},"search_DocumentCollectionSearchResult":{"properties":{"chunks":{"items":{"$ref":"#/components/schemas/search_SearchResultChunk"},"type":"array"},"documentExternalId":{"type":"string"},"documentId":{"format":"uuid","type":"string"},"documentMetadata":{"additionalProperties":{"type":"string"},"type":"object"},"documentName":{"type":"string"},"documentUrl":{"type":"string"},"mergedContents":{"type":"string"}},"required":["chunks","documentExternalId","documentId","documentMetadata","documentName","documentUrl"],"title":"DocumentCollectionSearchResult","type":"object"},"search_SearchDocumentCollectionResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/search_DocumentCollectionSearchResult"},"type":"array"},"searchId":{"format":"uuid","type":"string"},"searchTermsUsed":{"items":{"type":"string"},"type":"array"},"structuredFiltersApplied":{"items":{"$ref":"#/components/schemas/search_SingleFieldFilter"},"type":"array"}},"required":["results","searchId","searchTermsUsed","structuredFiltersApplied"],"title":"SearchDocumentCollectionResponse","type":"object"},"search_SearchResultChunk":{"properties":{"chunkId":{"format":"uuid","type":"string"},"chunkIndex":{"type":"integer"},"score":{"description":"The similarity score between 0 and 1 for the search result. A higher number means the chunk is more relevant to the search query.","format":"double","type":"number"},"text":{"type":"string"}},"required":["chunkId","chunkIndex","score","text"],"title":"SearchResultChunk","type":"object"},"search_SingleFieldFilter":{"properties":{"field":{"type":"string"},"operator":{"$ref":"#/components/schemas/common_Operator"},"value":{"type":"string"}},"required":["field","operator","value"],"title":"SingleFieldFilter","type":"object"},"users_UserMetadataPatch":{"properties":{"metadata":{"additionalProperties":{"description":"Any type"},"description":"Key-value object of metadata for user. Keys will be merged with any existing values but can also be set to `null` to effectively remove","type":"object"},"userEmail":{"type":"string"}},"required":["metadata","userEmail"],"title":"UserMetadataPatch","type":"object"}},"securitySchemes":{"BearerAuthScheme":{"scheme":"bearer","type":"http"}}},"info":{"title":"API Reference","version":"1.0.0"},"openapi":"3.1.0","paths":{"/v0/catalog/metadata":{"patch":{"description":"Bulk patch metadata for documents, synced natively by Credal or manual API uploads","operationId":"documentCatalog_metadata","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCatalog_DocumentMetadataPatchRequest"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Metadata","tags":["documentCatalog"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.credal.ai/api/v0/catalog/metadata\");\nrequest.Content = new StringContent(\"{\\\"sources\\\":[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"resourceIdentifier\\\":{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}}],\\\"uploadAsUserEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.credal.ai/api/v0/catalog/metadata' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"sources\":[{\"metadata\":{\"additionalProp1\":null},\"resourceIdentifier\":{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}}],\"uploadAsUserEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"sources\":[{\"metadata\":{\"additionalProp1\":null},\"resourceIdentifier\":{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}}],\"uploadAsUserEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.credal.ai/api/v0/catalog/metadata\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/catalog/metadata\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"sources\\\":[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"resourceIdentifier\\\":{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}}],\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/metadata', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"sources\":[{\"metadata\":{\"additionalProp1\":null},\"resourceIdentifier\":{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}}],\"uploadAsUserEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/metadata', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"sources\\\":[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"resourceIdentifier\\\":{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}}],\\\"uploadAsUserEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/catalog/metadata\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"sources\\\":[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"resourceIdentifier\\\":{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}}],\\\"uploadAsUserEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.credal.ai/api/v0/catalog/metadata\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"sources\":[{\"metadata\":{\"additionalProp1\":null},\"resourceIdentifier\":{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}}],\"uploadAsUserEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/catalog/metadata\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"sources\\\":[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"resourceIdentifier\\\":{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}}],\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/catalog/syncSourceByUrl":{"post":{"description":"Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.","operationId":"documentCatalog_syncSourceByUrl","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCatalog_SyncSourceByUrlRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCatalog_SyncSourceByUrlResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Sync Source By Url","tags":["documentCatalog"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/catalog/syncSourceByUrl\");\nrequest.Content = new StringContent(\"{\\\"sourceUrl\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/catalog/syncSourceByUrl' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"sourceUrl\":\"string\",\"uploadAsUserEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"sourceUrl\":\"string\",\"uploadAsUserEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/catalog/syncSourceByUrl\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/catalog/syncSourceByUrl\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"sourceUrl\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/syncSourceByUrl', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"sourceUrl\":\"string\",\"uploadAsUserEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/syncSourceByUrl', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"sourceUrl\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/catalog/syncSourceByUrl\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"sourceUrl\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/catalog/syncSourceByUrl\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"sourceUrl\":\"string\",\"uploadAsUserEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/catalog/syncSourceByUrl\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"sourceUrl\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/catalog/uploadDocumentContents":{"post":{"operationId":"documentCatalog_uploadDocumentContents","requestBody":{"content":{"application/json":{"schema":{"properties":{"allowedUsersEmailAddresses":{"description":"Users allowed to access the document. Unlike Credal's out of the box connectors which reconcile various permissions models from 3rd party software, for custom uploads the caller is responsible for specifying who can access the document and currently flattening groups if applicable. Documents can also be marked as internal public.","items":{"type":"string"},"type":"array"},"awaitVectorStoreSync":{"description":"Document uploads are eventually consistent by default. If specified `true` the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns.","type":"boolean"},"collectionId":{"description":"If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter.","type":"string"},"customMetadata":{"additionalProperties":{"$ref":"#/components/schemas/common_CustomMetadataValue"},"description":"Optional JSON representing any custom metadata for this document","type":"object"},"documentContents":{"description":"The full LLM-formatted text contents of the document you want to upload.","type":"string"},"documentExternalId":{"description":"The external ID of the document. This is typically the ID as it exists in its original external system. Uploads to the same external ID will update the document in Credal.","type":"string"},"documentExternalUrl":{"description":"The external URL of the document you want to upload. If provided Credal will link to this URL.","type":"string"},"documentName":{"description":"The name of the document you want to upload.","type":"string"},"forceUpdate":{"description":"If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal","type":"boolean"},"internalPublic":{"description":"If specified, document will be accessible to everyone within the organization of the uploader","type":"boolean"},"uploadAsUserEmail":{"description":"[Legacy] The user on behalf of whom the document should be uploaded. In most cases, this can simply be the email of the developer making the API call. This field will be removed in the future in favor of purely specifying permissions via allowedUsersEmailAddresses.","type":"string"}},"required":["allowedUsersEmailAddresses","documentContents","documentExternalId","documentName","uploadAsUserEmail"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCatalog_UploadDocumentResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Upload Document Contents","tags":["documentCatalog"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/catalog/uploadDocumentContents\");\nrequest.Content = new StringContent(\"{\\\"allowedUsersEmailAddresses\\\":[\\\"string\\\"],\\\"awaitVectorStoreSync\\\":true,\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"documentContents\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"forceUpdate\\\":true,\\\"internalPublic\\\":true,\\\"uploadAsUserEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/catalog/uploadDocumentContents' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"allowedUsersEmailAddresses\":[\"string\"],\"awaitVectorStoreSync\":true,\"collectionId\":\"string\",\"customMetadata\":{\"additionalProp1\":\"string\"},\"documentContents\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"forceUpdate\":true,\"internalPublic\":true,\"uploadAsUserEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"allowedUsersEmailAddresses\":[\"string\"],\"awaitVectorStoreSync\":true,\"collectionId\":\"string\",\"customMetadata\":{\"additionalProp1\":\"string\"},\"documentContents\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"forceUpdate\":true,\"internalPublic\":true,\"uploadAsUserEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/catalog/uploadDocumentContents\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/catalog/uploadDocumentContents\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"allowedUsersEmailAddresses\\\":[\\\"string\\\"],\\\"awaitVectorStoreSync\\\":true,\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"documentContents\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"forceUpdate\\\":true,\\\"internalPublic\\\":true,\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/uploadDocumentContents', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"allowedUsersEmailAddresses\":[\"string\"],\"awaitVectorStoreSync\":true,\"collectionId\":\"string\",\"customMetadata\":{\"additionalProp1\":\"string\"},\"documentContents\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"forceUpdate\":true,\"internalPublic\":true,\"uploadAsUserEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/uploadDocumentContents', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"allowedUsersEmailAddresses\\\":[\\\"string\\\"],\\\"awaitVectorStoreSync\\\":true,\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"documentContents\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"forceUpdate\\\":true,\\\"internalPublic\\\":true,\\\"uploadAsUserEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/catalog/uploadDocumentContents\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"allowedUsersEmailAddresses\\\":[\\\"string\\\"],\\\"awaitVectorStoreSync\\\":true,\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"documentContents\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"forceUpdate\\\":true,\\\"internalPublic\\\":true,\\\"uploadAsUserEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/catalog/uploadDocumentContents\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"allowedUsersEmailAddresses\":[\"string\"],\"awaitVectorStoreSync\":true,\"collectionId\":\"string\",\"customMetadata\":{\"additionalProp1\":\"string\"},\"documentContents\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"forceUpdate\":true,\"internalPublic\":true,\"uploadAsUserEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/catalog/uploadDocumentContents\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"allowedUsersEmailAddresses\\\":[\\\"string\\\"],\\\"awaitVectorStoreSync\\\":true,\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":{\\\"additionalProp1\\\":\\\"string\\\"},\\\"documentContents\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"forceUpdate\\\":true,\\\"internalPublic\\\":true,\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/catalog/uploadFile":{"post":{"description":"Upload a file (PDF, Word, Excel, CSV, PowerPoint) to Credal. Unlike uploadDocumentContents which requires pre-parsed text, this endpoint accepts actual file uploads and automatically parses them using Credal's parsing service.","operationId":"documentCatalog_uploadFile","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"allowedUsersEmailAddresses":{"description":"Users allowed to access the document. Can be provided as a JSON array string (e.g., [\"user1@example.com\",\"user2@example.com\"]) or comma-separated list (e.g., \"user1@example.com,user2@example.com\"). Unlike Credal's out of the box connectors which reconcile various permissions models from 3rd party software, for custom uploads the caller is responsible for specifying who can access the document and currently flattening groups if applicable. Documents can also be marked as internal public.","type":"string"},"awaitVectorStoreSync":{"description":"Document uploads are eventually consistent by default. If set to \"true\" the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns.","type":"string"},"collectionId":{"description":"If specified, the document will also be added to the provided document collection. This operation is eventually consistent, meaning the document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To achieve strong consistency use the `awaitVectorStoreSync` parameter.","type":"string"},"customMetadata":{"description":"Optional JSON string representing any custom metadata for this document (e.g., '{\"key1\":\"value1\",\"key2\":\"value2\"}').","type":"string"},"documentExternalId":{"description":"The external ID of the document. This is typically the ID as it exists in its original external system. Uploads to the same external ID will update the document in Credal.","type":"string"},"documentExternalUrl":{"description":"The external URL of the document you want to upload. If provided Credal will link to this URL.","type":"string"},"documentName":{"description":"The name of the document you want to upload. If not provided, the original filename will be used.","type":"string"},"file":{"description":"The file to upload. Supported formats: PDF (.pdf), Word (.docx), Excel (.xlsx, .xls), PowerPoint (.pptx, .ppt), CSV (.csv), and text files.","format":"binary","type":"string"},"forceUpdate":{"description":"If set to \"true\", document contents will be re-uploaded and re-embedded even if the document already exists in Credal.","type":"string"},"internalPublic":{"description":"If set to \"true\", document will be accessible to everyone within the organization of the uploader.","type":"string"},"sourceSystemUpdated":{"description":"ISO 8601 date string indicating when the document was last updated in the source system (e.g., \"2025-11-03T21:15:00Z\").","type":"string"},"uploadAsUserEmail":{"description":"[Legacy] The user on behalf of whom the document should be uploaded. In most cases, this can simply be the email of the developer making the API call. This field will be removed in the future in favor of purely specifying permissions via allowedUsersEmailAddresses.","type":"string"}},"required":["documentExternalId","file","uploadAsUserEmail"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCatalog_UploadDocumentResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Upload File","tags":["documentCatalog"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/catalog/uploadFile\");\nrequest.Content = new StringContent(\"{\\\"allowedUsersEmailAddresses\\\":\\\"string\\\",\\\"awaitVectorStoreSync\\\":\\\"string\\\",\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"file\\\":\\\"binary\\\",\\\"forceUpdate\\\":\\\"string\\\",\\\"internalPublic\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/catalog/uploadFile' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"allowedUsersEmailAddresses\":\"string\",\"awaitVectorStoreSync\":\"string\",\"collectionId\":\"string\",\"customMetadata\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"file\":\"binary\",\"forceUpdate\":\"string\",\"internalPublic\":\"string\",\"sourceSystemUpdated\":\"string\",\"uploadAsUserEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"allowedUsersEmailAddresses\":\"string\",\"awaitVectorStoreSync\":\"string\",\"collectionId\":\"string\",\"customMetadata\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"file\":\"binary\",\"forceUpdate\":\"string\",\"internalPublic\":\"string\",\"sourceSystemUpdated\":\"string\",\"uploadAsUserEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/catalog/uploadFile\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/catalog/uploadFile\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"allowedUsersEmailAddresses\\\":\\\"string\\\",\\\"awaitVectorStoreSync\\\":\\\"string\\\",\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"file\\\":\\\"binary\\\",\\\"forceUpdate\\\":\\\"string\\\",\\\"internalPublic\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/uploadFile', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"allowedUsersEmailAddresses\":\"string\",\"awaitVectorStoreSync\":\"string\",\"collectionId\":\"string\",\"customMetadata\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"file\":\"binary\",\"forceUpdate\":\"string\",\"internalPublic\":\"string\",\"sourceSystemUpdated\":\"string\",\"uploadAsUserEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/catalog/uploadFile', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"allowedUsersEmailAddresses\\\":\\\"string\\\",\\\"awaitVectorStoreSync\\\":\\\"string\\\",\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"file\\\":\\\"binary\\\",\\\"forceUpdate\\\":\\\"string\\\",\\\"internalPublic\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/catalog/uploadFile\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"allowedUsersEmailAddresses\\\":\\\"string\\\",\\\"awaitVectorStoreSync\\\":\\\"string\\\",\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"file\\\":\\\"binary\\\",\\\"forceUpdate\\\":\\\"string\\\",\\\"internalPublic\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/catalog/uploadFile\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"allowedUsersEmailAddresses\":\"string\",\"awaitVectorStoreSync\":\"string\",\"collectionId\":\"string\",\"customMetadata\":\"string\",\"documentExternalId\":\"string\",\"documentExternalUrl\":\"string\",\"documentName\":\"string\",\"file\":\"binary\",\"forceUpdate\":\"string\",\"internalPublic\":\"string\",\"sourceSystemUpdated\":\"string\",\"uploadAsUserEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/catalog/uploadFile\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"allowedUsersEmailAddresses\\\":\\\"string\\\",\\\"awaitVectorStoreSync\\\":\\\"string\\\",\\\"collectionId\\\":\\\"string\\\",\\\"customMetadata\\\":\\\"string\\\",\\\"documentExternalId\\\":\\\"string\\\",\\\"documentExternalUrl\\\":\\\"string\\\",\\\"documentName\\\":\\\"string\\\",\\\"file\\\":\\\"binary\\\",\\\"forceUpdate\\\":\\\"string\\\",\\\"internalPublic\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"uploadAsUserEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/addCollectionToCopilot":{"post":{"description":"Link a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.","operationId":"copilots_addCollectionToCopilot","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"description":"Credal-generated collection ID to add.","format":"uuid","type":"string"},"copilotId":{"description":"Credal-generated Agent ID to add the collection to.","format":"uuid","type":"string"}},"required":["collectionId","copilotId"],"type":"object"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Add Collection To Copilot","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/addCollectionToCopilot\");\nrequest.Content = new StringContent(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/addCollectionToCopilot' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/addCollectionToCopilot\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/addCollectionToCopilot\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/addCollectionToCopilot', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/addCollectionToCopilot', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/addCollectionToCopilot\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/addCollectionToCopilot\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/addCollectionToCopilot\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/createConversation":{"post":{"description":"OPTIONAL. Create a new conversation with the Agent. The conversation ID can be used in the `sendMessage` endpoint. The `sendMessage` endpoint automatically creates new conversations upon first request, but calling this endpoint can simplify certain use cases where it is helpful for the application to have the conversation ID before the first message is sent.","operationId":"copilots_createConversation","requestBody":{"content":{"application/json":{"schema":{"properties":{"agentId":{"description":"Credal-generated Agent ID to specify which agent to route the request to.","format":"uuid","type":"string"},"userEmail":{"description":"End-user for the conversation.","type":"string"}},"required":["agentId","userEmail"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/copilots_CreateConversationResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Create Conversation","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/createConversation\");\nrequest.Content = new StringContent(\"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/createConversation' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/createConversation\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/createConversation\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/createConversation', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/createConversation', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/createConversation\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/createConversation\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/createConversation\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/createCopilot":{"post":{"description":"Create a new agent. The API key used will be added to the agent for future Requests","operationId":"copilots_createCopilot","requestBody":{"content":{"application/json":{"schema":{"properties":{"collaborators":{"description":"A list of collaborator emails and roles that will have access to the agent.","items":{"$ref":"#/components/schemas/common_Collaborator"},"type":"array"},"description":{"description":"An in depth name for the agent's function. Useful for routing requests to the right agent.","type":"string"},"name":{"description":"A descriptive name for the agent.","type":"string"}},"required":["collaborators","description","name"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/copilots_CreateCopilotResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Create Copilot","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/createCopilot\");\nrequest.Content = new StringContent(\"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/createCopilot' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/createCopilot\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/createCopilot\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/createCopilot', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/createCopilot', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/createCopilot\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/createCopilot\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/createCopilot\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/deleteCopilot":{"delete":{"operationId":"copilots_deleteCopilot","requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"Copilot ID","format":"uuid","type":"string"}},"required":["id"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/copilots_DeleteCopilotResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Delete Copilot","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.credal.ai/api/v0/copilots/deleteCopilot\");\nrequest.Content = new StringContent(\"{\\\"id\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.credal.ai/api/v0/copilots/deleteCopilot' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"id\":\"00000000-0000-0000-0000-000000000000\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"id\":\"00000000-0000-0000-0000-000000000000\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.credal.ai/api/v0/copilots/deleteCopilot\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/deleteCopilot\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"DELETE\", HttpRequest.BodyPublishers.ofString(\"{\\\"id\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/deleteCopilot', {\n  method: 'DELETE',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"id\":\"00000000-0000-0000-0000-000000000000\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/deleteCopilot', { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"id\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/deleteCopilot\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"id\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://api.credal.ai/api/v0/copilots/deleteCopilot\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"id\":\"00000000-0000-0000-0000-000000000000\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/deleteCopilot\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"id\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/export":{"post":{"description":"Export copilot configurations for backup or migration purposes.\n\n**IMPORTANT**: This endpoint requires:\n- Admin privileges\n- The 'ai-usage-analytics-log.export' scope on the API key\n\nReturns all deployed copilots with their full configuration including model settings, tools, and deployment details. Optional date filters can be applied to narrow down results.","operationId":"copilots_export","requestBody":{"content":{"application/json":{"schema":{"properties":{"agentCreatedFrom":{"description":"Filter copilots created on or after this datetime (ISO 8601 format).","format":"date-time","type":"string"},"agentCreatedTo":{"description":"Filter copilots created before or on this datetime (ISO 8601 format).","format":"date-time","type":"string"},"cursor":{"description":"Cursor for pagination. Use the cursor returned in the previous response to fetch the next page of results. If not provided, returns the first page.","type":"string"},"limit":{"description":"Maximum number of copilots to return. Must be a positive integer with a maximum value of 1000. Defaults to 100.","type":"integer"},"versionCreatedFrom":{"description":"Filter copilot versions created on or after this datetime (ISO 8601 format).","format":"date-time","type":"string"},"versionCreatedTo":{"description":"Filter copilot versions created before or on this datetime (ISO 8601 format).","format":"date-time","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/copilots_ExportCopilotsResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Export","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/export\");\nrequest.Content = new StringContent(\"{\\\"agentCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"agentCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"cursor\\\":\\\"string\\\",\\\"limit\\\":0,\\\"versionCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"versionCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/export' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"agentCreatedFrom\":\"2026-06-09T00:00:00Z\",\"agentCreatedTo\":\"2026-06-09T00:00:00Z\",\"cursor\":\"string\",\"limit\":0,\"versionCreatedFrom\":\"2026-06-09T00:00:00Z\",\"versionCreatedTo\":\"2026-06-09T00:00:00Z\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"agentCreatedFrom\":\"2026-06-09T00:00:00Z\",\"agentCreatedTo\":\"2026-06-09T00:00:00Z\",\"cursor\":\"string\",\"limit\":0,\"versionCreatedFrom\":\"2026-06-09T00:00:00Z\",\"versionCreatedTo\":\"2026-06-09T00:00:00Z\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/export\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/export\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"agentCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"agentCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"cursor\\\":\\\"string\\\",\\\"limit\\\":0,\\\"versionCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"versionCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/export', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"agentCreatedFrom\":\"2026-06-09T00:00:00Z\",\"agentCreatedTo\":\"2026-06-09T00:00:00Z\",\"cursor\":\"string\",\"limit\":0,\"versionCreatedFrom\":\"2026-06-09T00:00:00Z\",\"versionCreatedTo\":\"2026-06-09T00:00:00Z\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/export', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"agentCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"agentCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"cursor\\\":\\\"string\\\",\\\"limit\\\":0,\\\"versionCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"versionCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/export\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"agentCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"agentCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"cursor\\\":\\\"string\\\",\\\"limit\\\":0,\\\"versionCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"versionCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/export\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"agentCreatedFrom\":\"2026-06-09T00:00:00Z\",\"agentCreatedTo\":\"2026-06-09T00:00:00Z\",\"cursor\":\"string\",\"limit\":0,\"versionCreatedFrom\":\"2026-06-09T00:00:00Z\",\"versionCreatedTo\":\"2026-06-09T00:00:00Z\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/export\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"agentCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"agentCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"cursor\\\":\\\"string\\\",\\\"limit\\\":0,\\\"versionCreatedFrom\\\":\\\"2026-06-09T00:00:00Z\\\",\\\"versionCreatedTo\\\":\\\"2026-06-09T00:00:00Z\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/provideMessageFeedback":{"post":{"operationId":"copilots_provideMessageFeedback","requestBody":{"content":{"application/json":{"schema":{"properties":{"agentId":{"description":"Credal-generated Agent ID to specify which agent to route the request to.","format":"uuid","type":"string"},"messageFeedback":{"$ref":"#/components/schemas/copilots_MessageFeedback","description":"The feedback provided by the user."},"messageId":{"description":"The message ID for which feedback is being provided.","format":"uuid","type":"string"},"userEmail":{"description":"The user profile you want to use when providing feedback.","type":"string"}},"required":["agentId","messageFeedback","messageId","userEmail"],"type":"object"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Provide Message Feedback","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/provideMessageFeedback\");\nrequest.Content = new StringContent(\"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"messageFeedback\\\":{\\\"descriptiveFeedback\\\":\\\"string\\\",\\\"feedback\\\":\\\"NEGATIVE\\\",\\\"suggestedAnswer\\\":\\\"string\\\"},\\\"messageId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/provideMessageFeedback' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"messageFeedback\":{\"descriptiveFeedback\":\"string\",\"feedback\":\"NEGATIVE\",\"suggestedAnswer\":\"string\"},\"messageId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"messageFeedback\":{\"descriptiveFeedback\":\"string\",\"feedback\":\"NEGATIVE\",\"suggestedAnswer\":\"string\"},\"messageId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/provideMessageFeedback\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/provideMessageFeedback\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"messageFeedback\\\":{\\\"descriptiveFeedback\\\":\\\"string\\\",\\\"feedback\\\":\\\"NEGATIVE\\\",\\\"suggestedAnswer\\\":\\\"string\\\"},\\\"messageId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/provideMessageFeedback', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"messageFeedback\":{\"descriptiveFeedback\":\"string\",\"feedback\":\"NEGATIVE\",\"suggestedAnswer\":\"string\"},\"messageId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/provideMessageFeedback', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"messageFeedback\\\":{\\\"descriptiveFeedback\\\":\\\"string\\\",\\\"feedback\\\":\\\"NEGATIVE\\\",\\\"suggestedAnswer\\\":\\\"string\\\"},\\\"messageId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/provideMessageFeedback\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"messageFeedback\\\":{\\\"descriptiveFeedback\\\":\\\"string\\\",\\\"feedback\\\":\\\"NEGATIVE\\\",\\\"suggestedAnswer\\\":\\\"string\\\"},\\\"messageId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/provideMessageFeedback\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"messageFeedback\":{\"descriptiveFeedback\":\"string\",\"feedback\":\"NEGATIVE\",\"suggestedAnswer\":\"string\"},\"messageId\":\"00000000-0000-0000-0000-000000000000\",\"userEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/provideMessageFeedback\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"messageFeedback\\\":{\\\"descriptiveFeedback\\\":\\\"string\\\",\\\"feedback\\\":\\\"NEGATIVE\\\",\\\"suggestedAnswer\\\":\\\"string\\\"},\\\"messageId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"userEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/removeCollectionFromCopilot":{"post":{"description":"Unlink a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.","operationId":"copilots_removeCollectionFromCopilot","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"description":"Credal-generated collection ID to add.","format":"uuid","type":"string"},"copilotId":{"description":"Credal-generated agent ID to add the collection to.","format":"uuid","type":"string"}},"required":["collectionId","copilotId"],"type":"object"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Remove Collection From Copilot","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot\");\nrequest.Content = new StringContent(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/removeCollectionFromCopilot\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/sendMessage":{"post":{"deprecated":true,"description":"**Deprecated.** Use the [v1 Agents API](/api-reference/v-1/api-reference/agents) instead: send a message with `POST /v1/agents/sendMessage`, then poll for the response with `GET /v1/agents/fetchAgentResponse`.","operationId":"copilots_sendMessage","requestBody":{"content":{"application/json":{"schema":{"properties":{"agentId":{"description":"Credal-generated Agent ID to specify which agent to route the request to.","format":"uuid","type":"string"},"conversationId":{"description":"Credal-generated conversation ID for sending follow up messages. Conversation ID is returned after initial message. Optional, to be left off for first messages on new conversations.","format":"uuid","type":"string"},"inputVariables":{"description":"Optional input variables to be used in the message. Map the name of the variable to a list of urls.","items":{"$ref":"#/components/schemas/copilots_InputVariable"},"type":"array"},"message":{"description":"The message you want to send to your agent.","type":"string"},"userEmail":{"description":"The user profile you want to use when sending the message.","type":"string"}},"required":["agentId","message","userEmail"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/copilots_SendAgentMessageResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Send Message","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/sendMessage\");\nrequest.Content = new StringContent(\"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\",\\\"userEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/sendMessage' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\",\"userEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\",\"userEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/sendMessage\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/sendMessage\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\",\\\"userEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/sendMessage', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\",\"userEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/sendMessage', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\",\\\"userEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/sendMessage\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\",\\\"userEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/sendMessage\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"agentId\":\"00000000-0000-0000-0000-000000000000\",\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\",\"userEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/sendMessage\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"agentId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\",\\\"userEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/streamMessage":{"post":{"deprecated":true,"description":"**Deprecated.** Use the [v1 Agents API](/api-reference/v-1/api-reference/agents) instead: send a message with `POST /v1/agents/sendMessage`, then poll for the response with `GET /v1/agents/fetchAgentResponse`.\n\nPreviously, this endpoint streamed a response back as Server-Sent Events.","operationId":"copilots_streamMessage","requestBody":{"content":{"application/json":{"schema":{"properties":{"conversationId":{"description":"Credal-generated conversation ID for sending follow up messages. Conversation ID is returned after initial message. Optional, to be left off for first messages on new conversations.","format":"uuid","type":"string"},"copilotId":{"description":"Credal-generated Agent ID to specify which agent to route the request to.","format":"uuid","type":"string"},"email":{"description":"The user profile you want to use when sending the message.","type":"string"},"inputVariables":{"description":"Optional input variables to be used in the message. Map the name of the variable to a list of urls.","items":{"$ref":"#/components/schemas/copilots_InputVariable"},"type":"array"},"message":{"description":"The message you want to send to your agent.","type":"string"}},"required":["copilotId","email","message"],"type":"object"}}}},"responses":{"200":{"content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/copilots_StreamingChunk"}}},"description":"This endpoint returns a stream of server sent events. These can be in two formats - one is an initial event, followed by multiple data chunks, followed by a final chunk, or the other format is just one blocked event. See the examples for more details."}},"security":[{"BearerAuthScheme":[]}],"summary":"Stream Message","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/streamMessage\");\nrequest.Content = new StringContent(\"{\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"string\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/streamMessage' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"string\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"string\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/streamMessage\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/streamMessage\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"string\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/streamMessage', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"string\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/streamMessage', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"string\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/streamMessage\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"string\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/streamMessage\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"conversationId\":\"00000000-0000-0000-0000-000000000000\",\"copilotId\":\"00000000-0000-0000-0000-000000000000\",\"email\":\"string\",\"inputVariables\":[{\"ids\":[\"00000000-0000-0000-0000-000000000000\"],\"name\":\"string\"}],\"message\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/streamMessage\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"conversationId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"email\\\":\\\"string\\\",\\\"inputVariables\\\":[{\\\"ids\\\":[\\\"00000000-0000-0000-0000-000000000000\\\"],\\\"name\\\":\\\"string\\\"}],\\\"message\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/copilots/updateConfiguration":{"post":{"description":"Update the configuration for a agent","operationId":"copilots_updateConfiguration","requestBody":{"content":{"application/json":{"schema":{"properties":{"configuration":{"$ref":"#/components/schemas/copilots_Configuration"},"copilotId":{"description":"Credal-generated agent ID to add the collection to.","format":"uuid","type":"string"}},"required":["configuration","copilotId"],"type":"object"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Update Configuration","tags":["copilots"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/copilots/updateConfiguration\");\nrequest.Content = new StringContent(\"{\\\"configuration\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"prompt\\\":\\\"string\\\"},\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/copilots/updateConfiguration' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"configuration\":{\"description\":\"string\",\"name\":\"string\",\"prompt\":\"string\"},\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"configuration\":{\"description\":\"string\",\"name\":\"string\",\"prompt\":\"string\"},\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/copilots/updateConfiguration\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/copilots/updateConfiguration\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"configuration\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"prompt\\\":\\\"string\\\"},\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/updateConfiguration', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"configuration\":{\"description\":\"string\",\"name\":\"string\",\"prompt\":\"string\"},\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/copilots/updateConfiguration', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"configuration\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"prompt\\\":\\\"string\\\"},\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/copilots/updateConfiguration\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"configuration\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"prompt\\\":\\\"string\\\"},\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/copilots/updateConfiguration\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"configuration\":{\"description\":\"string\",\"name\":\"string\",\"prompt\":\"string\"},\"copilotId\":\"00000000-0000-0000-0000-000000000000\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/copilots/updateConfiguration\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"configuration\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"prompt\\\":\\\"string\\\"},\\\"copilotId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/documentCollections/addDocumentsToCollection":{"post":{"description":"Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the `uploadDocumentContents` endpoint.","operationId":"documentCollections_addDocumentsToCollection","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"description":"The ID of the document collection you want to add to.","format":"uuid","type":"string"},"resourceIdentifiers":{"description":"The set of resource identifier for which you want to add to the collection.","items":{"$ref":"#/components/schemas/common_ResourceIdentifier"},"type":"array"}},"required":["collectionId","resourceIdentifiers"],"type":"object"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Add Documents To Collection","tags":["documentCollections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection\");\nrequest.Content = new StringContent(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/documentCollections/createCollection":{"post":{"description":"Create a new collection. The API key used will be added to the collection for future Requests","operationId":"documentCollections_createCollection","requestBody":{"content":{"application/json":{"schema":{"properties":{"collaborators":{"description":"A list of collaborator emails and roles that will have access to the agent.","items":{"$ref":"#/components/schemas/common_Collaborator"},"type":"array"},"description":{"description":"An in depth name for the agent's function. Useful for routing requests to the right agent.","type":"string"},"name":{"description":"A descriptive name for the collection.","type":"string"}},"required":["collaborators","description","name"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCollections_CreateCollectionResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Create Collection","tags":["documentCollections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/documentCollections/createCollection\");\nrequest.Content = new StringContent(\"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/documentCollections/createCollection' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/documentCollections/createCollection\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/documentCollections/createCollection\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/createCollection', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/createCollection', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/documentCollections/createCollection\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/documentCollections/createCollection\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collaborators\":[{\"email\":\"string\",\"role\":\"editor\"}],\"description\":\"string\",\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/documentCollections/createCollection\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collaborators\\\":[{\\\"email\\\":\\\"string\\\",\\\"role\\\":\\\"editor\\\"}],\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/documentCollections/deleteCollection":{"delete":{"description":"Delete the collection.","operationId":"documentCollections_deleteCollection","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"format":"uuid","type":"string"}},"required":["collectionId"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCollections_DeleteCollectionResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Delete Collection","tags":["documentCollections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.credal.ai/api/v0/documentCollections/deleteCollection\");\nrequest.Content = new StringContent(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.credal.ai/api/v0/documentCollections/deleteCollection' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collectionId\":\"00000000-0000-0000-0000-000000000000\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collectionId\":\"00000000-0000-0000-0000-000000000000\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.credal.ai/api/v0/documentCollections/deleteCollection\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/documentCollections/deleteCollection\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"DELETE\", HttpRequest.BodyPublishers.ofString(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/deleteCollection', {\n  method: 'DELETE',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collectionId\":\"00000000-0000-0000-0000-000000000000\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/deleteCollection', { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/documentCollections/deleteCollection\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://api.credal.ai/api/v0/documentCollections/deleteCollection\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collectionId\":\"00000000-0000-0000-0000-000000000000\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/documentCollections/deleteCollection\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/documentCollections/listDocumentsInCollection":{"get":{"description":"List documents in a collection","operationId":"documentCollections_listDocumentsInCollection","parameters":[{"description":"The ID of the document collection to list documents from.","in":"query","name":"collectionId","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCollections_ListDocumentsInCollectionResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"List Documents In Collection","tags":["documentCollections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/documentCollections/listDocumentsInCollection?collectionId=00000000-0000-0000-0000-000000000000\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/documentCollections/mongodb/createMongoSync":{"post":{"description":"Credal lets you easily sync your MongoDB data for use in Collections and Agents. Create a new sync from a MongoDB collection to a Credal collection.","operationId":"documentCollections_createMongoCollectionSync","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"format":"uuid","type":"string"},"config":{"$ref":"#/components/schemas/documentCollections_MongoCollectionSyncConfig"},"mongoURI":{"type":"string"}},"required":["collectionId","config","mongoURI"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCollections_MongoCollectionSyncResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Create Mongo Collection Sync","tags":["documentCollections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync\");\nrequest.Content = new StringContent(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoURI\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoURI\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoURI\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoURI\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoURI\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoURI\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoURI\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoURI\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/documentCollections/mongodb/createMongoSync\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoURI\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/documentCollections/mongodb/updateMongoSync":{"post":{"description":"Credal lets you easily sync your MongoDB data for use in Collections and Agents. Update an existing sync from a MongoDB collection to a Credal collection via the `mongoCredentialId`, to disambiguate between multiple potential syncs to a given collection.","operationId":"documentCollections_updateMongoCollectionSync","requestBody":{"content":{"application/json":{"schema":{"properties":{"config":{"$ref":"#/components/schemas/documentCollections_MongoCollectionSyncConfig"},"mongoCredentialId":{"format":"uuid","type":"string"},"mongoURI":{"type":"string"}},"required":["config","mongoCredentialId","mongoURI"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/documentCollections_MongoCollectionSyncResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Update Mongo Collection Sync","tags":["documentCollections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync\");\nrequest.Content = new StringContent(\"{\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoCredentialId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"mongoURI\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoCredentialId\":\"00000000-0000-0000-0000-000000000000\",\"mongoURI\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoCredentialId\":\"00000000-0000-0000-0000-000000000000\",\"mongoURI\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoCredentialId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"mongoURI\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoCredentialId\":\"00000000-0000-0000-0000-000000000000\",\"mongoURI\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoCredentialId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"mongoURI\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoCredentialId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"mongoURI\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"config\":{\"collectionName\":\"string\",\"filterExpression\":null,\"sourceFields\":{\"body\":\"string\",\"sourceName\":\"string\",\"sourceSystemUpdated\":\"string\",\"sourceUrl\":\"string\"},\"syncName\":\"string\"},\"mongoCredentialId\":\"00000000-0000-0000-0000-000000000000\",\"mongoURI\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/documentCollections/mongodb/updateMongoSync\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"config\\\":{\\\"collectionName\\\":\\\"string\\\",\\\"filterExpression\\\":null,\\\"sourceFields\\\":{\\\"body\\\":\\\"string\\\",\\\"sourceName\\\":\\\"string\\\",\\\"sourceSystemUpdated\\\":\\\"string\\\",\\\"sourceUrl\\\":\\\"string\\\"},\\\"syncName\\\":\\\"string\\\"},\\\"mongoCredentialId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"mongoURI\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/documentCollections/removeDocumentsFromCollection":{"delete":{"description":"Remove documents from a collection","operationId":"documentCollections_removeDocumentsFromCollection","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"description":"The ID of the document collection you want to add to.","format":"uuid","type":"string"},"resourceIdentifiers":{"description":"The set of resource identifier for which you want to remove from the collection","items":{"$ref":"#/components/schemas/common_ResourceIdentifier"},"type":"array"}},"required":["collectionId","resourceIdentifiers"],"type":"object"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Remove Documents From Collection","tags":["documentCollections"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection\");\nrequest.Content = new StringContent(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"DELETE\", HttpRequest.BodyPublishers.ofString(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection', {\n  method: 'DELETE',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection', { method: 'DELETE', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"DELETE\",\n    \"https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"resourceIdentifiers\":[{\"externalResourceId\":\"string\",\"resourceType\":\"BOX_FILE\",\"type\":\"external-resource-id\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/documentCollections/removeDocumentsFromCollection\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"resourceIdentifiers\\\":[{\\\"externalResourceId\\\":\\\"string\\\",\\\"resourceType\\\":\\\"BOX_FILE\\\",\\\"type\\\":\\\"external-resource-id\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/search/searchDocumentCollection":{"post":{"description":"Search across all documents in a document collection using the document metadata and contents.","operationId":"search_searchDocumentCollection","requestBody":{"content":{"application/json":{"schema":{"properties":{"collectionId":{"format":"uuid","type":"string"},"metadataFilterExpression":{"deprecated":true,"description":"Legacy metadata filter expression to apply to the search query. Use structuredQueryFilters instead.","type":"string"},"searchOptions":{"$ref":"#/components/schemas/search_DocumentCollectionSearchOptions"},"searchQuery":{"type":"string"},"structuredQueryFilters":{"description":"The structured query filters to apply to the search query.","items":{"$ref":"#/components/schemas/search_SingleFieldFilter"},"type":"array"},"userEmail":{"description":"The email of the user making the search request for permissions reduction.","type":"string"}},"required":["collectionId","searchQuery","userEmail"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/search_SearchDocumentCollectionResponse"}}},"description":"Response with status 200"}},"security":[{"BearerAuthScheme":[]}],"summary":"Search Document Collection","tags":["search"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.credal.ai/api/v0/search/searchDocumentCollection\");\nrequest.Content = new StringContent(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"metadataFilterExpression\\\":\\\"string\\\",\\\"searchOptions\\\":{\\\"enableQueryExtraction\\\":true,\\\"enableReranking\\\":true,\\\"enableSmartFiltering\\\":true,\\\"maxChunks\\\":0,\\\"mergeContents\\\":true,\\\"threshold\\\":0},\\\"searchQuery\\\":\\\"string\\\",\\\"structuredQueryFilters\\\":[{\\\"field\\\":\\\"string\\\",\\\"operator\\\":\\\"!=\\\",\\\"value\\\":\\\"string\\\"}],\\\"userEmail\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.credal.ai/api/v0/search/searchDocumentCollection' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"metadataFilterExpression\":\"string\",\"searchOptions\":{\"enableQueryExtraction\":true,\"enableReranking\":true,\"enableSmartFiltering\":true,\"maxChunks\":0,\"mergeContents\":true,\"threshold\":0},\"searchQuery\":\"string\",\"structuredQueryFilters\":[{\"field\":\"string\",\"operator\":\"!=\",\"value\":\"string\"}],\"userEmail\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"metadataFilterExpression\":\"string\",\"searchOptions\":{\"enableQueryExtraction\":true,\"enableReranking\":true,\"enableSmartFiltering\":true,\"maxChunks\":0,\"mergeContents\":true,\"threshold\":0},\"searchQuery\":\"string\",\"structuredQueryFilters\":[{\"field\":\"string\",\"operator\":\"!=\",\"value\":\"string\"}],\"userEmail\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.credal.ai/api/v0/search/searchDocumentCollection\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/search/searchDocumentCollection\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"metadataFilterExpression\\\":\\\"string\\\",\\\"searchOptions\\\":{\\\"enableQueryExtraction\\\":true,\\\"enableReranking\\\":true,\\\"enableSmartFiltering\\\":true,\\\"maxChunks\\\":0,\\\"mergeContents\\\":true,\\\"threshold\\\":0},\\\"searchQuery\\\":\\\"string\\\",\\\"structuredQueryFilters\\\":[{\\\"field\\\":\\\"string\\\",\\\"operator\\\":\\\"!=\\\",\\\"value\\\":\\\"string\\\"}],\\\"userEmail\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/search/searchDocumentCollection', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"metadataFilterExpression\":\"string\",\"searchOptions\":{\"enableQueryExtraction\":true,\"enableReranking\":true,\"enableSmartFiltering\":true,\"maxChunks\":0,\"mergeContents\":true,\"threshold\":0},\"searchQuery\":\"string\",\"structuredQueryFilters\":[{\"field\":\"string\",\"operator\":\"!=\",\"value\":\"string\"}],\"userEmail\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/search/searchDocumentCollection', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"metadataFilterExpression\\\":\\\"string\\\",\\\"searchOptions\\\":{\\\"enableQueryExtraction\\\":true,\\\"enableReranking\\\":true,\\\"enableSmartFiltering\\\":true,\\\"maxChunks\\\":0,\\\"mergeContents\\\":true,\\\"threshold\\\":0},\\\"searchQuery\\\":\\\"string\\\",\\\"structuredQueryFilters\\\":[{\\\"field\\\":\\\"string\\\",\\\"operator\\\":\\\"!=\\\",\\\"value\\\":\\\"string\\\"}],\\\"userEmail\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/search/searchDocumentCollection\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"metadataFilterExpression\\\":\\\"string\\\",\\\"searchOptions\\\":{\\\"enableQueryExtraction\\\":true,\\\"enableReranking\\\":true,\\\"enableSmartFiltering\\\":true,\\\"maxChunks\\\":0,\\\"mergeContents\\\":true,\\\"threshold\\\":0},\\\"searchQuery\\\":\\\"string\\\",\\\"structuredQueryFilters\\\":[{\\\"field\\\":\\\"string\\\",\\\"operator\\\":\\\"!=\\\",\\\"value\\\":\\\"string\\\"}],\\\"userEmail\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.credal.ai/api/v0/search/searchDocumentCollection\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"collectionId\":\"00000000-0000-0000-0000-000000000000\",\"metadataFilterExpression\":\"string\",\"searchOptions\":{\"enableQueryExtraction\":true,\"enableReranking\":true,\"enableSmartFiltering\":true,\"maxChunks\":0,\"mergeContents\":true,\"threshold\":0},\"searchQuery\":\"string\",\"structuredQueryFilters\":[{\"field\":\"string\",\"operator\":\"!=\",\"value\":\"string\"}],\"userEmail\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/search/searchDocumentCollection\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"collectionId\\\":\\\"00000000-0000-0000-0000-000000000000\\\",\\\"metadataFilterExpression\\\":\\\"string\\\",\\\"searchOptions\\\":{\\\"enableQueryExtraction\\\":true,\\\"enableReranking\\\":true,\\\"enableSmartFiltering\\\":true,\\\"maxChunks\\\":0,\\\"mergeContents\\\":true,\\\"threshold\\\":0},\\\"searchQuery\\\":\\\"string\\\",\\\"structuredQueryFilters\\\":[{\\\"field\\\":\\\"string\\\",\\\"operator\\\":\\\"!=\\\",\\\"value\\\":\\\"string\\\"}],\\\"userEmail\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}},"/v0/users/metadata":{"patch":{"description":"Bulk patch metadata for users","operationId":"users_metadata","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/users_UserMetadataPatch"},"type":"array"}}}},"responses":{"200":{"description":"Successful response"}},"security":[{"BearerAuthScheme":[]}],"summary":"Metadata","tags":["users"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.credal.ai/api/v0/users/metadata\");\nrequest.Content = new StringContent(\"[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"userEmail\\\":\\\"string\\\"}]\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.credal.ai/api/v0/users/metadata' \\\n  -H 'Content-Type: application/json' \\\n  -d '[{\"metadata\":{\"additionalProp1\":null},\"userEmail\":\"string\"}]'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`[{\"metadata\":{\"additionalProp1\":null},\"userEmail\":\"string\"}]`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.credal.ai/api/v0/users/metadata\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.credal.ai/api/v0/users/metadata\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"userEmail\\\":\\\"string\\\"}]\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.credal.ai/api/v0/users/metadata', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify([{\"metadata\":{\"additionalProp1\":null},\"userEmail\":\"string\"}]),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.credal.ai/api/v0/users/metadata', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"userEmail\\\":\\\"string\\\"}]\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.credal.ai/api/v0/users/metadata\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"userEmail\\\":\\\"string\\\"}]\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.credal.ai/api/v0/users/metadata\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='[{\"metadata\":{\"additionalProp1\":null},\"userEmail\":\"string\"}]',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.credal.ai/api/v0/users/metadata\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"[{\\\"metadata\\\":{\\\"additionalProp1\\\":null},\\\"userEmail\\\":\\\"string\\\"}]\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}]}}},"servers":[{"description":"Production","url":"https://api.credal.ai/api"}],"tags":[{"name":"copilots"},{"name":"documentCatalog"},{"name":"documentCollections"},{"name":"search"},{"name":"users"}]}