---
title: "POST /api/v1/integration"
method: POST
path: "/api/v1/integration"
tags: ["Integrations"]
---

# POST /api/v1/integration

`POST /api/v1/integration`

Create an integration to sync secrets.

## Request body

- object
  - `integrationAuthId` string, required — The ID of the integration auth object to link with integration.
  - `app` string — The name of the external integration providers app entity that you want to sync secrets with. Used in Netlify, GitHub, Vercel integrations.
  - `isActive` boolean — Whether the integration should be active or disabled.
  - `appId` string — The ID of the external integration providers app entity that you want to sync secrets with. Used in Netlify, GitHub, Vercel integrations.
  - `secretPath` string — The path of the secrets to sync secrets from.
  - `sourceEnvironment` string, required — The environment to sync secret from.
  - `targetEnvironment` string — The target environment of the integration provider. Used in cloudflare pages, TeamCity, Gitlab integrations.
  - `targetEnvironmentId` string — The target environment ID of the integration provider. Used in cloudflare pages, teamcity, gitlab integrations.
  - `targetService` string — The service based grouping identifier of the external provider. Used in Terraform cloud, Checkly, Railway and NorthFlank.
  - `targetServiceId` string — The service based grouping identifier ID of the external provider. Used in Terraform cloud, Checkly, Railway and NorthFlank.
  - `owner` string — External integration providers service entity owner. Used in Github.
  - `url` string, uri — The self-hosted URL of the platform to integrate with.
  - `path` string — Path to save the synced secrets. Used by Gitlab, AWS Parameter Store, Vault.
  - `region` string — AWS region to sync secrets to.
  - `scope` string — Scope of the provider. Used by Github, Qovery.
  - `metadata` object
    - `initialSyncBehavior` string — Type of syncing behavoir with the integration.
    - `secretPrefix` string — The prefix for the saved secret. Used by GCP.
    - `secretSuffix` string — The suffix for the saved secret. Used by GCP.
    - `mappingBehavior` 'one-to-one' | 'many-to-one' — The mapping behavior of the integration.
    - `shouldAutoRedeploy` boolean — Used by Render to trigger auto deploy.
    - `secretGCPLabel` object — The label for GCP secrets.
      - `labelName` string, required
      - `labelValue` string, required
    - `secretAWSTag` object[] — The tags for AWS secrets.
      - `key` string, required
      - `value` string, required
    - `azureLabel` string — Define which label to assign to secrets created in Azure App Configuration.
    - `githubVisibility` union — Define where the secrets from the Github Integration should be visible. Option 'selected' lets you directly define which repositories to sync secrets to.
      - 'selected'
      - 'private'
      - 'all'
    - `githubVisibilityRepoIds` string[] — The repository IDs to sync secrets to when using the Github Integration. Only applicable when using Organization scope, and visibility is set to 'selected'.
    - `kmsKeyId` string — The ID of the encryption key from AWS KMS.
    - `shouldDisableDelete` boolean — The flag to disable deletion of secrets in AWS Parameter Store.
    - `shouldEnableDelete` boolean — The flag to enable deletion of secrets.
    - `shouldMaskSecrets` boolean — Specifies if the secrets synced from Infisical to Gitlab should be marked as 'Masked'.
    - `shouldProtectSecrets` boolean — Specifies if the secrets synced from Infisical to Gitlab should be marked as 'Protected'.
    - `metadataSyncMode` 'custom' | 'secret-metadata' — The mode for syncing metadata to external system
    - `octopusDeployScopeValues` object — Specifies the scope values to set on synced secrets to Octopus Deploy.
      - `Environment` string[]
      - `Action` string[]
      - `Channel` string[]
      - `Machine` string[]
      - `ProcessOwner` string[]
      - `Role` string[]

## Response `200`

Default Response

- object
  - `integration` object, required
    - `id` string, uuid, required
    - `isActive` boolean, required
    - `url` string, nullable
    - `app` string, nullable
    - `appId` string, nullable
    - `targetEnvironment` string, nullable
    - `targetEnvironmentId` string, nullable
    - `targetService` string, nullable
    - `targetServiceId` string, nullable
    - `owner` string, nullable
    - `path` string, nullable
    - `region` string, nullable
    - `scope` string, nullable
    - `integration` string, required
    - `metadata` unknown
    - `integrationAuthId` string, uuid, required
    - `envId` string, uuid, required
    - `secretPath` string
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `lastUsed` string, date-time, nullable
    - `isSynced` boolean, nullable
    - `syncMessage` string, nullable
    - `lastSyncJobId` string, nullable
    - `environment` object, required
      - `slug` string, required
      - `name` string, required
      - `id` string, required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

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