Logto Connectors API

Connectors are the bridge between Logto and other third-party vendors who provide short message service (SMS), email service, or user information on wildly accepted social media. To learn more about connectors, please see [🪛 Configure connectors](https://docs.logto.io/docs/recipes/configure-connectors/).

OpenAPI Specification

logto-connectors-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Logto API references Account center Connectors API
  description: 'API references for Logto services.


    Note: The documentation is for Logto Cloud. If you are using Logto OSS, please refer to the response of `/api/swagger.json` endpoint on your Logto instance.'
  version: Cloud
servers:
- url: https://[tenant_id].logto.app/
  description: Logto endpoint address.
security:
- OAuth2:
  - all
tags:
- name: Connectors
  description: 'Connectors are the bridge between Logto and other third-party vendors who provide short message service (SMS), email service, or user information on wildly accepted social media.


    To learn more about connectors, please see [🪛 Configure connectors](https://docs.logto.io/docs/recipes/configure-connectors/).'
paths:
  /api/connectors:
    post:
      operationId: CreateConnector
      tags:
      - Connectors
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - connectorId
              properties:
                config:
                  type: object
                  description: The connector config object that will be passed to the connector. The config object should be compatible with the connector factory.
                connectorId:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: The connector factory ID for creating the connector.
                metadata:
                  type: object
                  properties:
                    target:
                      type: string
                    name:
                      type: object
                      description: Validator function
                    logo:
                      type: string
                    logoDark:
                      type: string
                      nullable: true
                  description: Custom connector metadata, will be used to overwrite the default connector factory metadata.
                syncProfile:
                  type: boolean
                  description: 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.
                enableTokenStorage:
                  type: boolean
                id:
                  type: string
                  minLength: 1
                  maxLength: 128
                  description: The unique ID for the connector. If not provided, a random ID will be generated.
      responses:
        '200':
          description: The created connector.
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - syncProfile
                - enableTokenStorage
                - config
                - metadata
                - connectorId
                - target
                - name
                - description
                - logo
                - logoDark
                - readme
                - platform
                - type
                properties:
                  id:
                    type: string
                  syncProfile:
                    type: boolean
                  enableTokenStorage:
                    type: boolean
                  config:
                    type: object
                    description: arbitrary
                  metadata:
                    type: object
                    properties:
                      target:
                        type: string
                      name:
                        type: object
                        description: Validator function
                      logo:
                        type: string
                      logoDark:
                        type: string
                        nullable: true
                  connectorId:
                    type: string
                    minLength: 1
                    maxLength: 128
                  target:
                    type: string
                  name:
                    type: object
                    description: Validator function
                  description:
                    type: object
                    description: Validator function
                  logo:
                    type: string
                  logoDark:
                    type: string
                    nullable: true
                  readme:
                    type: string
                  configTemplate:
                    type: string
                  formItems:
                    type: array
                    items:
                      oneOf:
                      - type: object
                        required:
                        - type
                        - selectItems
                        - key
                        - label
                        properties:
                          type:
                            type: string
                            format: '"Select"'
                          selectItems:
                            type: array
                            items:
                              type: object
                              required:
                              - value
                              - title
                              properties:
                                value:
                                  type: string
                                title:
                                  type: string
                          key:
                            type: string
                          label:
                            type: string
                          placeholder:
                            type: string
                          required:
                            type: boolean
                          defaultValue:
                            example: {}
                          showConditions:
                            type: array
                            items:
                              type: object
                              required:
                              - targetKey
                              properties:
                                targetKey:
                                  type: string
                                expectValue:
                                  example: {}
                          description:
                            type: string
                          tooltip:
                            type: string
                          isConfidential:
                            type: boolean
                          isDevFeature:
                            type: boolean
                      - type: object
                        required:
                        - type
                        - selectItems
                        - key
                        - label
                        properties:
                          type:
                            type: string
                            format: '"MultiSelect"'
                          selectItems:
                            type: array
                            items:
                              type: object
                              required:
                              - value
                              properties:
                                value:
                                  type: string
                          key:
                            type: string
                          label:
                            type: string
                          placeholder:
                            type: string
                          required:
                            type: boolean
                          defaultValue:
                            example: {}
                          showConditions:
                            type: array
                            items:
                              type: object
                              required:
                              - targetKey
                              properties:
                                targetKey:
                                  type: string
                                expectValue:
                                  example: {}
                          description:
                            type: string
                          tooltip:
                            type: string
                          isConfidential:
                            type: boolean
                          isDevFeature:
                            type: boolean
                      - type: object
                        required:
                        - type
                        - key
                        - label
                        properties:
                          type:
                            type: string
                            enum:
                            - Text
                            - Number
                            - MultilineText
                            - Switch
                            - Json
                          key:
                            type: string
                          label:
                            type: string
                          placeholder:
                            type: string
                          required:
                            type: boolean
                          defaultValue:
                            example: {}
                          showConditions:
                            type: array
                            items:
                              type: object
                              required:
                              - targetKey
                              properties:
                                targetKey:
                                  type: string
                                expectValue:
                                  example: {}
                          description:
                            type: string
                          tooltip:
                            type: string
                          isConfidential:
                            type: boolean
                          isDevFeature:
                            type: boolean
                  customData:
                    type: object
                    additionalProperties:
                      example: {}
                  fromEmail:
                    type: string
                  platform:
                    type: string
                    enum:
                    - Native
                    - Universal
                    - Web
                    nullable: true
                  isStandard:
                    type: boolean
                  isTokenStorageSupported:
                    type: boolean
                  type:
                    type: string
                    enum:
                    - Email
                    - Sms
                    - Social
                  isDemo:
                    type: boolean
                  extraInfo:
                    type: object
                    additionalProperties:
                      example: {}
                  usage:
                    type: number
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: The tenant has reached the maximum number of connectors.
        '422':
          description: Invalid request body.
      summary: Create connector
      description: Create a connector with the given data.
    get:
      operationId: ListConnectors
      tags:
      - Connectors
      parameters:
      - name: target
        in: query
        required: false
        schema:
          type: string
        description: Filter connectors by target.
      responses:
        '200':
          description: An array of connectors.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - id
                  - syncProfile
                  - enableTokenStorage
                  - config
                  - metadata
                  - connectorId
                  - target
                  - name
                  - description
                  - logo
                  - logoDark
                  - readme
                  - platform
                  - type
                  properties:
                    id:
                      type: string
                    syncProfile:
                      type: boolean
                    enableTokenStorage:
                      type: boolean
                    config:
                      type: object
                      description: arbitrary
                    metadata:
                      type: object
                      properties:
                        target:
                          type: string
                        name:
                          type: object
                          description: Validator function
                        logo:
                          type: string
                        logoDark:
                          type: string
                          nullable: true
                    connectorId:
                      type: string
                      minLength: 1
                      maxLength: 128
                    target:
                      type: string
                    name:
                      type: object
                      description: Validator function
                    description:
                      type: object
                      description: Validator function
                    logo:
                      type: string
                    logoDark:
                      type: string
                      nullable: true
                    readme:
                      type: string
                    configTemplate:
                      type: string
                    formItems:
                      type: array
                      items:
                        oneOf:
                        - type: object
                          required:
                          - type
                          - selectItems
                          - key
                          - label
                          properties:
                            type:
                              type: string
                              format: '"Select"'
                            selectItems:
                              type: array
                              items:
                                type: object
                                required:
                                - value
                                - title
                                properties:
                                  value:
                                    type: string
                                  title:
                                    type: string
                            key:
                              type: string
                            label:
                              type: string
                            placeholder:
                              type: string
                            required:
                              type: boolean
                            defaultValue:
                              example: {}
                            showConditions:
                              type: array
                              items:
                                type: object
                                required:
                                - targetKey
                                properties:
                                  targetKey:
                                    type: string
                                  expectValue:
                                    example: {}
                            description:
                              type: string
                            tooltip:
                              type: string
                            isConfidential:
                              type: boolean
                            isDevFeature:
                              type: boolean
                        - type: object
                          required:
                          - type
                          - selectItems
                          - key
                          - label
                          properties:
                            type:
                              type: string
                              format: '"MultiSelect"'
                            selectItems:
                              type: array
                              items:
                                type: object
                                required:
                                - value
                                properties:
                                  value:
                                    type: string
                            key:
                              type: string
                            label:
                              type: string
                            placeholder:
                              type: string
                            required:
                              type: boolean
                            defaultValue:
                              example: {}
                            showConditions:
                              type: array
                              items:
                                type: object
                                required:
                                - targetKey
                                properties:
                                  targetKey:
                                    type: string
                                  expectValue:
                                    example: {}
                            description:
                              type: string
                            tooltip:
                              type: string
                            isConfidential:
                              type: boolean
                            isDevFeature:
                              type: boolean
                        - type: object
                          required:
                          - type
                          - key
                          - label
                          properties:
                            type:
                              type: string
                              enum:
                              - Text
                              - Number
                              - MultilineText
                              - Switch
                              - Json
                            key:
                              type: string
                            label:
                              type: string
                            placeholder:
                              type: string
                            required:
                              type: boolean
                            defaultValue:
                              example: {}
                            showConditions:
                              type: array
                              items:
                                type: object
                                required:
                                - targetKey
                                properties:
                                  targetKey:
                                    type: string
                                  expectValue:
                                    example: {}
                            description:
                              type: string
                            tooltip:
                              type: string
                            isConfidential:
                              type: boolean
                            isDevFeature:
                              type: boolean
                    customData:
                      type: object
                      additionalProperties:
                        example: {}
                    fromEmail:
                      type: string
                    platform:
                      type: string
                      enum:
                      - Native
                      - Universal
                      - Web
                      nullable: true
                    isStandard:
                      type: boolean
                    isTokenStorageSupported:
                      type: boolean
                    type:
                      type: string
                      enum:
                      - Email
                      - Sms
                      - Social
                    isDemo:
                      type: boolean
                    extraInfo:
                      type: object
                      additionalProperties:
                        example: {}
                    usage:
                      type: number
        '400':
          description: The target only allows one connector to exist, but there are multiple connectors with this target.
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      summary: Get connectors
      description: Get all connectors in the current tenant.
  /api/connectors/{id}:
    get:
      operationId: GetConnector
      tags:
      - Connectors
      parameters:
      - $ref: '#/components/parameters/connectorId-root'
      responses:
        '200':
          description: The connector data.
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - syncProfile
                - enableTokenStorage
                - config
                - metadata
                - connectorId
                - target
                - name
                - description
                - logo
                - logoDark
                - readme
                - platform
                - type
                properties:
                  id:
                    type: string
                  syncProfile:
                    type: boolean
                  enableTokenStorage:
                    type: boolean
                  config:
                    type: object
                    description: arbitrary
                  metadata:
                    type: object
                    properties:
                      target:
                        type: string
                      name:
                        type: object
                        description: Validator function
                      logo:
                        type: string
                      logoDark:
                        type: string
                        nullable: true
                  connectorId:
                    type: string
                    minLength: 1
                    maxLength: 128
                  target:
                    type: string
                  name:
                    type: object
                    description: Validator function
                  description:
                    type: object
                    description: Validator function
                  logo:
                    type: string
                  logoDark:
                    type: string
                    nullable: true
                  readme:
                    type: string
                  configTemplate:
                    type: string
                  formItems:
                    type: array
                    items:
                      oneOf:
                      - type: object
                        required:
                        - type
                        - selectItems
                        - key
                        - label
                        properties:
                          type:
                            type: string
                            format: '"Select"'
                          selectItems:
                            type: array
                            items:
                              type: object
                              required:
                              - value
                              - title
                              properties:
                                value:
                                  type: string
                                title:
                                  type: string
                          key:
                            type: string
                          label:
                            type: string
                          placeholder:
                            type: string
                          required:
                            type: boolean
                          defaultValue:
                            example: {}
                          showConditions:
                            type: array
                            items:
                              type: object
                              required:
                              - targetKey
                              properties:
                                targetKey:
                                  type: string
                                expectValue:
                                  example: {}
                          description:
                            type: string
                          tooltip:
                            type: string
                          isConfidential:
                            type: boolean
                          isDevFeature:
                            type: boolean
                      - type: object
                        required:
                        - type
                        - selectItems
                        - key
                        - label
                        properties:
                          type:
                            type: string
                            format: '"MultiSelect"'
                          selectItems:
                            type: array
                            items:
                              type: object
                              required:
                              - value
                              properties:
                                value:
                                  type: string
                          key:
                            type: string
                          label:
                            type: string
                          placeholder:
                            type: string
                          required:
                            type: boolean
                          defaultValue:
                            example: {}
                          showConditions:
                            type: array
                            items:
                              type: object
                              required:
                              - targetKey
                              properties:
                                targetKey:
                                  type: string
                                expectValue:
                                  example: {}
                          description:
                            type: string
                          tooltip:
                            type: string
                          isConfidential:
                            type: boolean
                          isDevFeature:
                            type: boolean
                      - type: object
                        required:
                        - type
                        - key
                        - label
                        properties:
                          type:
                            type: string
                            enum:
                            - Text
                            - Number
                            - MultilineText
                            - Switch
                            - Json
                          key:
                            type: string
                          label:
                            type: string
                          placeholder:
                            type: string
                          required:
                            type: boolean
                          defaultValue:
                            example: {}
                          showConditions:
                            type: array
                            items:
                              type: object
                              required:
                              - targetKey
                              properties:
                                targetKey:
                                  type: string
                                expectValue:
                                  example: {}
                          description:
                            type: string
                          tooltip:
                            type: string
                          isConfidential:
                            type: boolean
                          isDevFeature:
                            type: boolean
                  customData:
                    type: object
                    additionalProperties:
                      example: {}
                  fromEmail:
                    type: string
                  platform:
                    type: string
                    enum:
                    - Native
                    - Universal
                    - Web
                    nullable: true
                  isStandard:
                    type: boolean
                  isTokenStorageSupported:
                    type: boolean
                  type:
                    type: string
                    enum:
                    - Email
                    - Sms
                    - Social
                  isDemo:
                    type: boolean
                  extraInfo:
                    type: object
                    additionalProperties:
                      example: {}
                  usage:
                    type: number
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Connector not found.
      summary: Get connector
      description: Get connector data by ID
    patch:
      operationId: UpdateConnector
      tags:
      - Connectors
      parameters:
      - $ref: '#/components/parameters/connectorId-root'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                config:
                  type: object
                  description: The connector config object that will be passed to the connector. The config object should be compatible with the connector factory.
                metadata:
                  type: object
                  properties:
                    target:
                      type: string
                    name:
                      type: object
                      description: Validator function
                    logo:
                      type: string
                    logoDark:
                      type: string
                      nullable: true
                  description: Custom connector metadata, will be used to overwrite the default connector metadata.
                syncProfile:
                  type: boolean
                  description: 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.
                enableTokenStorage:
                  type: boolean
      responses:
        '200':
          description: The updated connector.
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - syncProfile
                - enableTokenStorage
                - config
                - metadata
                - connectorId
                - target
                - name
                - description
                - logo
                - logoDark
                - readme
                - platform
                - type
                properties:
                  id:
                    type: string
                  syncProfile:

# --- truncated at 32 KB (47 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/logto/refs/heads/main/openapi/logto-connectors-api-openapi.yml