Skip to main content
POST
/
api
/
v2
/
integrations
/
{integrationKey}
Create audit log subscription
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/integrations/{integrationKey} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "config": {
    "optional": "an optional property",
    "required": "the required property",
    "url": "https://example.com"
  },
  "name": "Example audit log subscription.",
  "on": false,
  "statements": [
    {
      "actions": [
        "*"
      ],
      "effect": "allow",
      "resources": [
        "proj/*:env/*:flag/*;testing-tag"
      ]
    }
  ],
  "tags": [
    "testing-tag"
  ]
}
'
{
  "_links": {},
  "_id": "1234a56b7c89d012345e678f",
  "kind": "datadog",
  "name": "Example Datadog integration",
  "config": {},
  "statements": [
    {
      "effect": "allow",
      "resources": [
        "proj/*:env/*;qa_*:/flag/*"
      ],
      "notResources": [
        "<string>"
      ],
      "actions": [
        "*"
      ],
      "notActions": [
        "<string>"
      ]
    }
  ],
  "on": true,
  "tags": [
    "testing"
  ],
  "_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>"
        }
      }
    ]
  },
  "_status": {
    "successCount": 123,
    "lastSuccess": 123,
    "lastError": 123,
    "errorCount": 123,
    "errors": [
      {
        "statusCode": 123,
        "responseBody": "<string>",
        "timestamp": 123
      }
    ]
  },
  "url": "<string>",
  "apiKey": "<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

integrationKey
string<string>
required

The integration key

Body

application/json
name
string
required

A human-friendly name for your audit log subscription.

Example:

"Example audit log subscription."

config
object
required

The unique set of fields required to configure an audit log subscription integration of this type. Refer to the formVariables field in the corresponding manifest.json at https://github.com/launchdarkly/integration-framework/tree/main/integrations for a full list of fields for the integration you wish to configure.

Example:
{
"optional": "an optional property",
"required": "the required property",
"url": "https://example.com"
}
statements
object[]

The set of resources you wish to subscribe to audit log notifications for.

on
boolean

Whether or not you want your subscription to actively send events.

Example:

false

tags
string[]

An array of tags for this subscription.

Example:
["testing-tag"]
url
string

Slack webhook receiver URL. Only necessary for legacy Slack webhook integrations.

apiKey
string

Datadog API key. Only necessary for legacy Datadog webhook integrations.

Response

Integration response

The location and content type of related resources

_id
string

The ID for this integration audit log subscription

Example:

"1234a56b7c89d012345e678f"

kind
string

The type of integration

Example:

"datadog"

name
string

A human-friendly name for the integration

Example:

"Example Datadog integration"

config
object

Details on configuration for an integration of this type. Refer to the formVariables field in the corresponding manifest.json for a full list of fields for each integration.

statements
object[]

Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to.

on
boolean

Whether the integration is currently active

Example:

true

tags
string[]

An array of tags for this integration

Example:
["testing"]
_access
object

Details on the allowed and denied actions for this subscription

_status
object

Details on the most recent successes and errors for this integration

url
string

Slack webhook receiver URL. Only used for legacy Slack webhook integrations.

apiKey
string

Datadog API key. Only used for legacy Datadog webhook integrations.