---
title: "POST /CreateIntegration"
method: POST
path: "/CreateIntegration"
---

# POST /CreateIntegration

`POST /CreateIntegration`

Creates a new integration with a third-party provider, such as GitHub, for code review and remediation.

## Request body

- object
  - `provider` 'GITHUB' | 'GITLAB' | 'BITBUCKET' | 'CONFLUENCE', required — Third-party provider type.
  - `input` object, required — The provider-specific input for creating an integration. This is a union type that contains provider-specific configuration.
    - `github` object — The GitHub-specific input for creating an integration.
      - `code` string, required — The OAuth authorization code received from GitHub.
      - `state` string, required — The CSRF state token for validating the OAuth flow.
      - `organizationName` string — The name of the GitHub organization to integrate with.
      - `targetUrl` string — The HTTPS URL of a self-hosted GitHub Enterprise Server instance. Omit this value for GitHub.com.
      - `installationId` string — The installation identifier provided by GitHub Enterprise Server on the install callback. Required for GitHub Enterprise Server integrations and ignored for GitHub.com.
    - `gitlab` object — The configuration for a GitLab integration.
      - `accessToken` string, password, required — The GitLab access token used to authenticate. This can be a personal access token or a group access token.
      - `targetUrl` string — The HTTPS URL of a self-managed GitLab instance. Omit this value for GitLab SaaS (gitlab.com).
      - `tokenType` 'PERSONAL' | 'GROUP', required — The type of GitLab access token provided in accessToken.
      - `groupId` string — The identifier of the GitLab group. Required when tokenType is group and ignored for personal tokens.
    - `bitbucket` object — The configuration for a Bitbucket integration.
      - `installationId` string, required — The Atlassian installation identifier, available from the Atlassian administration console.
      - `workspace` string, required — The Bitbucket workspace slug that identifies the workspace to integrate, for example acme-corp.
      - `code` string, required — The OAuth 2.0 authorization code returned from the consent redirect.
      - `state` string, required — The CSRF state token echoed back from the OAuth redirect.
    - `confluence` object — The configuration for a Confluence integration.
      - `installationId` string, required — The Atlassian installation identifier, available from the Atlassian administration console.
      - `code` string, required — The OAuth 2.0 authorization code returned from the consent redirect.
      - `state` string, required — The CSRF state token echoed back from the OAuth redirect.
      - `siteUrl` string, required — The Confluence Cloud site URL, for example https://mysite.atlassian.net.
  - `integrationDisplayName` string, required — The display name for the integration.
  - `kmsKeyId` string — Identifier of a KMS key. Can be a key ID, key ARN, alias name, or alias ARN.
  - `tags` object — Map of tags for a resource.
  - `privateConnectionName` string — The unique name of a private connection within your account.

## Response `201`

Success

- CreateIntegrationOutput
  - `integrationId` string, required — The unique identifier of the created integration.

## Other responses

- `480` — ResourceNotFoundException
- `481` — InternalServerException
- `482` — ValidationException
- `483` — ConflictException
- `484` — ThrottlingException
- `485` — AccessDeniedException

---

[API](https://skmtc.net/aws/apis/securityagent.md) · [All operations](https://skmtc.net/aws/apis/securityagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/securityagent/versions/cad56717d636/schema)
