---
title: "Create flag link"
method: POST
path: "/api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}"
tags: ["Flag links (beta)"]
---

# Create flag link

`POST /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}`

Create a new flag link. Flag links let you reference external resources and associate them with your flags.

## Path parameters

- `projectKey` string, string, required — The project key
- `featureFlagKey` string, string, required — The feature flag key

## Request body

- FlagLinkPost
  - `key` string — The flag link key
  - `integrationKey` string — The integration key for an integration whose <code>manifest.json</code> includes the <code>flagLink</code> capability, if this is a flag link for an existing integration. Do not include for URL flag links.
  - `timestamp` integer
  - `deepLink` string — The URL for the external resource you are linking the flag to
  - `title` string — The title of the flag link
  - `description` string — The description of the flag link
  - `metadata` object — The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's <code>manifest.json</code> file under <code>flagLink</code>.

## Response `201`

Flag link response

- FlagLinkRep
  - `_links` object, required — The location and content type of related resources
  - `_key` string — The flag link key
  - `_integrationKey` string — The integration key for an integration whose <code>manifest.json</code> includes the <code>flagLink</code> capability, if this is a flag link for an existing integration
  - `_id` string, required — The ID of this flag link
  - `_deepLink` string, required — The URL for the external resource the flag is linked to
  - `_timestamp` TimestampRep, required
    - `milliseconds` integer
    - `seconds` integer
    - `rfc3339` string
    - `simple` string
  - `title` string — The title of the flag link
  - `description` string — The description of the flag link
  - `_metadata` object — The metadata required by this integration in order to create a flag link, if this is a flag link for an existing integration. Defined in the integration's <code>manifest.json</code> file under <code>flagLink</code>.
  - `_createdAt` integer, required
  - `_member` FlagLinkMember
    - `_links` object, required
    - `_id` string, required
    - `firstName` string
    - `lastName` string

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `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)
