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

# Create a custom API connector

> Registers a new custom HTTP API endpoint as a connector in your workspace. Once created the connector appears as an enrichment/exporter you can use in tables.



## OpenAPI

````yaml POST /v1/connectors/
openapi: 3.1.0
info:
  title: Databar.ai API
  description: >-

    # Authentication


    Databar uses API keys to allow access to the API. You can find your API key
    in your workspace home page, but to use the REST API you’ll first need to
    schedule a call with us.

    Our API expects the API key to be included in all API requests to the server
    in the Header of your request with the key `x-apikey`.

    To find your API key, head over to your Databar workspace and click
    Integrations.


    **Example:**


    `bash

    curl https://api.databar.ai/v1/user/me -H x-apikey: {YOUR_API_KEY}`
  contact:
    email: info@databar.ai
  version: 0.1.2
servers:
  - url: https://api.databar.ai
    description: Production
security: []
paths:
  /v1/connectors/:
    post:
      tags:
        - Connector
      summary: Create a custom API connector
      description: >-
        Registers a new custom HTTP API endpoint as a connector in your
        workspace. Once created the connector appears as an enrichment/exporter
        you can use in tables.
      operationId: create_connector_v1_connectors__post
      parameters:
        - name: x-apikey
          in: header
          required: true
          schema:
            type: string
            title: API Key
            description: API Key for authentication
          description: API Key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectorCreate'
            examples:
              enrichment:
                summary: Enrichment connector (POST)
                value:
                  name: My Scoring API
                  type: enrichment
                  method: post
                  url: https://api.example.com/v1/score
                  headers:
                    - name: Authorization
                      value: Bearer sk-xxx
                    - name: Content-Type
                      value: application/json
                  parameters:
                    - name: company_domain
                      value: ''
                  body:
                    - name: domain
                      value: ''
                    - name: enrichment_type
                      value: full
                  rate_limit: 60
                  max_concurrency: 5
              simple_get:
                summary: Simple GET connector
                value:
                  name: Company Lookup
                  type: enrichment
                  method: get
                  url: https://api.example.com/v1/company
                  headers:
                    - name: Authorization
                      value: Bearer sk-xxx
                  parameters:
                    - name: domain
                      value: ''
      responses:
        '201':
          description: Connector created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connector'
              example:
                id: 42
                name: My Scoring API
                type: enrichment
                method: post
                url: https://api.example.com/v1/score
                headers:
                  - name: Authorization
                    value: Bearer sk-xxx
                  - name: Content-Type
                    value: application/json
                parameters:
                  - name: company_domain
                    value: ''
                body:
                  - name: domain
                    value: ''
                  - name: enrichment_type
                    value: full
                rate_limit: 10
                max_concurrency: 5
                created_at: '2025-01-15T10:30:00Z'
        '400':
          description: Validation error
        '406':
          description: Connector limit reached for your plan
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ConnectorCreate:
      properties:
        name:
          type: string
          maxLength: 256
          title: Name
          description: Display name for the connector
        type:
          type: string
          title: Type
          description: 'Connector type: simple, enrichment, or exporter'
          default: enrichment
        method:
          type: string
          title: Method
          description: 'HTTP method: get, post, put, or patch'
        url:
          type: string
          maxLength: 512
          title: Url
          description: Full API endpoint URL (e.g. https://api.example.com/v1/score)
        headers:
          items:
            $ref: '#/components/schemas/NameValue'
          type: array
          title: Headers
          description: HTTP headers to send with each request
        parameters:
          items:
            $ref: '#/components/schemas/NameValue'
          type: array
          title: Parameters
          description: Query parameters
        body:
          items:
            $ref: '#/components/schemas/NameValue'
          type: array
          title: Body
          description: Request body fields
        body_template:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Body Template
          description: >-
            Jinja body template. When set, template variables become body params
            instead of 'body' list.
        rate_limit:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Rate Limit
          description: Max requests per minute (capped by plan)
        max_concurrency:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Max Concurrency
          description: Max concurrent requests (capped by plan)
      type: object
      required:
        - name
        - method
        - url
      title: ConnectorCreate
    Connector:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        type:
          type: string
          title: Type
        method:
          type: string
          title: Method
        url:
          type: string
          title: Url
        headers:
          items:
            $ref: '#/components/schemas/NameValue'
          type: array
          title: Headers
          default: []
        parameters:
          items:
            $ref: '#/components/schemas/NameValue'
          type: array
          title: Parameters
          default: []
        body:
          items:
            $ref: '#/components/schemas/NameValue'
          type: array
          title: Body
          default: []
        body_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Template
        rate_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rate Limit
        max_concurrency:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Concurrency
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
      type: object
      required:
        - id
        - name
        - type
        - method
        - url
      title: Connector
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NameValue:
      properties:
        name:
          type: string
          title: Name
        value:
          type: string
          title: Value
          default: ''
      type: object
      required:
        - name
      title: NameValue
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````