openapi: 3.2.0 info: version: 1.0.0 title: CDP (Customer Data Platform) Surveys API description: "This document serves as the \U0001F4D8 comprehensive API guide for \U0001F50C integrating your product(s) with the Lucidya **Customer Data Platform (CDP)** via **RESTful** endpoints.\n\n\U0001F50D Explore how to seamlessly connect your offerings with our platform to leverage customer data insights and profiles.\n\nMethod | Endpoint | Description\n-------|----------|---------\n `GET` | **[Get Filters](https://docs.lucidya.com/docs/cdp-api/branches/main/7k92xwdm05e0i-get-filters)** | Reterive a list of all available filters on your account.\n `GET` | **[Get Profile List](https://docs.lucidya.com/docs/cdp-api/branches/main/3mjmoshm1vmcu-get-a-list-of-all-profiles)** | Reterive a list of all available customer profiles.\n `GET` | **[Get Profile by Id](https://docs.lucidya.com/docs/cdp-api/branches/main/b0aykazg3489q-get-custom-profile-data-by-id)** | Reterive a specific customer profile data by `profile_id`.\n `POST`| **[Create Profile](https://docs.lucidya.com/docs/cdp-api/c2d0471ce7599-create-profile)** | Create a new CDP profile by adding the profile information.\n `PUT` | **[Update Profile](https://docs.lucidya.com/docs/cdp-api/10c0d3000016a-update-profile)** | Update the information for a specific profile.\n `GET` | **[Get Survey data by Profile Id](https://docs.lucidya.com/docs/cdp-api/branches/main/zb4668e65pnoz-retrieve-survey-data-for-a-specific-profile-using-its-id)** | Reterive a data of all survey(ies) for specific customer by `profile_id`.\n `POST`| **[Create Interaction Profile](https://docs.lucidya.com/docs/cdp-api/branches/main/2kqwzyyvxixnr-create-interaction-profile)** | Create an interaction profile to get the `job_id`.\n `GET` | **[Get Interaction Profile](https://docs.lucidya.com/docs/cdp-api/branches/main/m7c5hv4h94339-get-interaction-profile-by-id)** | Reterive an interaction profile by `job_id` and `profile_id`.\n `GET` | **[Get Segments List](https://docs.lucidya.com/docs/cdp-api/6c947c3eaec37-paginated-segments-list)** | Retrieve a paginated list of segments associated with your account.\n `PUT` | **[Append Profile(s) to Segment](https://docs.lucidya.com/docs/cdp-api/ec7081a06df11-append-profile-s-into-segment)** | Add selected profiles to the segment.\n `DELETE` | **[Delete Profile(s) from Segment](https://docs.lucidya.com/docs/cdp-api/a0ac3ea7ae575-delete-profile-s-from-segment)** | Remove selected profiles from the segment.\n\n[\U0001F393 Learn more about Lucidya CDP](https://lucidya.com/product/audience/)." termsOfService: https://lucidya.com/service-agreement/ contact: name: Lucidya url: https://lucidya.com/ email: customer.support@lucidya.com license: url: '' name: '' servers: - url: https://api.lucidya.com description: Production Server tags: - name: Surveys paths: /profiles/{id}/surveys: get: tags: - Surveys summary: Retrieve survey data for a specific profile using Its Id description: 'This endpoint allows you to retrieve survey(s) data for a particular profile by specifying its ID. > #### 🔢 Pagination > > This endpoint enables pagination through the use of a `page` parameter, which can be included in the request query parameters. ' operationId: getSurveyByProfileId parameters: - name: luc-authorization in: header description: This is used to add the `API key` generated from your Lucidya account to authenticate. required: true schema: type: string - name: start_date in: query description: This is utilized to specify a `start_date` filter using the Unix format, for example, `1709164800`. required: true schema: type: integer example: '1709769600' examples: default: value: '1709769600' - name: end_date in: query description: This is utilized to specify an `end_date` filter using the Unix format, for example, `1710460799`. required: true schema: type: integer example: '1710374399' examples: default: value: '1710374399' - name: page in: query description: 'This is utilized to add a `page number` for the subsequent payload. You can find the `"total_pages": 3` parameter on the first payload.' schema: type: integer example: '1' examples: default: value: '1' - name: id in: path description: Unique identifier of the customer profile. required: true schema: type: string example: '46555' examples: default: value: '46555' responses: '200': description: "```json\n{\n \"status\": \"success\",\n \"data\": [\n {\n \"id\": 1938,\n \"respondant_id\": 1938,\n \"survey_name\": \"test 12\",\n \"submitted_date\": 1710230337.98197,\n \"survey\": [\n {\n \"id\": 15,\n \"name\": \"default\",\n \"order\": 1,\n \"survey\": 1674,\n \"is_deleted\": false,\n \"section_id\": 15,\n \"questions\": [\n {\n \"id\": 16201,\n \"order\": 1,\n \"section\": 15,\n \"question\": \"Enter your E-mail.\",\n \"type\": \"email\",\n \"constraints\": {},\n \"answer\": \"test@test.com\"\n },\n {\n \"id\": 16202,\n \"order\": 2,\n \"section\": 15,\n \"question\": \"Enter your phone number.\",\n \"type\": \"phone_number\",\n \"constraints\": {},\n \"answer\": [\n {\n \"phone_number\": \"545462356\",\n \"country_code\": \"SA\"\n }\n ]\n },\n {\n \"id\": 16203,\n \"order\": 3,\n \"section\": 15,\n \"question\": \"Click here to add number question:\",\n \"type\": \"number\",\n \"constraints\": {},\n \"answer\": \"\"\n }\n ]\n }\n ]\n }\n ]\n}\n```" content: application/json: schema: type: object examples: default: value: status: success data: - id: 1938 respondant_id: 1938 survey_name: test 12 submitted_date: 1710230337.98197 survey: - id: 15 name: default order: 1 survey: 1674 is_deleted: false section_id: 15 questions: - id: 16201 order: 1 section: 15 question: Enter your E-mail. type: email constraints: {} answer: test@test.com - id: 16202 order: 2 section: 15 question: Enter your phone number. type: phone_number constraints: {} answer: - phone_number: '545462356' country_code: SA - id: 16203 order: 3 section: 15 question: 'Click here to add number question:' type: number constraints: {} answer: '' '400': description: Bad Request! '401': description: Unauthorized. Authorization error (Invalid API key). '403': description: Forbidden! '404': description: Not Found! '406': description: "Not Acceptable!\tThe format used is not acceptable." '422': description: "Unprocessable Entity (WebDAV).\n\n```json\n{\n \"detail\": [\n {\n \"loc\": [\n \"path\",\n \"profile_id\"\n ],\n \"msg\": \"value is not a valid integer\",\n \"type\": \"type_error.integer\"\n }\n ]\n}\n```" '500': description: Internal Server Error. We might be updating our services, please wait a while before trying again. '504': description: Gateway Timeout! It means the server tried to load the data or fulfill another request but it took too long and timed out. servers: - url: https://api.lucidya.com description: Production Server x-internal: false