Skip to main content
POST
/
api
/
v2
/
integration-capabilities
/
flag-import
/
{projectKey}
/
{integrationKey}
Create a flag import configuration
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": {
    "environmentId": "The ID of the environment in the external system",
    "ldApiKey": "An API key with create flag permissions in your LaunchDarkly account",
    "ldMaintainer": "The ID of the member who will be the maintainer of the imported flags",
    "ldTag": "A tag to apply to all flags imported to LaunchDarkly",
    "splitTag": "If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.",
    "workspaceApiKey": "An API key with read permissions in the external feature management system",
    "workspaceId": "The ID of the workspace in the external system"
  },
  "name": "Sample configuration",
  "tags": [
    "example-tag"
  ]
}
'
{
  "_links": {
    "self": {
      "href": "<string>",
      "type": "<string>"
    },
    "parent": {
      "href": "<string>",
      "type": "<string>"
    },
    "project": {
      "href": "<string>",
      "type": "<string>"
    }
  },
  "_id": "12ab3c4d5ef1a2345bcde67f",
  "integrationKey": "split",
  "projectKey": "default",
  "config": {},
  "tags": [],
  "name": "Development environment configuration",
  "version": 1,
  "_status": {
    "status": "pending",
    "lastImport": "1717263000000",
    "lastError": "1714584600000",
    "errors": [
      {
        "integrationId": "<string>",
        "message": "<string>",
        "statusCode": 123,
        "timestamp": 123
      }
    ]
  },
  "_access": {
    "denied": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ],
    "allowed": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string<string>
required

The project key

integrationKey
string<string>
required

The integration key

Body

application/json
config
object
required

The global configuration settings, as specified by the formVariables in the manifest.json for this configuration.

Example:

"{\"workspaceApiKey\": \"An API key with read permissions in the external feature management system\", \"workspaceId\": \"The ID of the workspace in the external system\", \"environmentId\": \"The ID of the environment in the external system\", \"splitTag\": \"If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.\", \"ldApiKey\": \"An API key with create flag permissions in your LaunchDarkly account\", \"ldTag\": \"A tag to apply to all flags imported to LaunchDarkly\", \"ldMaintainer\": \"The ID of the member who will be the maintainer of the imported flags\"}"

tags
string[]

Tags to associate with the configuration

Example:
["example-tag"]
name
string

Name to identify the configuration

Example:

"Sample configuration"

Response

Flag Import Configuration response

The location and content type of related resources

_id
string
required

The integration ID

Example:

"12ab3c4d5ef1a2345bcde67f"

integrationKey
enum<string>
required

The integration key

Available options:
split,
unleash
Example:

"split"

projectKey
string
required

The project key

Example:

"default"

config
object
required

The configuration for the given import integration. Only included when requesting a single integration by ID. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.

tags
string[]
required

List of tags for this configuration

Example:
[]
name
string
required

Name of the configuration

Example:

"Development environment configuration"

version
integer
required

Version of the current configuration

Example:

1

_status
object
required

Details on the status of the import job

_access
object

Details on the allowed and denied actions for this configuration