For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
      • POSTCreate audit log subscription
      • DELDelete audit log subscription
      • GETGet audit log subscription by ID
      • GETGet audit log subscriptions by integration
      • PATCHUpdate audit log subscription
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewIntegration Audit Log Subscriptions

Create audit log subscription

POST
/api/v2/integrations/:integrationKey
POST
/api/v2/integrations/:integrationKey
$curl -X POST https://app.launchdarkly.com/api/v2/integrations/integrationKey \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Example audit log subscription.",
> "config": {
> "optional": "an optional property",
> "required": "the required property",
> "url": "https://example.com"
> },
> "statements": [
> {
> "effect": "allow",
> "resources": [
> "proj/*:env/*:flag/*;testing-tag"
> ],
> "actions": [
> "*"
> ]
> }
> ],
> "on": false,
> "tags": [
> "testing-tag"
> ]
>}'
1{
2 "_links": {},
3 "_id": "1234a56b7c89d012345e678f",
4 "kind": "datadog",
5 "name": "Example Datadog integration",
6 "config": {},
7 "statements": [
8 {
9 "effect": "allow",
10 "resources": [
11 "proj/*:env/*;qa_*:/flag/*"
12 ],
13 "notResources": [
14 "string"
15 ],
16 "actions": [
17 "*"
18 ],
19 "notActions": [
20 "string"
21 ]
22 }
23 ],
24 "on": true,
25 "tags": [
26 "testing"
27 ],
28 "_access": {
29 "denied": [
30 {
31 "action": "string",
32 "reason": {
33 "effect": "allow",
34 "resources": [
35 "proj/*:env/*;qa_*:/flag/*"
36 ],
37 "notResources": [
38 "string"
39 ],
40 "actions": [
41 "*"
42 ],
43 "notActions": [
44 "string"
45 ],
46 "role_name": "string"
47 }
48 }
49 ],
50 "allowed": [
51 {
52 "action": "string",
53 "reason": {
54 "effect": "allow",
55 "resources": [
56 "proj/*:env/*;qa_*:/flag/*"
57 ],
58 "notResources": [
59 "string"
60 ],
61 "actions": [
62 "*"
63 ],
64 "notActions": [
65 "string"
66 ],
67 "role_name": "string"
68 }
69 }
70 ]
71 },
72 "_status": {
73 "successCount": 1,
74 "lastSuccess": 1,
75 "lastError": 1,
76 "errorCount": 1,
77 "errors": [
78 {
79 "statusCode": 1,
80 "responseBody": "string",
81 "timestamp": 1
82 }
83 ]
84 },
85 "url": "string",
86 "apiKey": "string"
87}
Create an audit log subscription.<br /><br />For each subscription, you must specify the set of resources you wish to subscribe to audit log notifications for. You can describe these resources using a custom role policy. To learn more, read [Custom role concepts](https://launchdarkly.com/docs/home/account/role-concepts).
Was this page helpful?
Previous

Delete audit log subscription

Next
Built with

Create an audit log subscription.

For each subscription, you must specify the set of resources you wish to subscribe to audit log notifications for. You can describe these resources using a custom role policy. To learn more, read Custom role concepts.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

integrationKeystringRequiredformat: "string"
The integration key

Request

This endpoint expects an object.
namestringRequired

A human-friendly name for your audit log subscription.

configmap from strings to anyRequired

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.

statementslist of objectsOptional
The set of resources you wish to subscribe to audit log notifications for.
onbooleanOptional
Whether or not you want your subscription to actively send events.
tagslist of stringsOptional
An array of tags for this subscription.
urlstringOptional
Slack webhook receiver URL. Only necessary for legacy Slack webhook integrations.
apiKeystringOptional
Datadog API key. Only necessary for legacy Datadog webhook integrations.

Response

Integration response
_linksmap from strings to objects
The location and content type of related resources
_idstring
The ID for this integration audit log subscription
kindstring
The type of integration
namestring

A human-friendly name for the integration

configmap from strings to any

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.

statementslist of objects
Represents a Custom role policy, defining a resource kinds filter the integration audit log subscription responds to.
onboolean
Whether the integration is currently active
tagslist of strings
An array of tags for this integration
_accessobject
Details on the allowed and denied actions for this subscription
_statusobject
Details on the most recent successes and errors for this integration
urlstring
Slack webhook receiver URL. Only used for legacy Slack webhook integrations.
apiKeystring
Datadog API key. Only used for legacy Datadog webhook integrations.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error