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

# Create auth configuration

> Create an authentication configuration (OAuth or API key) for a toolkit. Workflows and agents can then use this config to connect to the external service (e.g. Slack, CRM).



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/auth_configs
openapi: 3.0.0
info:
  title: Flowra API (API Key Endpoints)
  description: >-
    **Flowra** is an AI-powered platform for building agents, workflows, and
    integrations.


    ### Capabilities

    - **Tools & Toolkits** – Define and group tools for agents and workflows.

    - **Workflows** – Orchestrate steps and automate processes.

    - **Triggers** – Schedule or event-based execution.

    - **Auth & Connections** – OAuth, API keys, and connected accounts.

    - **MCP** – Model Context Protocol server integration.

    - **Knowledge / RAG** – Add files and URLs for retrieval-augmented
    generation.


    ### Authentication

    Use the **x-api-key** header with a project API key to access endpoints that
    support API Key auth. Create and manage API keys in the dashboard under your
    project settings.


    Only endpoints that support API Key authentication via the @ApiKeyEnabled()
    decorator.


    Send x-api-key (required). On multi-tenant endpoints, optionally send
    x-username to act as an external user.
  version: '1.0'
  contact:
    name: Flowra
    url: https://flowra.dev
servers:
  - url: https://flowra.dev
    description: Flowra API
security: []
tags:
  - name: Users
    description: User profile
  - name: External Users
    description: End-user identities inside a project (x-username)
  - name: Auth Configs
    description: OAuth and API key configs for toolkits
  - name: Connected Accounts
    description: OAuth connected accounts and link creation
  - name: Toolkits
    description: List and search toolkits
  - name: Tools
    description: List, execute, and manage tools
  - name: Skills
    description: Browse, create, import, and install skills
  - name: Workflow & Agent
    description: Create, run, and inspect workflows and agents
  - name: Triggers
    description: Schedule and event-based trigger instances
  - name: Chat
    description: Threads and streaming agent runs
  - name: File
    description: Upload, list, and download files
  - name: Knowledge
    description: RAG knowledge collections
  - name: Table
    description: Collections and documents
  - name: Sandbox
    description: Ephemeral and durable code sandboxes
  - name: Browser
    description: Live browser sessions and view
  - name: LLM
    description: List AI models and generate completions
  - name: MCP
    description: MCP server management
  - name: usage
    description: Credit balance and usage ledger for the project API key
paths:
  /api/v1/auth_configs:
    post:
      tags:
        - Auth Configs
      summary: Create auth configuration
      description: >-
        Create an authentication configuration (OAuth or API key) for a toolkit.
        Workflows and agents can then use this config to connect to the external
        service (e.g. Slack, CRM).
      operationId: AuthConfigController_createAuthConfig
      requestBody:
        required: true
        description: Auth configuration data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAuthConfigDto'
      responses:
        '200':
          description: Auth config created successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CreateAuthConfigResponseDtoSuccessResponse
              example:
                success: true
                message: Operation completed successfully
                data:
                  toolkit:
                    slug: gmail
                  authConfig:
                    id: auth_config_123
                    authScheme: OAUTH2
                    provider: LOCAL
                    externalId: ac_gmail_abc123
                    isProviderManaged: true
                    restrictToFollowingTools: []
      security:
        - x-api-key: []
components:
  schemas:
    CreateAuthConfigDto:
      type: object
      properties:
        toolkit:
          $ref: '#/components/schemas/Toolkit1Dto'
        authConfig:
          description: Auth configuration
          oneOf:
            - $ref: '#/components/schemas/ComposioManagedAuthConfigDto'
            - $ref: '#/components/schemas/CustomAuthConfigDto'
          discriminator:
            propertyName: type
            mapping:
              use_provider_managed_auth: '#/components/schemas/ComposioManagedAuthConfigDto'
              use_custom_auth: '#/components/schemas/CustomAuthConfigDto'
          example:
            type: use_provider_managed_auth
            displayName: Gmail (managed)
      required:
        - toolkit
        - authConfig
    CreateAuthConfigResponseDtoSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Success status
          example: true
        message:
          type: string
          description: Success message
          example: Operation completed successfully
        data:
          type: object
          properties:
            toolkit:
              type: object
              properties:
                slug:
                  type: string
                  description: Toolkit slug
                  example: gmail
              required:
                - slug
            authConfig:
              type: object
              properties:
                id:
                  type: string
                  description: Auth config ID
                  example: auth_config_123
                authScheme:
                  enum:
                    - OAUTH1
                    - OAUTH2
                    - S2S_OAUTH2
                    - API_KEY
                    - BASIC
                    - BEARER_TOKEN
                    - BILLCOM_AUTH
                    - GOOGLE_SERVICE_ACCOUNT
                    - NO_AUTH
                    - BASIC_WITH_JWT
                    - CALCOM_AUTH
                    - SERVICE_ACCOUNT
                    - SAML
                    - DCR_OAUTH
                    - COOKIE
                    - WHATSAPP_QR
                  type: string
                  description: Authentication scheme
                  example: OAUTH2
                provider:
                  enum:
                    - COMPOSIO
                    - LOCAL
                  type: string
                  description: Provider (COMPOSIO or LOCAL)
                  example: LOCAL
                externalId:
                  type: string
                  description: External ID from the provider
                  example: ac_gmail_abc123
                isProviderManaged:
                  type: boolean
                  description: Whether this auth is provider-managed (by Local or Composio)
                  example: true
                restrictToFollowingTools:
                  description: Restricted tools
                  example: []
                  type: array
                  items:
                    type: string
              required:
                - id
                - authScheme
                - provider
                - isProviderManaged
                - restrictToFollowingTools
          required:
            - toolkit
            - authConfig
          example:
            toolkit:
              slug: gmail
            authConfig:
              id: auth_config_123
              authScheme: OAUTH2
              provider: LOCAL
              externalId: ac_gmail_abc123
              isProviderManaged: true
              restrictToFollowingTools: []
      required:
        - success
        - message
        - data
    Toolkit1Dto:
      type: object
      properties:
        slug:
          type: string
          description: Toolkit slug
          example: slack
      required:
        - slug
    ComposioManagedAuthConfigDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - use_provider_managed_auth
          description: Auth config type
          example: use_provider_managed_auth
        name:
          type: string
          description: >-
            Ignored: server allocates a unique internal name (e.g. gmail-9qmlw6)
            for Composio sync
          example: gmail-9qmlw6
        displayName:
          type: string
          description: Optional UI label (not sent to Composio as the sync name)
          example: Gmail (production)
        credentials:
          type: object
          description: Credentials for provider-managed auth
          additionalProperties: true
        toolAccessConfig:
          $ref: '#/components/schemas/ComposioManagedAuthToolAccessConfigDto'
        restrictToFollowingTools:
          description: Restricted tools
          example:
            - tool1
            - tool2
          type: array
          items:
            type: string
      required:
        - type
    CustomAuthConfigDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - use_custom_auth
          description: Auth config type
          example: use_custom_auth
        name:
          type: string
          description: >-
            Ignored: server allocates a unique internal name (e.g. slack-9qmlw6)
            for Composio sync
          example: slack-9qmlw6
        displayName:
          type: string
          description: Optional UI label (not sent to Composio as the sync name)
          example: Slack staging
        authScheme:
          enum:
            - OAUTH1
            - OAUTH2
            - S2S_OAUTH2
            - API_KEY
            - BASIC
            - BEARER_TOKEN
            - BILLCOM_AUTH
            - GOOGLE_SERVICE_ACCOUNT
            - NO_AUTH
            - BASIC_WITH_JWT
            - CALCOM_AUTH
            - SERVICE_ACCOUNT
            - SAML
            - DCR_OAUTH
            - COOKIE
            - WHATSAPP_QR
          type: string
          description: Authentication scheme
          example: OAUTH2
        credentials:
          type: object
          description: Credentials for custom auth
          additionalProperties: true
        proxyConfig:
          $ref: '#/components/schemas/CustomAuthProxyConfigDto'
        restrictToFollowingTools:
          description: Restricted tools
          example:
            - tool1
            - tool2
          type: array
          items:
            type: string
        toolAccessConfig:
          $ref: '#/components/schemas/CustomAuthToolAccessConfigDto'
      required:
        - type
        - authScheme
    ComposioManagedAuthToolAccessConfigDto:
      type: object
      properties:
        toolsForConnectedAccountCreation:
          description: Tools for connected account creation
          example:
            - tool1
            - tool2
          type: array
          items:
            type: string
    CustomAuthProxyConfigDto:
      type: object
      properties:
        proxyUrl:
          type: string
          description: Proxy URL
          example: https://proxy.example.com
        proxyAuthKey:
          type: string
          description: Proxy authentication key
          example: auth_key_123
      required:
        - proxyUrl
    CustomAuthToolAccessConfigDto:
      type: object
      properties:
        toolsForConnectedAccountCreation:
          description: Tools for connected account creation
          example:
            - tool1
            - tool2
          type: array
          items:
            type: string
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Project API key. Create and manage keys in the dashboard under Project →
        API Keys. Send as header: x-api-key: <your-key>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.