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

# Export SPSS file

> # Description

Download a SPSS .sav file with the responses of the specified project/campaign

# Body

```json
{
   "projectId": "50c957e3f3e4670e361b5fa8",
   "fromDate": "2020-01-01",
   "toDate": "2022-12-31",
   "campaignId": "50c957e3f3e4670e361b5fa9"
}
```

where:

- `projectId`: The id of the project.
- `campaignId`: The id of the campaign. Don't send this field to get responses from all campaigns.
- `fromDate`: The initial date of the responses data desired.
- `toDate`: The final date of the responses data desired.

# Response
`HTTP 200`

SPSS .sav file

# Description

Download a SPSS .sav file with the responses of the specified project/campaign

# Body

```json theme={null}
{
   "projectId": "50c957e3f3e4670e361b5fa8",
   "fromDate": "2020-01-01",
   "toDate": "2022-12-31",
   "campaignId": "50c957e3f3e4670e361b5fa9"
}
```

where:

* `projectId`: The id of the project.
* `campaignId`: The id of the campaign. Don't send this field to get responses from all campaigns.
* `fromDate`: The initial date of the responses data desired.
* `toDate`: The final date of the responses data desired.

# Response

`HTTP 200`

SPSS .sav file


## OpenAPI

````yaml POST /api/export/spss
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /api/export/spss:
    post:
      summary: Export SPSS file
      description: >-
        # Description


        Download a SPSS .sav file with the responses of the specified
        project/campaign


        # Body


        ```json

        {
           "projectId": "50c957e3f3e4670e361b5fa8",
           "fromDate": "2020-01-01",
           "toDate": "2022-12-31",
           "campaignId": "50c957e3f3e4670e361b5fa9"
        }

        ```


        where:


        - `projectId`: The id of the project.

        - `campaignId`: The id of the campaign. Don't send this field to get
        responses from all campaigns.

        - `fromDate`: The initial date of the responses data desired.

        - `toDate`: The final date of the responses data desired.


        # Response

        `HTTP 200`


        SPSS .sav file
      operationId: export-spss-file-post-api-export-spss
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          required: false
          schema:
            type: string
          example: application/x-vnd.spss-data-provider
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              projectId: 50c957e3f3e4670e361b5fa8
              fromDate: '2020-01-01'
              toDate: '2022-12-31'
              campaignId: 50c957e3f3e4670e361b5fa9
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://responses-export-import.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````