> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Internal links on these pages omit the .md extension. Append .md to a docs page URL, or send an Accept: text/markdown header, to get that page as markdown.

# Create workspace connector

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates a workspace connector.

A workspace connector holds the workspace's own OAuth app for a connector, so the workspace's apps connect through it instead of through Base44's OAuth app. A connector can also run on Base44's OAuth app for the apps' users, when `credential_source` is `base44`.

With `credential_source` set to `byo`, send the client ID and secret of an OAuth app you registered in the provider's console, then register the redirect URIs from [Get OAuth redirect URIs](/api-reference/get-oauth-redirect-uris) there too. With `base44`, send neither: the connector runs on Base44's OAuth app, which needs a plan that includes Base44-managed connectors and accepts only the scopes that app is approved for.

Names are unique in a workspace, so retrying a create that succeeded returns a `409`.

This is limited to 30 requests per minute, shared by [Create workspace connector](/api-reference/create-workspace-connector), [Update workspace connector](/api-reference/update-workspace-connector), and [Delete workspace connector](/api-reference/delete-workspace-connector). A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.

<Note>Call this as an owner or admin of the workspace, with a personal access token for that workspace sent as a Bearer token, or from a signed-in session. A read-only token is refused. Workspace API keys aren't accepted.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/workspace/{workspace_id}/connectors
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/workspace/{workspace_id}/connectors:
    post:
      summary: Create workspace connector
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Creates a workspace connector.


        A workspace connector holds the workspace's own OAuth app for a
        connector, so the workspace's apps connect through it instead of through
        Base44's OAuth app. A connector can also run on Base44's OAuth app for
        the apps' users, when `credential_source` is `base44`.


        With `credential_source` set to `byo`, send the client ID and secret of
        an OAuth app you registered in the provider's console, then register the
        redirect URIs from [Get OAuth redirect
        URIs](/api-reference/get-oauth-redirect-uris) there too. With `base44`,
        send neither: the connector runs on Base44's OAuth app, which needs a
        plan that includes Base44-managed connectors and accepts only the scopes
        that app is approved for.


        Names are unique in a workspace, so retrying a create that succeeded
        returns a `409`.


        This is limited to 30 requests per minute, shared by [Create workspace
        connector](/api-reference/create-workspace-connector), [Update workspace
        connector](/api-reference/update-workspace-connector), and [Delete
        workspace connector](/api-reference/delete-workspace-connector). A
        signed-in session has its own limit, and every personal access token for
        the workspace shares one. Some workspaces have a different limit.


        <Note>Call this as an owner or admin of the workspace, with a personal
        access token for that workspace sent as a Bearer token, or from a
        signed-in session. A read-only token is refused. Workspace API keys
        aren't accepted.</Note>
      operationId: create_connector_api_workspace__workspace_id__connectors_post
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the workspace. With a personal access token, use the token's
              workspace. Get it from `organization_id` in [Get
              app](/api-reference/get-app).
            title: Workspace Id
          description: >-
            ID of the workspace. With a personal access token, use the token's
            workspace. Get it from `organization_id` in [Get
            app](/api-reference/get-app).
          example: 67e0b12c4d8a3f005b21c9e4
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationConnectorRequest'
      responses:
        '201':
          description: The new workspace connector.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationConnectorResponse'
        '400':
          description: >-
            The connector can't be set up as a workspace connector,
            `client_secret` is missing for a connector that needs one, the
            connector has no Base44-managed option, a scope isn't available on
            Base44's OAuth app, or a `connection_config` value is missing or
            invalid.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: >-
            `credential_source` is `base44` and the workspace's plan doesn't
            include Base44-managed connectors.
        '403':
          description: >-
            You aren't an owner or admin of the workspace, your token is for a
            different workspace or is read-only, or your credential can't be
            used on this endpoint.
        '404':
          description: The connector isn't available to you.
        '409':
          description: >-
            Another connector in the workspace has this name, or the workspace
            requires an unlocked SSO session.
        '422':
          description: >-
            A field has the wrong type or format, `client_id` is missing with
            `byo`, or `client_id` or `client_secret` was sent with `base44`.
        '429':
          description: Rate limit exceeded.
components:
  schemas:
    CreateOrganizationConnectorRequest:
      properties:
        integration_type:
          anyOf:
            - type: string
              enum:
                - googlecalendar
                - google_classroom
                - googledrive
                - gmail
                - googlesheets
                - googledocs
                - googleslides
                - googlebigquery
                - googlemeet
                - googletasks
                - googleads
                - google_analytics
                - google_search_console
                - slack
                - notion
                - salesforce
                - hubspot
                - linkedin
                - tiktok
                - instagram
                - discord
                - slackbot
                - wix
                - github
                - gitlab
                - bamboohr
                - dropbox
                - clickup
                - wrike
                - box
                - outlook
                - linear
                - airtable
                - microsoft_teams
                - share_point
                - one_drive
                - typeform
                - splitwise
                - hugging_face
                - calendly
                - contentful
                - supabase
                - snowflake
                - databricks
                - quickbooks
                - square
            - type: string
              maxLength: 80
              minLength: 1
              pattern: ^[a-z0-9_]+$
          title: Integration Type
          description: >-
            Connector to create it for, from `integration_type` in [List
            connectors](/api-reference/list-connectors). Its `connector_mode`
            has to be one of `all`, `app_user_only`, `byo_shared_only`, or
            `byo_shared_and_app_user`.
          example: googlecalendar
        name:
          type: string
          minLength: 1
          title: Name
          description: >-
            Name of the workspace connector. Must be unique in the workspace,
            matching case exactly.
          example: Sales Google Calendar
        credential_source:
          type: string
          enum:
            - byo
            - base44
          description: >-
            Whose OAuth app the connector runs on: `byo` for your own,
            registered in the provider's console, or `base44` for Base44's.
            Defaults to `byo`. `base44` needs a plan that includes
            Base44-managed connectors, and only some connectors offer it.
          default: byo
          example: byo
        client_id:
          type: string
          maxLength: 512
          title: Client Id
          description: >-
            Client ID of your OAuth app, up to 512 characters. Required with
            `byo`. Leave it out with `base44`.
          default: ''
          example: 1234567890-abc123def456.apps.googleusercontent.com
        client_secret:
          type: string
          maxLength: 512
          title: Client Secret
          description: >-
            Client secret of your OAuth app, up to 512 characters. Required with
            `byo`, except for connectors whose OAuth apps have no secret, such
            as Linear. Leave it out with `base44`. It's stored encrypted and
            never returned.
          default: ''
          example: your-oauth-client-secret
        scopes:
          items:
            type: string
          type: array
          title: Scopes
          description: >-
            OAuth scopes connections through this connector ask for. With
            `base44`, only scopes Base44's OAuth app is approved for are
            accepted.
          example:
            - https://www.googleapis.com/auth/calendar.readonly
        connection_config:
          additionalProperties:
            type: string
          type: object
          title: Connection Config
          description: >-
            Values the connector needs, keyed by the `name` of each of its
            connection fields. Leave it out for connectors that have none.
          example: {}
      type: object
      required:
        - integration_type
        - name
      title: CreateOrganizationConnectorRequest
      description: A workspace connector to create.
    OrganizationConnectorResponse:
      properties:
        id:
          type: string
          title: Id
          description: >-
            ID of the workspace connector. Pass it as `connector_id` to [Start
            connector connection](/api-reference/start-connector-connection).
          example: 6820f3a4e7b91d003c45a1f9
        organization_id:
          type: string
          title: Organization Id
          description: ID of the workspace.
          example: 67e0b12c4d8a3f005b21c9e4
        integration_type:
          type: string
          title: Integration Type
          description: Connector it's for.
          example: googlecalendar
        name:
          type: string
          title: Name
          description: Name of the workspace connector.
          example: Sales Google Calendar
        credential_source:
          type: string
          enum:
            - byo
            - base44
          description: >-
            Whose OAuth app it runs on: `byo` for the workspace's own, or
            `base44` for Base44's.
          default: byo
          example: byo
        client_id:
          type: string
          title: Client Id
          description: >-
            Client ID of the workspace's OAuth app. Empty for a connector on
            Base44's OAuth app.
          example: 1234567890-abc123def456.apps.googleusercontent.com
        scopes:
          items:
            type: string
          type: array
          title: Scopes
          description: OAuth scopes connections through it ask for.
          example:
            - https://www.googleapis.com/auth/calendar.readonly
        connection_config:
          additionalProperties:
            type: string
          type: object
          title: Connection Config
          description: >-
            Connection values saved on it, keyed by field name. Empty when the
            connector needs none.
          example: {}
        uses_oauth_gateway:
          type: boolean
          title: Uses Oauth Gateway
          description: >-
            Whether new connections return to the single gateway redirect URI
            (`true`) or to the per-app ones (`false`). [Get OAuth redirect
            URIs](/api-reference/get-oauth-redirect-uris) says which to
            register.
          default: false
          example: true
      type: object
      required:
        - id
        - organization_id
        - integration_type
        - name
        - client_id
        - scopes
      title: OrganizationConnectorResponse
      description: A workspace connector. The client secret is never returned.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.