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

# Create Connectors

> Create a new connector record with integration details, configuration, and various relationships including published by workspace and media assets.



## OpenAPI

````yaml POST /v1/connectors
openapi: 3.1.0
info:
  title: Well Document API
  version: 1.0.0
  description: API for uploading and managing financial documents in the Well platform
servers:
  - url: https://api.wellapp.ai
security: []
paths:
  /v1/connectors:
    post:
      tags:
        - Connectors
      summary: Create a new connector
      description: >-
        Create a new connector record with integration details, configuration,
        and various relationships including published by workspace and media
        assets.
      operationId: createConnector
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorPost'
            example:
              type: connector
              attributes:
                slug: salesforce
                name: Salesforce
                description: Connects to Salesforce CRM for sync.
                category: api
                direction: import
                tags:
                  - crm
                  - cloud
                  - sync
                version: 2.1.0
                data_quality:
                  imported_fields:
                    - invoice
                    - company
                    - people
                  last_synced: '2025-06-20T09:00:00Z'
                redirect_url: https://app.well.com/connectors/salesforce/success
                state: active
              relationships:
                published_by:
                  data:
                    type: workspace
                    id: airbyte
                logo:
                  data:
                    type: media
                    id: media3
              included:
                - type: workspace
                  id: airbyte
                  attributes:
                    name: Airbyte
                    description: Open-source data integration platform
                    website: https://airbyte.com
                    external_workspace_id: airbyte_workspace_001
                - type: media
                  id: media3
                  attributes:
                    file_name: salesforce_logo.png
                    content_type: image/png
                    file_size: 15420
                    media_type: logo
                    upload_url: https://storage.well.com/media/salesforce_logo.png
      responses:
        '201':
          description: Connector created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectorPostResponse'
              example:
                data:
                  type: connector
                  id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                  attributes:
                    slug: salesforce
                    name: Salesforce
                    description: Connects to Salesforce CRM for sync.
                    category: api
                    direction: import
                    tags:
                      - crm
                      - cloud
                      - sync
                    status: active
                    data_quality:
                      imported_fields:
                        - invoice
                        - company
                        - people
                      last_synced: '2025-06-20T09:00:00Z'
                    redirect_url: https://app.well.com/connectors/salesforce/success
                    state: active
                    created_at: '2025-10-07T14:30:00.000Z'
                    updated_at: '2025-10-07T14:30:00.000Z'
                  relationships:
                    published_by:
                      data:
                        type: workspace
                        id: airbyte
                    logo:
                      data:
                        type: media
                        id: 550e8400-e29b-41d4-a716-446655440010
                included:
                  - type: workspace
                    id: airbyte
                    attributes:
                      name: Airbyte
                      description: Open-source data integration platform
                      website: https://airbyte.com
                  - type: media
                    id: 550e8400-e29b-41d4-a716-446655440010
                    attributes:
                      file_name: salesforce_logo.png
                      content_type: image/png
                      file_size: 12345
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
              examples:
                missing_required_field:
                  summary: Missing required name
                  value:
                    code: VALIDATION_ERROR
                    status: 400
                    title: Validation Error
                    message: The name field is required
                    meta:
                      log_id: 550e8400-e29b-41d4-a716-446655440999
                      errors:
                        - field: name
                          code: REQUIRED
                          message: This field is required
                invalid_category:
                  summary: Invalid category value
                  value:
                    code: VALIDATION_ERROR
                    status: 400
                    title: Validation Error
                    message: Invalid category value provided
                    meta:
                      log_id: 550e8400-e29b-41d4-a716-446655440998
                      errors:
                        - field: category
                          code: INVALID_ENUM
                          message: Category must be one of the allowed values
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
components:
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
      description: Bearer token for authentication
  schemas:
    ConnectorPost:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: connector
              description: Resource type identifier
            attributes:
              $ref: '#/components/schemas/ConnectorAttributesPost'
            relationships:
              $ref: '#/components/schemas/ConnectorRelationshipsPost'
            included:
              $ref: '#/components/schemas/ConnectorIncludedPost'
          required:
            - type
            - attributes
      required:
        - data
    ConnectorPostResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            type:
              type: string
              const: connector
            id:
              type: string
              format: uuid
              description: UUID of the created connector
              example: 550e8400-e29b-41d4-a716-446655440000
            attributes:
              $ref: '#/components/schemas/ConnectorAttributesPostResponse'
            relationships:
              $ref: '#/components/schemas/ConnectorRelationshipsPostResponse'
            included:
              $ref: '#/components/schemas/ConnectorIncludedPostResponse'
    BadRequestError:
      type: object
      properties:
        code:
          type: string
          example: SCHEMA_VALIDATION_ERROR
          description: Error code identifier
        status:
          type: integer
          example: 400
          description: HTTP status code
        title:
          type: string
          example: Validation Error
          description: Error title
        message:
          type: string
          example: The request is invalid
          description: Detailed error message
        details:
          type: array
          items:
            type: object
            properties:
              instancePath:
                type: string
                description: Path to the invalid field in the request
              schemaPath:
                type: string
                description: Path to the validation rule in the schema
              keyword:
                type: string
                description: Validation keyword that failed
              params:
                type: object
                description: Parameters related to the validation failure
              message:
                type: string
                description: Human-readable validation error message
          description: Array of detailed validation errors
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    UnauthorizedError:
      type: object
      properties:
        code:
          type: string
          example: UNAUTHORIZED
          description: Error code identifier
        status:
          type: integer
          example: 401
          description: HTTP status code
        title:
          type: string
          example: Unauthorized
          description: Error title
        message:
          type: string
          example: You are not authorized to access this resource
          description: Detailed error message
        meta:
          type: object
          properties:
            log_id:
              type: string
              format: uuid
              example: 65c669d4-679c-4a8b-b8c0-fbe37699bb5b
              description: Unique identifier for tracking this error in logs
          required:
            - log_id
      required:
        - code
        - status
        - title
        - message
        - meta
    ConnectorAttributesPost:
      type: object
      properties:
        slug:
          type: string
          maxLength: 255
          pattern: ^[a-z0-9_-]+$
          description: Connector slug used in URLs (system generated if not provided)
          example: salesforce
        name:
          type: string
          maxLength: 255
          description: Connector name
          example: Salesforce
        description:
          type: string
          maxLength: 1000
          description: Description of the connector
          example: Connects to Salesforce CRM for sync.
        category:
          type: string
          enum:
            - database
            - data_warehouse
            - file
            - ...
          description: >-
            Category type. See [all available
            categories](/enums/category-connector) for complete list.
          example: api
        direction:
          type: string
          description: Data flow direction capability
          enum:
            - import
            - export
          example: import
        tags:
          type: array
          items:
            type: string
          description: Grouping/search tags
          example:
            - crm
            - cloud
            - sync
        version:
          type: string
          pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
          description: Connector version
          example: 2.1.0
        data_quality:
          type: object
          properties:
            imported_fields:
              type: array
              items:
                type: string
                enum:
                  - invoice
                  - company
                  - people
                  - - ...
              description: >-
                Category connector. See [all available
                categories](/enums/category-connector) for complete list.
              example:
                - invoice
                - company
                - people
            last_synced:
              type: string
              format: date-time
              description: Timestamp of last sync
              example: '2025-06-20T09:00:00Z'
        redirect_url:
          type: string
          format: uri
          description: URL to redirect customers after onboarding flow
          example: https://app.well.com/connectors/salesforce/success
        state:
          type: string
          description: State included in the redirect URL
          example: active
      required:
        - name
        - slug
        - description
        - category
        - direction
    ConnectorRelationshipsPost:
      type: object
      properties:
        published_by:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: workspace
                id:
                  type: string
                  description: >-
                    UUID of an existing workspace or temp-id that references a
                    workspace defined in the included array
                  example: airbyte
              required:
                - type
                - id
        logo:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: media
                id:
                  type: string
                  description: >-
                    UUID of an existing logo or temp-id that references a logo
                    defined in the included array
                  example: media3
              required:
                - type
                - id
    ConnectorIncludedPost:
      type: object
      properties:
        published_by:
          type: object
          description: Workspaces associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: workspace
                  id:
                    type: string
                    format: uuid
                    description: >-
                      Temp-id that references to the publisher defined in the
                      included array
                  attributes:
                    $ref: '#/components/schemas/WorkspaceCreateAttributes'
                required:
                  - type
                  - id
                  - attributes
        logo:
          type: object
          description: Media files associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: media
                  id:
                    type: string
                    format: uuid
                    description: >-
                      Temp-id that references to the logo defined in the
                      included array
                  attributes:
                    $ref: '#/components/schemas/MediaAttributesJson'
                required:
                  - type
                  - id
                  - attributes
    ConnectorAttributesPostResponse:
      type: object
      properties:
        slug:
          type: string
          maxLength: 255
          pattern: ^[a-z0-9_-]+$
          description: Connector slug used in URLs (system generated if not provided)
          example: salesforce
        name:
          type: string
          maxLength: 255
          description: Connector name
          example: Salesforce
        description:
          type: string
          maxLength: 1000
          description: Description of the connector
          example: Connects to Salesforce CRM for sync.
        category:
          type: string
          enum:
            - database
            - ...
          description: >-
            Integration category. See [all available
            categories](/enums/category-connector) for complete list.
          example: api
        direction:
          type: string
          enum:
            - import
            - export
            - both
          description: Data flow direction capability
          example: import
        tags:
          type: array
          items:
            type: string
          description: Grouping/search tags
          example:
            - crm
            - cloud
            - sync
        data_quality:
          type: object
          properties:
            imported_fields:
              type: array
              items:
                type: string
                enum:
                  - invoice
                  - company
                  - people
              description: >-
                Category connector. See [all available
                categories](/enums/category-connector) for complete list.
              example:
                - invoice
                - company
                - people
            last_synced:
              type: string
              format: date-time
              description: Timestamp of last sync
              example: '2025-06-20T09:00:00Z'
        redirect_url:
          type: string
          format: uri
          description: URL to redirect customers after onboarding flow
          example: https://app.well.com/connectors/salesforce/success
        state:
          type: string
          description: State included in the redirect URL
          example: active
        status:
          type: string
          enum:
            - active
            - beta
            - deprecated
          description: Lifecycle status (system managed)
          example: active
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2025-10-07T14:30:00.000Z'
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2025-10-07T14:30:00.000Z'
    ConnectorRelationshipsPostResponse:
      type: object
      properties:
        published_by:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: workspace
                id:
                  type: string
                  format: uuid
                  description: UUID of the workspace that published this connector
                  example: 550e8400-e29b-41d4-a716-446655440001
        logo:
          type: object
          properties:
            data:
              type: object
              properties:
                type:
                  type: string
                  const: media
                id:
                  type: string
                  format: uuid
                  description: UUID of the logo media
                  example: 550e8400-e29b-41d4-a716-446655440010
    ConnectorIncludedPostResponse:
      type: object
      description: >-
        Object containing included resources referenced in relationships,
        organized by resource type. These are the actual created/linked
        resources with real UUIDs.
      properties:
        published_by:
          type: object
          description: Workspaces associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: workspace
                  id:
                    type: string
                    format: uuid
                    description: UUID of the workspace
                  attributes:
                    $ref: '#/components/schemas/WorkspaceCreateAttributes'
        media:
          type: object
          description: Media files associated with this company
          properties:
            data:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    const: media
                  id:
                    type: string
                    format: uuid
                    description: UUID of the media
                  attributes:
                    $ref: '#/components/schemas/MediaAttributes'
    WorkspaceCreateAttributes:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Workspace name
        description:
          type: string
          maxLength: 1000
          description: Workspace description
        avatar_color:
          type: string
          pattern: ^#[A-Fa-f0-9]{6}$
          description: 'Avatar color in hexadecimal format (e.g., #FF5733)'
        external_workspace_id:
          type: string
          minLength: 1
          maxLength: 255
          description: External workspace identifier
      required:
        - name
    MediaAttributesJson:
      type: object
      properties:
        media_type:
          type: string
          enum:
            - avatar
            - logo
            - banner
          description: >-
            Type of media (avatar, logo, banner) See [Media type
            documentation](/enums/media) for complete list.
        is_primary:
          type: boolean
          default: true
          description: 'Marks preferred media. Default: true'
        url:
          type: string
          format: uri
          description: Direct media URL
          examples:
            - https://cdn.example.com/avatar.jpg
      required:
        - media_type
        - url
    MediaAttributes:
      type: object
      properties:
        media_type:
          type: string
          enum:
            - avatar
            - logo
            - banner
        url:
          type: string
          format: uri
          description: URL to the media file
        is_primary:
          type: boolean
          description: Whether this is the primary media
        processed_at:
          type:
            - string
          format: date-time
          description: Timestamp when media processing completed
        uploaded_at:
          type: string
          format: date-time

````