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

# Link a funder to the current broker for self-service

> Links a funder to the current broker for self-service integration. The funder must exist in Heron's registry of self-service-supported funders. For multi-channel funders (e.g. those with both API and portal support), API is preferred. Returns the new entry in the same shape as `GET /api/funder_integrations/`.




## OpenAPI

````yaml https://app.herondata.io/swagger post /api/funder_integrations/
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/funder_integrations/:
    post:
      summary: Link a funder to the current broker for self-service
      description: >
        Links a funder to the current broker for self-service integration. The
        funder must exist in Heron's registry of self-service-supported funders.
        For multi-channel funders (e.g. those with both API and portal support),
        API is preferred. Returns the new entry in the same shape as `GET
        /api/funder_integrations/`.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddFunderIntegrationRequestSchema'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunderIntegrationViewSchema'
          description: Funder linked
        '400':
          description: Funder not supported for self-service
        '404':
          description: Funder not found
        '409':
          description: Broker is already linked to this funder
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AddFunderIntegrationRequestSchema:
      properties:
        funder_heron_id:
          type: string
      required:
        - funder_heron_id
      type: object
    FunderIntegrationViewSchema:
      properties:
        channel_type:
          enum:
            - api
            - portal
            - null
          nullable: true
        config:
          allOf:
            - $ref: '#/components/schemas/FunderIntegrationConfig'
          nullable: true
        funder_heron_id:
          type: string
        funder_logo_url:
          nullable: true
          type: string
        funder_name:
          type: string
        production:
          allOf:
            - $ref: '#/components/schemas/IntegrationEnvironment'
          nullable: true
        slug:
          nullable: true
          type: string
        staging:
          allOf:
            - $ref: '#/components/schemas/IntegrationEnvironment'
          nullable: true
        state:
          enum:
            - not_available
            - not_configured
            - staging_configured
            - staging_tested
            - live
        supports_staging:
          type: boolean
      required:
        - funder_heron_id
        - funder_name
        - state
        - supports_staging
      type: object
    FunderIntegrationConfig:
      properties:
        channel_type:
          enum:
            - api
            - portal
        display_name:
          type: string
        form_fields:
          items:
            $ref: '#/components/schemas/FormField'
          type: array
        supports_staging:
          type: boolean
      required:
        - channel_type
        - display_name
        - form_fields
        - supports_staging
      type: object
    IntegrationEnvironment:
      properties:
        has_credentials:
          type: boolean
        last_test_attempted_at:
          format: date-time
          nullable: true
          type: string
        last_test_deal_id:
          nullable: true
          type: string
        last_test_status:
          enum:
            - not_run
            - in_progress
            - succeeded
            - failed
        last_test_status_message:
          nullable: true
          type: string
      required:
        - has_credentials
        - last_test_status
      type: object
    FormField:
      properties:
        field_type:
          enum:
            - text
            - password
        label:
          type: string
        name:
          type: string
        required:
          type: boolean
      required:
        - field_type
        - label
        - name
        - required
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````