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

# Create connector

> Create a new connector



## OpenAPI

````yaml https://api.getcargo.io/openapi.json post /connection/connectors
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /connection/connectors:
    post:
      tags:
        - Connection - Connectors
      summary: Create connector
      description: Create a new connector
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  title: Name
                  description: Connector name.
                slug:
                  type: string
                  pattern: ^[a-z0-9]+(_[a-z0-9]+)*$
                  title: Slug
                  description: Connector slug.
                integrationSlug:
                  title: Integration slug
                  description: Integration identifier.
                  type: string
                config:
                  title: Config
                  description: Connector configuration.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                rateLimit:
                  title: Rate limit
                  description: Rate limit configuration.
                  type: object
                  properties:
                    unit:
                      type: string
                      enum:
                        - day
                        - hour
                        - minute
                        - second
                      title: Unit
                      description: Rate limit time unit.
                    max:
                      type: number
                      title: Max
                      description: Maximum requests per unit.
                    strategy:
                      type: string
                      enum:
                        - spread
                        - burst
                      title: Strategy
                      description: >-
                        Rate limit strategy: spread requests evenly or allow
                        burst then wait.
                  required:
                    - unit
                    - max
                    - strategy
                cacheTtlMilliseconds:
                  title: Cache TTL milliseconds
                  description: Cache time-to-live in milliseconds.
                  type: number
              required:
                - name
                - slug
                - integrationSlug
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  connector:
                    allOf:
                      - type: object
                        properties:
                          uuid:
                            type: string
                          workspaceUuid:
                            type: string
                          userUuid:
                            type: string
                          name:
                            type: string
                          slug:
                            type: string
                          rateLimit:
                            anyOf:
                              - type: object
                                properties:
                                  unit:
                                    type: string
                                    enum:
                                      - day
                                      - hour
                                      - minute
                                      - second
                                  max:
                                    type: number
                                required:
                                  - unit
                                  - max
                                additionalProperties: false
                              - type: 'null'
                          cacheTtlMilliseconds:
                            anyOf:
                              - type: number
                              - type: 'null'
                          integrationSlug:
                            type: string
                          isDefault:
                            type: boolean
                          playsCount:
                            type: number
                          toolsCount:
                            type: number
                          modelsCount:
                            type: number
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          deletedAt:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - uuid
                          - workspaceUuid
                          - userUuid
                          - name
                          - slug
                          - rateLimit
                          - cacheTtlMilliseconds
                          - integrationSlug
                          - isDefault
                          - playsCount
                          - toolsCount
                          - modelsCount
                          - createdAt
                          - updatedAt
                          - deletedAt
                        additionalProperties: false
                      - anyOf:
                          - type: object
                            properties:
                              useCredits:
                                type: boolean
                                const: true
                              config:
                                type: 'null'
                            required:
                              - useCredits
                              - config
                            additionalProperties: false
                          - type: object
                            properties:
                              useCredits:
                                type: boolean
                                const: false
                              config:
                                type: object
                                propertyNames:
                                  type: string
                                additionalProperties: {}
                            required:
                              - useCredits
                              - config
                            additionalProperties: false
                    title: Connector
                    description: Connector details.
                  dataset:
                    allOf:
                      - type: object
                        properties:
                          uuid:
                            type: string
                          workspaceUuid:
                            type: string
                          slug:
                            type: string
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          deletedAt:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - uuid
                          - workspaceUuid
                          - slug
                          - createdAt
                          - updatedAt
                          - deletedAt
                        additionalProperties: false
                      - anyOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: connector
                              connectorUuid:
                                type: string
                            required:
                              - kind
                              - connectorUuid
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                const: native
                            required:
                              - kind
                            additionalProperties: false
                    title: Dataset
                    description: Created dataset details.
                required:
                  - connector
                  - dataset
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````