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

# Retrieve Surveys

> Studies were formerly surveys. This endpoint allows for the export of study configurations. The name will eventually change to Study, but at this time survey will be accepted anywhere study appears in the API. This endpoint allows you retrieve up to 1000 surveys at a time.



## OpenAPI

````yaml reference/sprig-api.json GET /v1/surveys
openapi: 3.1.0
info:
  contact:
    email: support@sprig.com
    name: Support
  description: >-
    Sprig is a continuous product research tool that helps you automatically
    capture the user insights you need to consistently improve your product,
    user experience, marketing, and more.


    While traditional studies are slow, difficult to target, and lack context,
    Sprig studies are delivered automatically to specific users at specific
    moments throughout the customer journey — all within the product experience.


    This API provides tools to manage users and studies. User management is used
    if you are segmenting your samples between visitors that will be tracked
    with an ID and unregistered visitors. Study export tools will allow you to
    take results data and send it to another data store or format results for
    presentation in other applications
  title: Sprig API
  version: 2.2.1
servers:
  - url: https://api.sprig.com
security: []
tags:
  - description: Operations allowing export of survey data
    name: V1
  - description: Operations allowing export of survey data
    name: V1
  - description: All operations pertaining to the user object
    name: users
  - description: All operations pertaining to the user events
    name: events
  - description: Operations allowing export of survey data
    name: V1
paths:
  /v1/surveys:
    get:
      tags:
        - V1
      summary: Retrieve Surveys
      description: >-
        Studies were formerly surveys. This endpoint allows for the export of
        study configurations. The name will eventually change to Study, but at
        this time survey will be accepted anywhere study appears in the API.
        This endpoint allows you retrieve up to 1000 surveys at a time.
      operationId: get-v1-surveys
      parameters:
        - $ref: '#/components/parameters/start'
        - $ref: '#/components/parameters/end'
        - $ref: '#/components/parameters/cursor'
        - $ref: '#/components/parameters/status'
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/Authorization-Bearer'
      responses:
        '200':
          content:
            application/json:
              examples:
                example surveys:
                  value:
                    cursor: Y3JlYXRlZEF0OjE1NTMyMDAxNTMwMTk=
                    data:
                      - completedAt: '2019-06-12T19:23:35.522Z'
                        constraints:
                          - comparisonType: gte
                            event: null
                            type: SESSION_COUNT
                            value: 1
                          - comparisonType: eq
                            event: null
                            type: TIME_ON_PAGE_DELAY
                            value: 2
                        createdAt: '2018-07-18T08:02:09.858Z'
                        id: 12
                        launchedAt: null
                        name: Understand Appeal
                        platform: web
                        questions:
                          - id: 118
                            options: []
                            optionsProperties:
                              introText: >-
                                Thanks for using Sprig. Tell us about your
                                experience.
                              labels:
                                left: Not at all interested
                                right: Extremely interested
                            questionText: How interested are you in using Sprig?
                            routingOptions: null
                            type: LIKERT
                          - id: 105
                            options: []
                            optionsProperties: null
                            questionText: What aspect of Sprig is most appealing?
                            routingOptions: null
                            type: OPEN
                        status: COMPLETED
                        totalResponseLimit: null
                        type: CONTINUOUS
                        updatedAt: '2019-06-12T19:23:35.522Z'
              schema:
                description: ''
                properties:
                  cursor:
                    minLength: 1
                    type: string
                  data:
                    items:
                      properties:
                        completedAt:
                          minLength: 1
                          type: string
                        constraints:
                          items:
                            properties:
                              comparisonType:
                                minLength: 1
                                type: string
                              event: {}
                              type:
                                minLength: 1
                                type: string
                              value:
                                type: number
                            type: object
                          minItems: 1
                          type: array
                          uniqueItems: true
                        createdAt:
                          minLength: 1
                          type: string
                        id:
                          type: number
                        launchedAt: {}
                        name:
                          minLength: 1
                          type: string
                        platform:
                          minLength: 1
                          type: string
                        questions:
                          items:
                            properties:
                              id:
                                type: number
                              options:
                                items:
                                  type: object
                                type: array
                              optionsProperties:
                                nullable: true
                                properties:
                                  introText:
                                    minLength: 1
                                    type: string
                                  labels:
                                    properties:
                                      left:
                                        minLength: 1
                                        type: string
                                      right:
                                        minLength: 1
                                        type: string
                                    required:
                                      - left
                                      - right
                                    type: object
                                type: object
                              questionText:
                                minLength: 1
                                type: string
                              routingOptions: {}
                              type:
                                minLength: 1
                                type: string
                            type: object
                          minItems: 1
                          type: array
                          uniqueItems: true
                        status:
                          minLength: 1
                          type: string
                        totalResponseLimit: {}
                        type:
                          minLength: 1
                          type: string
                        updatedAt:
                          minLength: 1
                          type: string
                      type: object
                    minItems: 1
                    type: array
                    uniqueItems: true
                type: object
                x-examples:
                  example-1:
                    cursor: Y3JlYXRlZEF0OjE1NTMyMDAxNTMwMTk=
                    data:
                      - completedAt: '2019-06-12T19:23:35.522Z'
                        constraints:
                          - comparisonType: gte
                            event: null
                            type: SESSION_COUNT
                            value: 1
                          - comparisonType: eq
                            event: null
                            type: TIME_ON_PAGE_DELAY
                            value: 2
                        createdAt: '2018-07-18T08:02:09.858Z'
                        id: 12
                        launchedAt: null
                        name: Understand Appeal
                        platform: web
                        questions:
                          - id: 118
                            options: []
                            optionsProperties:
                              introText: >-
                                Thanks for using Sprig. Tell us about your
                                experience.
                              labels:
                                left: Not at all interested
                                right: Extremely interested
                            questionText: How interested are you in using Sprig?
                            routingOptions: null
                            type: LIKERT
                          - id: 105
                            options: []
                            optionsProperties: null
                            questionText: What aspect of Sprig is most appealing?
                            routingOptions: null
                            type: OPEN
                        status: COMPLETED
                        totalResponseLimit: null
                        type: CONTINUOUS
                        updatedAt: '2019-06-12T19:23:35.522Z'
          description: OK
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
components:
  parameters:
    start:
      description: >-
        The earliest creation data for a generated theme to return, represented
        as milliseconds from epoch time
      in: query
      name: start
      required: false
      schema:
        type: integer
    end:
      description: >-
        The latest creation date for a generated theme to return, represented as
        milleseconds from epoch time
      in: query
      name: end
      required: false
      schema:
        type: integer
    cursor:
      description: A Base64 encoded string representing an opaque cursor position
      in: query
      name: cursor
      required: false
      schema:
        type: string
    status:
      description: >-
        One or many of (IN_PROGRESS, PAUSED, COMPLETED, DRAFT, ARCHIVED, NEW).
        Can be passed as ?status=PAUSED,COMPLETED,
        ?status[]=PAUSED&status[]=COMPLETED or ?status=PAUSED&status=COMPLETED
      in: query
      name: status
      required: false
      schema:
        items:
          enum:
            - IN_PROGRESS
            - PAUSED
            - COMPLETED
            - DRAFT
            - ARCHIVED
            - NEW
          type: string
        type: array
    limit:
      description: Specific number of results to return
      in: query
      name: limit
      required: false
      schema:
        maximum: 1000
        minimum: 1
        type: integer
    Authorization-Bearer:
      description: Bearer YOUR_API_KEY
      in: header
      name: Authorization
      required: true
      schema:
        type: string
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
      description: Bad Request
    '403':
      description: >-
        You may have an invalid or missing API key and you should check your
        authorization header. There is no message with this status code.
    '429':
      description: Your application has made too many requests in too short a time.
    '500':
      description: Something went wrong on Sprig's side. These are very rare :)

````