---
title: "Create approval request"
method: POST
path: "/api/v2/approval-requests"
tags: ["Approvals"]
---

# Create approval request

`POST /api/v2/approval-requests`

Create an approval request.

This endpoint requires a list of `instructions`, in semantic patch format, that will be applied when the approval request is approved and applied.

### Flags

If you are creating an approval request for a flag, you can use the following `instructions`:

- `addVariation`
- `removeVariation`
- `updateVariation`
- `updateDefaultVariation`

For details on using these instructions, read [Update feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag).

To create an approval for a flag specific to an environment, use [Create approval request for a flag](https://launchdarkly.com/docs/api/approvals/post-approval-request-for-flag).

### AI Configs

If you are creating an approval request for an AI Config, you can use the semantic patch instructions listed under [Update AI Config targeting](https://launchdarkly.com/docs/api/ai-configs/patch-ai-config-targeting).

### Segments

If you are creating an approval request for a segment, you can use the semantic patch instructions listed under [Patch segment](https://launchdarkly.com/docs/api/segments/patch-segment).

## Request body

- CreateApprovalRequestRequest
  - `resourceId` string, required — String representation of the resource specifier
  - `comment` string — Optional comment describing the approval request
  - `description` string, required — A brief description of the changes you're requesting
  - `instructions` Instruction[], required
  - `notifyMemberIds` string[] — An array of member IDs. These members are notified to review the approval request.
  - `notifyTeamKeys` string[] — An array of team keys. The members of these teams are notified to review the approval request.
  - `integrationConfig` FormVariableConfig

## Response `201`

Approval request response

- ApprovalRequestResponse
  - `_id` string, required — The ID of this approval request
  - `_version` integer, required — Version of the approval request
  - `creationDate` integer, required
  - `serviceKind` string, required
  - `requestorId` string — The ID of the member who requested the approval
  - `description` string — A human-friendly name for the approval request
  - `reviewStatus` 'approved' | 'declined' | 'pending', required — Current status of the review of this approval request
  - `allReviews` ReviewResponse[], required — An array of individual reviews of this approval request
    - `_id` string, required — The approval request ID
    - `kind` 'approve' | 'decline' | 'comment', required — The type of review action to take
    - `creationDate` integer
    - `comment` string — A comment describing the approval response
    - `memberId` string — ID of account member that reviewed request
    - `serviceTokenId` string — ID of account service token that reviewed request
  - `notifyMemberIds` string[], required — An array of member IDs. These members are notified to review the approval request.
  - `appliedDate` integer
  - `appliedByMemberId` string — The member ID of the member who applied the approval request
  - `appliedByServiceTokenId` string — The service token ID of the service token which applied the approval request
  - `status` 'pending' | 'completed' | 'failed' | 'scheduled', required — Current status of the approval request
  - `instructions` Instruction[], required
  - `conflicts` Conflict[], required — Details on any conflicting approval requests
    - `instruction` Instruction
    - `reason` string — Reason why the conflict exists
  - `_links` object, required — The location and content type of related resources
  - `executionDate` integer
  - `operatingOnId` string — ID of scheduled change to edit or delete
  - `integrationMetadata` IntegrationMetadata
    - `externalId` string, required
    - `externalStatus` IntegrationStatus, required
      - `display` string, required
      - `value` string, required
    - `externalUrl` string, required
    - `lastChecked` integer, required
  - `source` CopiedFromEnv
    - `key` string, required — Key of feature flag copied
    - `version` integer — Version of feature flag copied
  - `customWorkflowMetadata` CustomWorkflowMeta
    - `name` string — The name of the workflow stage that required this approval request
    - `stage` CustomWorkflowStageMeta
      - `index` integer — The zero-based index of the workflow stage
      - `name` string — The name of the workflow stage
  - `resourceId` string — String representation of a resource
  - `approvalSettings` ApprovalSettings
    - `required` boolean, required — If approvals are required for this environment
    - `bypassApprovalsForPendingChanges` boolean, required — Whether to skip approvals for pending changes
    - `minNumApprovals` integer, required — Sets the amount of approvals required before a member can apply a change. The minimum is one and the maximum is five.
    - `canReviewOwnRequest` boolean, required — Allow someone who makes an approval request to apply their own change
    - `canApplyDeclinedChanges` boolean, required — Allow applying the change as long as at least one person has approved
    - `autoApplyApprovedChanges` boolean — Automatically apply changes that have been approved by all reviewers. This field is only applicable for approval services other than LaunchDarkly.
    - `serviceKind` string, required — Which service to use for managing approvals
    - `serviceConfig` object, required
    - `requiredApprovalTags` string[], required — Require approval only on flags with the provided tags. Otherwise all flags will require approval.
    - `serviceKindConfigurationId` string — Optional field for integration configuration ID of a custom approval integration. This is an Enterprise-only feature.
    - `resourceKind` string — The kind of resource for which the approval settings apply, for example, flag or segment

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
