---
title: "Create connector"
method: POST
path: "/partner/app/{appId}/bizai/agent_connectors"
tags: ["Configure — Connectors"]
---

# Create connector

`POST /partner/app/{appId}/bizai/agent_connectors`

## Request

- Base URL: `https://partner.gupshup.io`
- URL: `https://partner.gupshup.io/partner/app/{appId}/bizai/agent_connectors`
- Auth: API key in header `Authorization`

Names are unique per app. Credentials can be set here or later through the upsert routes.

## Request body

- ConnectorRequest
  - `name` string, required: Unique per app.
  - `description` string, required
  - `base_url` string, uri, required
  - `connector_protocol` 'HTTP' | 'MCP'
  - `auth_type` 'OAUTH2_CLIENT_CREDENTIALS' | 'API_KEY' | 'NONE', required: The only supported values. `connector_protocol` cannot change after creation.
  - `auth_config` object: Set the block matching `auth_type`.
    - `api_key` ApiKeyConfig: At least one of the three lists must be non-empty.
      - `headers` ApiKeyEntry[]
        - `field_name` string, required
        - `value` string, required
        - `prefix` string
      - `query_params` ApiKeyEntry[]
        - `field_name` string, required
        - `value` string, required
        - `prefix` string
      - `body_params` ApiKeyEntry[]
        - `field_name` string, required
        - `value` string, required
        - `prefix` string
    - `oauth2_client_credentials` OAuthConfig
      - `token_url` string, uri, required
      - `scopes_to_request` string[]
      - `token_request_content_type` 'application/x-www-form-urlencoded' | 'application/json'
      - `client_id` string, required
      - `client_secret` string, required
  - `user_auth_injection_config` UserAuthInjectionConfig: Where the consumer's own auth token is injected on outbound calls.
    - `location` 'body' | 'headers' | 'path' | 'query', required
    - `field_name` string, required
    - `prefix` string, required
  - `requires_certificate` boolean

## Response `201`

Connector created.

- Connector: **Per Meta reference**. Secrets are never returned.
  - `id` string: Meta resource id.
  - `name` string
  - `description` string
  - `base_url` string
  - `connector_protocol` 'HTTP' | 'MCP'
  - `auth_type` 'OAUTH2_CLIENT_CREDENTIALS' | 'API_KEY' | 'NONE'
  - `auth_config` object
  - `user_auth_injection_config` UserAuthInjectionConfig: Where the consumer's own auth token is injected on outbound calls.
    - `location` 'body' | 'headers' | 'path' | 'query', required
    - `field_name` string, required
    - `prefix` string, required
  - `connection_status` object
    - `status` 'PENDING_OAUTH' | 'ACTIVE' | 'EXPIRED' | 'ERROR'
    - `error_message` string
  - `mcp_tool_sync` object, nullable: Null for HTTP connectors.
    - `status` 'ERROR' | 'PENDING' | 'READY'
    - `last_attempted_at` integer
    - `last_successful_at` integer
    - `fingerprint` string
    - `tool_count` integer
  - `mtls_config` object
    - `has_certificate` boolean
    - `fingerprint` string
    - `expires_at` integer
    - `subject` string
    - `client_certificate` string
    - `ca_certificate` string

## Other responses

- `400`: The agent has not been onboarded, or the connector request is invalid.
- `401`: Missing, invalid, or foreign-app token. Raised by Partner Portal before any forwarding.
- `409`: A connector with this name already exists on the app.
- `429`: Per-app rate limit exceeded. Retry after the 60-second window.

---

[API](https://skmtc.dev/gupshup/apis/partner-portal-meta-business-agent-bizai-api.md) - [All operations](https://skmtc.dev/gupshup/apis/partner-portal-meta-business-agent-bizai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gupshup/apis/partner-portal-meta-business-agent-bizai-api/revisions/4c52185f2153?raw)
