> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/mba/api-ref/knowledge-connectors/create-a-connector.md).

# Create a connector

Create a new connector for the specified entity. The name must be unique among the connectors already created for this entity.

```json
{"openapi":"3.1.0","info":{"title":"Business Agent API","version":"1.51.5"},"tags":[{"name":"Knowledge - Connectors","description":"Endpoints for managing the agent's external API connectors"}],"servers":[{"description":"Production server","url":"https://waba-v2.360dialog.io"}],"security":[{"D360-API-KEY":[]}],"components":{"securitySchemes":{"D360-API-KEY":{"description":"API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.","in":"header","name":"D360-API-KEY","type":"apiKey"}},"schemas":{"knowledge_connectors.BizAIOmniChannelConnectorRequest":{"description":"Create or update a connector","properties":{"auth_config":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorAuthConfig"},"auth_type":{"description":"Authentication type. Currently only OAUTH2_CLIENT_CREDENTIALS, API_KEY, and NONE are supported. Set auth_config.oauth2_client_credentials when this is OAUTH2_CLIENT_CREDENTIALS, set auth_config.api_key when this is API_KEY, and omit auth_config when this is NONE.","enum":["OAUTH2","OAUTH2_CLIENT_CREDENTIALS","API_KEY","BASIC","CUSTOM","NONE"],"type":"string"},"base_url":{"description":"Base URL of the external HTTP API or remote MCP server","type":"string"},"connector_protocol":{"description":"Connector protocol. Defaults to HTTP when omitted and cannot be changed after creation.","enum":["HTTP","MCP"],"type":"string"},"description":{"description":"Description of what this connector integrates with and its purpose. The agent uses this to understand the connector capabilities, e.g. 'Connects to the Shopify API for managing customer orders, processing returns, and checking inventory availability.'","type":"string"},"name":{"description":"Display name of the connector. Use a name that clearly identifies the external service (e.g. Shopify_Order_Management, Salesforce_CRM). Must be unique among the connectors already created for this entity. Connector names must contain only letters, numbers, and underscores (regex: ^[A-Za-z0-9_]+$). They must not start or end with an underscore or contain consecutive underscores. Spaces, hyphens, dots, and accented characters are not allowed.","type":"string"},"requires_certificate":{"description":"Whether this connector requires an mTLS client certificate. When true, use the upsertCertificate endpoint to provide it.","type":"boolean"},"user_auth_injection_config":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorUserAuthInjectionConfig"}},"required":["auth_type","base_url","description","name"],"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorAuthConfig":{"description":"Authentication configuration for this connector","properties":{"api_key":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyAuthConfig"},"oauth2_client_credentials":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorOAuth2ClientCredentialsAuthConfig"}},"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorApiKeyAuthConfig":{"description":"API key configuration. Provide only when auth_type is API_KEY.","properties":{"body_params":{"description":"API key fields to add as JSON body parameters","items":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam"},"type":"array","uniqueItems":false},"headers":{"description":"API key fields to add as HTTP headers","items":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam"},"type":"array","uniqueItems":false},"query_params":{"description":"API key fields to add as query parameters","items":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam"},"type":"array","uniqueItems":false}},"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam":{"description":"A single API key field","properties":{"field_name":{"description":"Header, query parameter, or body field name","type":"string"},"prefix":{"description":"Optional value prefix, such as Bearer followed by a space","type":"string"},"value":{"description":"Secret value for this API key field","type":"string"}},"required":["field_name","value"],"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorOAuth2ClientCredentialsAuthConfig":{"description":"OAuth 2.0 client credentials configuration. Provide only when auth_type is OAUTH2_CLIENT_CREDENTIALS.","properties":{"client_id":{"description":"OAuth client ID","type":"string"},"client_secret":{"description":"OAuth client secret","type":"string"},"scopes_to_request":{"description":"OAuth scopes to request","items":{"type":"string"},"type":"array","uniqueItems":false},"token_request_content_type":{"description":"Content type for token requests. Supports application/x-www-form-urlencoded and application/json. Defaults to application/x-www-form-urlencoded.","type":"string"},"token_url":{"description":"Token URL used to request OAuth access tokens","type":"string"}},"required":["client_id","client_secret","scopes_to_request","token_url"],"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorUserAuthInjectionConfig":{"description":"Configuration for injecting user auth tokens into tool requests","properties":{"field_name":{"description":"Field name for the injected token (e.g. X-User-Token)","type":"string"},"location":{"description":"Where to inject the token","enum":["body","headers","path","query"],"type":"string"},"prefix":{"description":"Prefix for the token value (e.g. Bearer )","type":"string"}},"required":["field_name","location","prefix"],"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorResponse":{"description":"A single connector","properties":{"auth_config":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorAuthConfig"},"auth_type":{"description":"Authentication type for this connector","enum":["OAUTH2","OAUTH2_CLIENT_CREDENTIALS","API_KEY","BASIC","CUSTOM","NONE"],"type":"string"},"base_url":{"description":"Base URL of the external API","type":"string"},"connection_status":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorConnectionStatus"},"connector_protocol":{"description":"Protocol used by this connector. Defaults to HTTP when omitted.","enum":["HTTP","MCP"],"type":"string"},"description":{"description":"Description of the connector","type":"string"},"id":{"description":"The unique identifier for this connector","type":"string"},"mcp_tool_sync":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorMcpToolSync"},"mtls_config":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorMtlsConfig"},"name":{"description":"Display name of the connector","type":"string"},"user_auth_injection_config":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorUserAuthInjectionConfig"}},"required":["auth_type","base_url","connection_status","description","id","name"],"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorConnectionStatus":{"description":"Connection status information","properties":{"error_message":{"description":"Error message if connection failed","type":"string"},"status":{"description":"Current connection status","enum":["PENDING_OAUTH","ACTIVE","EXPIRED","ERROR"],"type":"string"}},"required":["status"],"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorMcpToolSync":{"description":"MCP tool discovery cache status. Null for HTTP connectors.","properties":{"fingerprint":{"description":"Fingerprint of the cached remote tool set","type":"string"},"last_attempted_at":{"description":"Unix timestamp of the latest refresh attempt","type":"integer"},"last_successful_at":{"description":"Unix timestamp of the latest successful refresh","type":"integer"},"status":{"description":"Current MCP tool refresh status","enum":["ERROR","PENDING","READY"],"type":"string"},"tool_count":{"description":"Number of cached remote MCP tools","type":"integer"}},"required":["status"],"type":"object"},"knowledge_connectors.BizAIOmniChannelConnectorMtlsConfig":{"description":"mTLS certificate metadata and PEM content (private key is never exposed)","properties":{"ca_certificate":{"description":"PEM-encoded CA certificate chain (public, safe to expose)","type":"string"},"client_certificate":{"description":"PEM-encoded client certificate (public, safe to expose)","type":"string"},"expires_at":{"description":"Unix timestamp of certificate expiry","type":"integer"},"fingerprint":{"description":"SHA-256 fingerprint of the certificate","type":"string"},"has_certificate":{"description":"Whether an mTLS certificate is configured","type":"boolean"},"subject":{"description":"Certificate subject DN","type":"string"}},"required":["has_certificate"],"type":"object"},"knowledge_connectors.StandardError":{"description":"Standard error response for Meta Business Agent endpoints","properties":{"detail":{"description":"Human-readable explanation of the error","type":"string"},"status":{"description":"HTTP status code","type":"integer"},"title":{"description":"Short, human-readable summary of the problem","type":"string"},"type":{"description":"A URI reference identifying the problem type","type":"string"}},"type":"object"}}},"paths":{"/agent_connectors":{"post":{"description":"Create a new connector for the specified entity. The name must be unique among the connectors already created for this entity.","operationId":"post-agent-connectors","parameters":[{"description":"Meta Business Agent API version","in":"header","name":"X-API-Version","schema":{"enum":["2.0.0"],"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorRequest","summary":"requestBody","description":"Connector to create"}}},"description":"Connector to create","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse"}}},"description":"The newly created connector"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.StandardError"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.StandardError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.StandardError"}}},"description":"Forbidden"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.StandardError"}}},"description":"Conflict"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.StandardError"}}},"description":"Too many requests"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/knowledge_connectors.StandardError"}}},"description":"Server error"}},"summary":"Create a connector","tags":["Knowledge - Connectors"]}}}}
```


---

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

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

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

```
GET https://docs.360dialog.com/docs/mba/api-ref/knowledge-connectors/create-a-connector.md?ask=<question>&goal=<user_goal>
```

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

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

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