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

# Create Integration

> Create a new integration. Credentials can be supplied inline (a provider connection is created or updated) or reference an existing connectionId.



## OpenAPI

````yaml https://hub.griff.services/documentation/json post /integrations/
openapi: 3.1.0
info:
  title: Griffin Hub API
  description: API for managing and running test monitors
  version: 1.0.0
servers:
  - url: https://hub.griff.services
    description: Local development server
  - url: http://localhost:3000
    description: Local development server
security:
  - bearerAuth: []
tags:
  - name: monitors
    description: Test monitor management endpoints
  - name: runs
    description: Test run management endpoints
  - name: metrics
    description: Metrics and health summary endpoints
paths:
  /integrations/:
    post:
      tags:
        - integrations
      summary: Create Integration
      description: >-
        Create a new integration. Credentials can be supplied inline (a provider
        connection is created or updated) or reference an existing connectionId.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - category
                - provider
                - name
              properties:
                category:
                  type: string
                  enum:
                    - notifications
                    - secrets
                    - metrics
                provider:
                  type: string
                  enum:
                    - aws
                    - vault
                    - slack
                    - email
                    - webhook
                    - resend
                name:
                  type: string
                connectionId:
                  anyOf:
                    - type: string
                    - type: 'null'
                config:
                  $ref: '#/components/schemas/IntegrationConfig'
                credentials:
                  type: object
                  additionalProperties:
                    type: string
                environment:
                  anyOf:
                    - type: string
                    - type: 'null'
                enabled:
                  type: boolean
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Integration'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '502':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '504':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
components:
  schemas:
    IntegrationConfig:
      anyOf:
        - type: object
          required:
            - providerType
            - fromAddress
          properties:
            providerType:
              type: string
              enum:
                - email
            fromAddress:
              type: string
            fromName:
              type: string
            replyTo:
              type: string
        - type: object
          required:
            - providerType
            - url
          properties:
            providerType:
              type: string
              enum:
                - webhook
            url:
              type: string
            headers:
              type: object
              additionalProperties:
                type: string
        - type: object
          required:
            - providerType
          properties:
            providerType:
              type: string
              enum:
                - slack
            channel:
              type: string
            mentionUsers:
              type: array
              items:
                type: string
        - type: object
          required:
            - providerType
            - region
          properties:
            providerType:
              type: string
              enum:
                - aws
            region:
              type: string
      title: IntegrationConfig
    Integration:
      type: object
      required:
        - id
        - organizationId
        - category
        - provider
        - name
        - hasCredentials
        - enabled
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
        organizationId:
          type: string
        category:
          type: string
          enum:
            - notifications
            - secrets
            - metrics
          title: IntegrationCategory
        provider:
          type: string
          enum:
            - aws
            - vault
            - slack
            - email
            - webhook
            - resend
          title: Provider
        name:
          type: string
        connectionId:
          type: string
        config:
          $ref: '#/components/schemas/IntegrationConfig'
        hasCredentials:
          type: boolean
        enabled:
          type: boolean
        environment:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      title: Integration
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````