Create connector

POST /api/connectors

Create a connector with the given data.

application/json

Body Required

  • config object

    The connector config object that will be passed to the connector. The config object should be compatible with the connector factory.

  • connectorId string Required

    The connector factory ID for creating the connector.

    Minimum length is 1, maximum length is 128.

  • metadata object

    Custom connector metadata, will be used to overwrite the default connector factory metadata.

    Hide metadata attributes Show metadata attributes object
  • Whether to sync user profile from the identity provider to Logto at each sign-in. If false, the user profile will only be synced when the user is created.

  • id string

    The unique ID for the connector. If not provided, a random ID will be generated.

    Minimum length is 1, maximum length is 128.

Responses

POST /api/connectors
curl \
 -X POST https://[tenant_id].logto.app/api/connectors \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"config":{},"connectorId":"string","metadata":{"target":"string","name":{},"logo":"string","logoDark":"string"},"syncProfile":true,"id":"string"}'
Request examples
{
  "config": {},
  "connectorId": "string",
  "metadata": {
    "target": "string",
    "name": {},
    "logo": "string",
    "logoDark": "string"
  },
  "syncProfile": true,
  "id": "string"
}
Response examples (200)
{
  "id": "string",
  "syncProfile": true,
  "config": {},
  "metadata": {
    "target": "string",
    "name": {},
    "logo": "string",
    "logoDark": "string"
  },
  "connectorId": "string",
  "target": "string",
  "name": {},
  "description": {},
  "logo": "string",
  "logoDark": "string",
  "readme": "string",
  "configTemplate": "string",
  "formItems": [
    {
      "type": "string",
      "selectItems": [
        {
          "value": "string",
          "title": "string"
        }
      ],
      "key": "string",
      "label": "string",
      "placeholder": "string",
      "required": true,
      "showConditions": [
        {
          "targetKey": "string"
        }
      ],
      "description": "string",
      "tooltip": "string",
      "isConfidential": true
    }
  ],
  "customData": {},
  "fromEmail": "string",
  "platform": "Native",
  "isStandard": true,
  "type": "Email",
  "isDemo": true,
  "extraInfo": {},
  "usage": 42.0
}