Skip to main content
GET
/
surveys
/
{surveyId}
/
contact-links
/
segments
/
{segmentId}
Get survey links for contacts in a segment
curl --request GET \
  --url https://app.formbricks.com/api/v2/surveys/{surveyId}/contact-links/segments/{segmentId} \
  --header 'x-api-key: <api-key>'
{
  "data": [
    {
      "contactId": "<string>",
      "surveyUrl": "<string>",
      "expiresAt": "<string>",
      "attributes": {}
    }
  ],
  "meta": {
    "total": 123,
    "limit": 123,
    "offset": 123
  }
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Path Parameters

surveyId
string
required

The ID of the survey The ID of the survey

segmentId
string
required

The ID of the segment The ID of the segment

Query Parameters

limit
number
default:50

Number of items to return Number of items to return

Required range: 1 <= x <= 250
skip
number
default:0

Number of items to skip Number of items to skip

Required range: x >= 0
expirationDays
number | null

Number of days until the generated JWT expires. If not provided, there is no expiration. Number of days until the generated JWT expires. If not provided, there is no expiration.

Required range: 1 <= x <= 365
attributeKeys
string

Comma-separated list of contact attribute keys to include in the response. You can have max 20 keys. If not provided, no attributes will be included.

Response

200 - application/json

Contact links generated successfully.

data
object[]
meta
object