> ## Documentation Index
> Fetch the complete documentation index at: https://formbricks.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get survey links for contacts in a segment

> Generates personalized survey links for contacts in a segment.



## OpenAPI

````yaml /api-v2-reference/openapi.yml get /management/surveys/{surveyId}/contact-links/segments/{segmentId}
openapi: 3.1.0
info:
  title: Formbricks API
  description: Manage Formbricks resources programmatically.
  version: 2.0.0
servers:
  - url: https://app.formbricks.com/api/v2
    description: Formbricks Cloud
security:
  - apiKeyAuth: []
tags:
  - name: Health
    description: Operations for checking critical application dependencies health status.
  - name: Roles
    description: Operations for managing roles.
  - name: Me
    description: Operations for managing your API key.
  - name: Management API - Responses
    description: Operations for managing responses.
  - name: Management API - Contacts
    description: Operations for managing contacts.
  - name: Management API - Contact Attributes
    description: Operations for managing contact attributes.
  - name: Management API - Contact Attribute Keys
    description: Operations for managing contact attribute keys.
  - name: Management API - Surveys
    description: Operations for managing surveys.
  - name: Management API - Surveys - Contact Links
    description: Operations for generating personalized survey links for contacts.
  - name: Management API - Webhooks
    description: Operations for managing webhooks.
  - name: Organizations API - Teams
    description: Operations for managing teams.
  - name: Organizations API - Project Teams
    description: Operations for managing project teams.
  - name: Organizations API - Users
    description: Operations for managing users.
paths:
  /management/surveys/{surveyId}/contact-links/segments/{segmentId}:
    get:
      tags:
        - Management API - Surveys - Contact Links
      summary: Get survey links for contacts in a segment
      description: Generates personalized survey links for contacts in a segment.
      operationId: getContactLinksBySegment
      parameters:
        - in: path
          name: surveyId
          description: The ID of the survey
          schema:
            type: string
            description: The ID of the survey
          required: true
        - in: path
          name: segmentId
          description: The ID of the segment
          schema:
            type: string
            description: The ID of the segment
          required: true
        - in: query
          name: limit
          description: Number of items to return
          schema:
            type: number
            minimum: 1
            maximum: 250
            default: 50
            description: Number of items to return
        - in: query
          name: skip
          description: Number of items to skip
          schema:
            type: number
            minimum: 0
            default: 0
            description: Number of items to skip
        - in: query
          name: expirationDays
          description: >-
            Number of days until the generated JWT expires. If not provided,
            there is no expiration.
          schema:
            type:
              - number
              - 'null'
            minimum: 1
            maximum: 365
            default: null
            description: >-
              Number of days until the generated JWT expires. If not provided,
              there is no expiration.
        - in: query
          name: attributeKeys
          schema:
            type: string
            description: >-
              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.
      responses:
        '200':
          description: Contact links generated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        contactId:
                          type: string
                          description: The ID of the contact
                        surveyUrl:
                          type: string
                          format: uri
                          description: Personalized survey link
                        expiresAt:
                          type:
                            - string
                            - 'null'
                          description: >-
                            The date and time the link expires, null if no
                            expiration
                        attributes:
                          type: object
                          additionalProperties:
                            type: string
                          description: The attributes of the contact
                  meta:
                    type: object
                    properties:
                      total:
                        type: number
                      limit:
                        type: number
                      offset:
                        type: number
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Use your Formbricks x-api-key to authenticate.

````