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

# Publish a new version of connector



## OpenAPI

````yaml /api-reference/membrane-api.json post /connectors/{key}/publish-version
openapi: 3.0.0
info:
  title: Membrane API
  description: API documentation for Membrane Engine
  version: '1.0'
  contact: {}
servers:
  - url: https://api.getmembrane.com
security:
  - bearer: []
tags: []
paths:
  /connectors/{key}/publish-version:
    post:
      tags:
        - Connectors
      summary: Publish a new version of connector
      operationId: publishConnectorVersion
      parameters:
        - name: key
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorVersionDto'
components:
  schemas:
    ConnectorVersionDto:
      type: object
      properties:
        baseUri:
          type: string
        revision:
          type: string
        hasTest:
          type: boolean
        hasAuthTest:
          type: boolean
        isReadOnly:
          type: boolean
        version:
          type: string
        credentialsSchema:
          $ref: '#/components/schemas/ConnectorVersionDto__schema0'
        type:
          description: Authentication protocol used by the connector.
          type: string
          enum:
            - integration-app-token
            - membrane-token
            - oauth2
            - oauth1
            - client-credentials
            - proxy
        customCredentialsSchema:
          $ref: '#/components/schemas/ConnectorVersionDto__schema0'
          description: >-
            Additional JSON Schema for workspace-level overrides of credentials
            (e.g. BYO-OAuth clientId/clientSecret).
        inputSchema:
          $ref: '#/components/schemas/ConnectorVersionDto__schema0'
          description: >-
            JSON Schema for end-user input collected during connection (e.g. an
            API key or subdomain the user types in).
        parametersSchema:
          $ref: '#/components/schemas/ConnectorVersionDto__schema0'
        getCredentialsFromConnectionParameters:
          description: >-
            Function that derives auth credentials from connection parameters.
            Use for static-key auth (api-key, basic-auth) where the
            user-provided input IS the credential.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        refreshCredentials:
          description: >-
            Function that refreshes expired credentials. Implement for
            non-standard OAuth refresh flows or when additional credentials need
            to be refreshed alongside the OAuth token.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        makeApiClient:
          description: >-
            Function that configures the authenticated HTTP client used by
            connector API requests and actions. Typically a `mapping` type with
            `baseUri` and auth header wiring.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        getOAuthConfig:
          description: >-
            OAuth2: function returning `{ authorizeUri, tokenUri, scopes,
            noRefreshToken? }` — the authorize/token endpoint URLs and requested
            scopes.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        getTokenData:
          description: >-
            OAuth2: function invoked with the raw token response to extract
            token metadata. Rarely needed.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        getCredentialsFromAccessTokenResponse:
          description: >-
            OAuth2: function that transforms the token endpoint response into
            the final credentials object. Required for multi-tenant APIs
            (Microsoft) or APIs that require post-OAuth bootstrap calls.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        getCredentialsFromRefreshTokenResponse:
          description: >-
            OAuth2: function that transforms the refresh token endpoint response
            into the refreshed credentials. Required when refresh responses
            differ from initial-token responses.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        test:
          description: >-
            Function that verifies the connection by making a lightweight
            authenticated API call (typically a `rest-api-mapping` against a
            `/me`-style endpoint).
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        disconnect:
          description: >-
            Function that revokes credentials at the provider when the
            connection is removed. Implement only if the provider exposes a
            revoke endpoint.
          type: object
          properties:
            type:
              type: string
              enum:
                - mapping
                - rest-api-mapping
                - graphql-api-mapping
                - javascript
            description:
              description: >-
                Human-readable summary of what this function does, in plain
                language. Shown in the UI by default in place of the code.
                Populate it whenever you author or change the code.
              type: string
          additionalProperties:
            type: object
        proxyKey:
          description: >-
            For `type: "proxy"` — identifies which proxy configuration the
            workspace should use.
          type: string
        options:
          type: object
          additionalProperties:
            type: object
            properties:
              type:
                description: Authentication protocol used by the connector.
                type: string
                enum:
                  - integration-app-token
                  - membrane-token
                  - oauth2
                  - oauth1
                  - client-credentials
                  - proxy
              customCredentialsSchema:
                $ref: '#/components/schemas/ConnectorVersionDto__schema0'
                description: >-
                  Additional JSON Schema for workspace-level overrides of
                  credentials (e.g. BYO-OAuth clientId/clientSecret).
              inputSchema:
                $ref: '#/components/schemas/ConnectorVersionDto__schema0'
                description: >-
                  JSON Schema for end-user input collected during connection
                  (e.g. an API key or subdomain the user types in).
              parametersSchema:
                $ref: '#/components/schemas/ConnectorVersionDto__schema0'
                description: >-
                  JSON Schema for connector-level parameters configured per
                  integration (e.g. region, account ID).
              getCredentialsFromConnectionParameters:
                description: >-
                  Function that derives auth credentials from connection
                  parameters. Use for static-key auth (api-key, basic-auth)
                  where the user-provided input IS the credential.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              refreshCredentials:
                description: >-
                  Function that refreshes expired credentials. Implement for
                  non-standard OAuth refresh flows or when additional
                  credentials need to be refreshed alongside the OAuth token.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              makeApiClient:
                description: >-
                  Function that configures the authenticated HTTP client used by
                  connector API requests and actions. Typically a `mapping` type
                  with `baseUri` and auth header wiring.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              getOAuthConfig:
                description: >-
                  OAuth2: function returning `{ authorizeUri, tokenUri, scopes,
                  noRefreshToken? }` — the authorize/token endpoint URLs and
                  requested scopes.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              getTokenData:
                description: >-
                  OAuth2: function invoked with the raw token response to
                  extract token metadata. Rarely needed.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              getCredentialsFromAccessTokenResponse:
                description: >-
                  OAuth2: function that transforms the token endpoint response
                  into the final credentials object. Required for multi-tenant
                  APIs (Microsoft) or APIs that require post-OAuth bootstrap
                  calls.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              getCredentialsFromRefreshTokenResponse:
                description: >-
                  OAuth2: function that transforms the refresh token endpoint
                  response into the refreshed credentials. Required when refresh
                  responses differ from initial-token responses.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              test:
                description: >-
                  Function that verifies the connection by making a lightweight
                  authenticated API call (typically a `rest-api-mapping` against
                  a `/me`-style endpoint).
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              disconnect:
                description: >-
                  Function that revokes credentials at the provider when the
                  connection is removed. Implement only if the provider exposes
                  a revoke endpoint.
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mapping
                      - rest-api-mapping
                      - graphql-api-mapping
                      - javascript
                  description:
                    description: >-
                      Human-readable summary of what this function does, in
                      plain language. Shown in the UI by default in place of the
                      code. Populate it whenever you author or change the code.
                    type: string
                additionalProperties:
                  type: object
              proxyKey:
                description: >-
                  For `type: "proxy"` — identifies which proxy configuration the
                  workspace should use.
                type: string
              ui:
                description: '[INTERNAL] Deprecated: Use inputSchema instead'
                type: object
                properties:
                  schema:
                    $ref: '#/components/schemas/ConnectorVersionDto__schema0'
                  description:
                    type: string
                  helpUri:
                    type: string
              title:
                type: string
              description:
                type: string
              enabled:
                type: object
              credentialsSchema:
                $ref: '#/components/schemas/ConnectorVersionDto__schema0'
        id:
          type: string
        connectorId:
          type: string
        changelog:
          type: string
      required:
        - version
        - id
        - connectorId
        - changelog
    ConnectorVersionDto__schema0:
      type: object
      properties:
        $ref: f65b2b1e-9966-49b9-8679-b495ffd2a7f5
        title:
          type: string
        description:
          type: string
        type:
          anyOf:
            - type: string
            - type: array
              items:
                type: string
        format:
          type: string
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ConnectorVersionDto__schema0'
        items:
          $ref: '#/components/schemas/ConnectorVersionDto__schema0'
        additionalProperties:
          anyOf:
            - type: boolean
            - $ref: '#/components/schemas/ConnectorVersionDto__schema0'
        enum:
          type: array
          items:
            anyOf:
              - type: string
              - type: number
        referenceRecords:
          type: array
          items:
            type: object
        referenceCollection:
          type: object
          properties:
            key:
              type: object
            parameters:
              type: object
              additionalProperties:
                type: object
        referenceDataTable:
          type: object
          properties:
            dataTableId:
              type: string
            value:
              type: string
            label:
              type: string
            filter:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  operator:
                    type: string
                    enum:
                      - is
                      - is_not
                      - is_one_of
                      - is_not_one_of
                      - is_true
                      - is_false
                      - contains
                      - does_not_contain
                      - array_includes
                      - array_does_not_include
                      - less_than
                      - less_than_or_equal
                      - more_than
                      - more_than_or_equal
                      - is_not_empty
                      - is_empty
                  value:
                    type: object
                required:
                  - field
                  - operator
          required:
            - dataTableId
        default:
          type: object
        allowCustom:
          type: boolean
        required:
          type: array
          items:
            type: string
        minLength:
          type: number
        maxLength:
          type: number
        minimum:
          type: number
        maximum:
          type: number
        maxItems:
          type: number
        readOnly:
          type: boolean
        writeOnly:
          type: boolean
        examples:
          type: array
          items:
            type: object
        anyOf:
          type: array
          items:
            $ref: '#/components/schemas/ConnectorVersionDto__schema0'
        isImplied:
          type: boolean
        isSensitive:
          type: boolean
        referenceCollectionPath:
          type: string
        referenceCollectionUri:
          type: string
      additionalProperties:
        type: object
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````