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

# Create an integration

> Connect AWS, BigQuery, GitLab, PostgreSQL, Snyk, OpenConnect VPN, or Tailscale using provider credentials. For browser-authorized providers, use listIntegrationProviders and authorizeIntegration instead.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public post /v1/integrations
openapi: 3.1.0
info:
  title: Tembo Public API
  description: >-
    Manage agents, sessions, repositories, and organization resources with the
    Tembo API.
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/integrations:
    post:
      tags:
        - Integrations
      summary: Create an integration
      description: >-
        Connect AWS, BigQuery, GitLab, PostgreSQL, Snyk, OpenConnect VPN, or
        Tailscale using provider credentials. For browser-authorized providers,
        use listIntegrationProviders and authorizeIntegration instead.
      operationId: createIntegration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    environment:
                      type: string
                      minLength: 1
                      maxLength: 200
                      description: Display label for the AWS environment.
                    roleArn:
                      type: string
                      minLength: 1
                      maxLength: 2048
                      description: AWS IAM role ARN to assume for account access.
                    type:
                      type: string
                      const: aws
                      description: Create an AWS account integration.
                  required:
                    - environment
                    - roleArn
                    - type
                  additionalProperties: false
                - type: object
                  properties:
                    projectId:
                      type: string
                      pattern: ^[a-z][a-z0-9-]{4,28}[a-z0-9]$
                      description: Google Cloud project ID for BigQuery.
                    serviceAccountJson:
                      type: string
                      minLength: 1
                      maxLength: 1000000
                      description: >-
                        Google Cloud service-account JSON credentials for
                        BigQuery.
                    type:
                      type: string
                      const: bigquery
                      description: Create a BigQuery integration.
                  required:
                    - projectId
                    - serviceAccountJson
                    - type
                  additionalProperties: false
                - type: object
                  properties:
                    accessToken:
                      type: string
                      minLength: 1
                      maxLength: 65536
                      description: GitLab access token used to connect the integration.
                    type:
                      type: string
                      const: gitlab
                      description: Create a GitLab integration.
                  required:
                    - accessToken
                    - type
                  additionalProperties: false
                - type: object
                  properties:
                    gateway:
                      type: string
                      minLength: 1
                      maxLength: 2048
                      description: VPN gateway hostname or URL for OpenConnect.
                    instanceName:
                      type: string
                      minLength: 1
                      maxLength: 200
                      description: Display name for the VPN connection.
                    password:
                      type: string
                      minLength: 1
                      maxLength: 65536
                      description: VPN login password.
                    protocol:
                      type: string
                      enum:
                        - fortinet
                        - anyconnect
                        - gp
                        - nc
                      description: OpenConnect VPN protocol supported by the gateway.
                    type:
                      type: string
                      const: openconnect
                      description: Create an OpenConnect VPN integration.
                    username:
                      type: string
                      minLength: 1
                      maxLength: 4096
                      description: VPN login username.
                  required:
                    - gateway
                    - instanceName
                    - password
                    - protocol
                    - type
                    - username
                  additionalProperties: false
                - type: object
                  properties:
                    caCertificate:
                      description: >-
                        Optional CA certificate for the PostgreSQL TLS
                        connection.
                      type: string
                      maxLength: 1000000
                    connectionString:
                      type: string
                      minLength: 1
                      maxLength: 16384
                      description: >-
                        PostgreSQL connection URI, including credentials. Stored
                        as secret configuration.
                    instanceName:
                      type: string
                      minLength: 1
                      maxLength: 200
                      description: Display name for the PostgreSQL instance.
                    type:
                      type: string
                      const: postgres
                      description: Create a PostgreSQL integration.
                  required:
                    - connectionString
                    - instanceName
                    - type
                  additionalProperties: false
                - type: object
                  properties:
                    clientId:
                      type: string
                      minLength: 1
                      maxLength: 16384
                      description: Snyk service-account client ID.
                    clientSecret:
                      type: string
                      minLength: 1
                      maxLength: 65536
                      description: Snyk service-account client secret.
                    organizationId:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      description: >-
                        Snyk organization ID, not a Tembo organization ID.
                        Discover choices with discoverSnykOrganizations.
                    organizationName:
                      description: Optional display name for the Snyk organization.
                      type: string
                      minLength: 1
                      maxLength: 500
                    type:
                      type: string
                      const: snyk
                      description: Create a Snyk integration.
                  required:
                    - clientId
                    - clientSecret
                    - organizationId
                    - type
                  additionalProperties: false
                - type: object
                  properties:
                    instanceName:
                      type: string
                      minLength: 1
                      maxLength: 200
                      description: Display name for the Tailscale connection.
                    oauthClientId:
                      type: string
                      minLength: 1
                      maxLength: 16384
                      description: >-
                        Tailscale OAuth client ID authorized to create tagged
                        devices.
                    oauthClientSecret:
                      type: string
                      minLength: 1
                      maxLength: 65536
                      description: Tailscale OAuth client secret.
                    tags:
                      minItems: 1
                      maxItems: 100
                      type: array
                      items:
                        type: string
                        pattern: ^tag:[a-z0-9][a-z0-9-]*$
                      description: >-
                        Tags to assign to connected devices, such as tag:tembo.
                        Must be authorized for the OAuth client.
                    tailnet:
                      default: '-'
                      description: >-
                        Tailnet name. The default - uses the OAuth client
                        tailnet.
                      type: string
                      minLength: 1
                      maxLength: 500
                    type:
                      type: string
                      const: tailscale
                      description: Create a Tailscale private-network integration.
                  required:
                    - instanceName
                    - oauthClientId
                    - oauthClientSecret
                    - tags
                    - type
                  additionalProperties: false
      responses:
        '201':
          description: Create an integration
          content:
            application/json:
              schema:
                type: object
                properties:
                  integration:
                    type: object
                    properties:
                      createdAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                      displayName:
                        type: string
                      enabledAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                          - type: 'null'
                      id:
                        type: string
                      lastSyncedAt:
                        anyOf:
                          - type: string
                            format: date-time
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                          - type: 'null'
                      repositoryCount:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      sourceCount:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      type:
                        type: string
                        minLength: 1
                        maxLength: 100
                      updatedAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                    required:
                      - createdAt
                      - displayName
                      - enabledAt
                      - id
                      - lastSyncedAt
                      - repositoryCount
                      - sourceCount
                      - type
                      - updatedAt
                    additionalProperties: false
                  sessionSourceId:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                required:
                  - integration
                  - sessionSourceId
                additionalProperties: false
        '400':
          description: Invalid request or missing organization information.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: Provider authentication failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: The caller cannot perform this operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Integration, trigger, or filter field not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Integration conflict or unsupported operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Integration operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '502':
          description: Integration provider operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '503':
          description: Requested integration capability is not configured
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '504':
          description: Integration provider operation timed out
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: |
            import Tembo from '@tembo-io/sdk';

            const client = new Tembo();

            const integration = await client.integrations.create({
              environment: 'x',
              roleArn: 'x',
              type: 'aws',
            });
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client
                .integrations()
                .create(IntegrationsCreateBody::IntegrationsCreateBodyVariant1(
                    IntegrationsCreateBodyVariant1::new("x", "x", "aws"),
                ))
                .send()
                .await?;
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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