{ "status": "error", "errors": { "user_agent": ["The user agent field is required when device is not present."] }}
Call this endpoint from your server whenever you need the survey list for a user. It returns the user hash uh, which you need for the qualification endpoints, and up to 50 surveys sorted by relevance.
Query parameters
string
required
Your app hash.
string
required
Your ID for the user. The user is created on the first call.
string
required
The user’s IPv4 address. IPv6 is not supported. Surveys are matched to the user’s country from this IP.
string
required
Always API.
string
The user’s browser user agent. Required unless you send device. Used to detect the device type.
string
desktop, mobile or tablet. Required unless you send user_agent. When both are sent, user_agent wins.
string
Your app API token. Required when secure API mode is on for your app.
integer
Maximum number of surveys to return. Up to 50.
number
Only return surveys whose publisher_payout (USD) is at least this value.
string
The user’s interface language, for example en or de. Up to 5 characters.
Profile parameters
Send what you know about the user so they get better-matched surveys and fewer qualification questions. These values are saved when the user is new, or when no birth date is stored for them yet.
string
Birth date as YYYY-MM-DD. birthdate is accepted as an alias.
integer
Age, 1 to 120. Used only when no birth date is sent.
string
male, female, m or f.
string
Postal code.
Response
string
required
success, or error for validation and rate-limit errors.
string
User hash. Use it as Bearer {uh} on the qualification endpoints.
integer
Number of surveys returned.
string | null
null when surveys were returned. Otherwise it says why the list is empty. See Empty results.
object
Only on validation errors: field name to a list of messages.
object[]
Show survey properties
string
Survey hash. Send it as survey to Start qualification.
integer
Numeric survey ID.
integer | null
Estimated length of interview, in minutes.
number
What you earn for a complete, in USD.
integer
Reward to show the user, in your app’s currency, bonuses included.
integer
Same reward before bonuses.
number
Bonus on this survey, in percent.
number
Share of entrants who complete, 0 to 100.
number
Ranking score. Surveys are already sorted by it.
number
Average user rating, in steps of 0.5. 0 when there are not enough ratings.
integer
Number of user ratings.
integer
1 for high-converting surveys, otherwise 0.
string
Survey entry link. Send the user here to qualify on the survey page instead of using the qualification API.
integer
Position in the list, starting at 1.
Extra survey fields, such as supplier_id or buyer_id, can be turned on for your app. Ask your account manager.
Empty results
When there are no surveys, status is still success, count is 0 and message says why:
message
Meaning
no_surveys
No surveys match this user right now. Try again later.
inactive_user
The user is inactive, or your app or the user’s country is disabled.
disabled_app_or_country
Your app or the requested country is disabled.
disabled_source
The traffic source is disabled for your app.
unallowed_user_creation [N]
A new user could not be created, for example because new users are disabled for your app or country.
banned, on_hold, on_review
The user’s account is restricted.
vpn_detected, location_error
The user’s IP is a VPN, or its location doesn’t match.
failed_to_upsert_user_profiling
A profile parameter (birthday, age or gender) could not be saved. Check the values.
{ "status": "error", "errors": { "user_agent": ["The user agent field is required when device is not present."] }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Prime Insights","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"favicon":"https://mintcdn.com/primeinsights/bDen0AJeu40picfe/favicon.svg?fit=max\u0026auto=format\u0026n=bDen0AJeu40picfe\u0026q=85\u0026s=801ef9e4fe49f48bceeedb24e16fa0f2","api":{"playground":{"display":"simple"},"mdx":{"server":"https://partners.{your-domain}"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"primeinsights","hasAudioNarration":false,"actualSubdomain":"primeinsights","customDomains":["docs-saas.primeearn.com"],"gitSource":{"type":"artifacts","owner":"prod","repo":"6b0432e208d314b7b333663b","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b043699e9dc5e7aaf35dee4"},"entitlements":{},"buildId":"6b044d1d610c4bb5856861a2","clientVersion":"0.0.4271","searchFilterCounts":[{"language":"default","tag":"Surveys","count":10},{"language":"default","tag":"Qualification","count":4},{"language":"default","tag":"Get started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"surveys/get-surveys","slug":"/surveys/get-surveys","pageMetadata":{"title":"Get surveys","api":"GET /api/surveys","description":"Get the surveys available to one of your users. Creates the user on the first call.","href":"/surveys/get-surveys"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Get the surveys available to one of your users. Creates the user on the first call.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Call this endpoint from your server whenever you need the survey list for a user. It returns the user hash `,_jsx(_components.code,{children:`uh`}),`, which you need for the `,_jsx(_components.a,{href:`/surveys/qualification/start`,children:`qualification endpoints`}),`, and up to 50 surveys sorted by relevance.`]}),`\n`,_jsx(Heading,{level:`2`,id:`query-parameters`,children:`Query parameters`}),`\n`,_jsx(ParamField,{query:`app`,type:`string`,required:true,id:`param-app`,children:_jsx(_components.p,{children:`Your app hash.`})}),`\n`,_jsx(ParamField,{query:`external_user_id`,type:`string`,required:true,id:`param-external-user-id`,children:_jsx(_components.p,{children:`Your ID for the user. The user is created on the first call.`})}),`\n`,_jsx(ParamField,{query:`ip`,type:`string`,required:true,id:`param-ip`,children:_jsx(_components.p,{children:`The user’s IPv4 address. IPv6 is not supported. Surveys are matched to the user’s country from this IP.`})}),`\n`,_jsx(ParamField,{query:`output`,type:`string`,required:true,id:`param-output`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`API`}),`.`]})}),`\n`,_jsx(ParamField,{query:`user_agent`,type:`string`,id:`param-user-agent`,children:_jsxs(_components.p,{children:[`The user’s browser user agent. Required unless you send `,_jsx(_components.code,{children:`device`}),`. Used to detect the device type.`]})}),`\n`,_jsx(ParamField,{query:`device`,type:`string`,id:`param-device`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`desktop`}),`, `,_jsx(_components.code,{children:`mobile`}),` or `,_jsx(_components.code,{children:`tablet`}),`. Required unless you send `,_jsx(_components.code,{children:`user_agent`}),`. When both are sent, `,_jsx(_components.code,{children:`user_agent`}),` wins.`]})}),`\n`,_jsx(ParamField,{query:`token`,type:`string`,id:`param-token`,children:_jsx(_components.p,{children:`Your app API token. Required when secure API mode is on for your app.`})}),`\n`,_jsx(ParamField,{query:`limit`,type:`integer`,id:`param-limit`,children:_jsxs(_components.p,{children:[`Maximum number of surveys to return. Up to `,_jsx(_components.code,{children:`50`}),`.`]})}),`\n`,_jsx(ParamField,{query:`min_cpi`,type:`number`,id:`param-min-cpi`,children:_jsxs(_components.p,{children:[`Only return surveys whose `,_jsx(_components.code,{children:`publisher_payout`}),` (USD) is at least this value.`]})}),`\n`,_jsx(ParamField,{query:`locale`,type:`string`,id:`param-locale`,children:_jsxs(_components.p,{children:[`The user’s interface language, for example `,_jsx(_components.code,{children:`en`}),` or `,_jsx(_components.code,{children:`de`}),`. Up to 5 characters.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`profile-parameters`,children:`Profile parameters`}),`\n`,_jsx(_components.p,{children:`Send what you know about the user so they get better-matched surveys and fewer qualification questions. These values are saved when the user is new, or when no birth date is stored for them yet.`}),`\n`,_jsx(ParamField,{query:`birthday`,type:`string`,id:`param-birthday`,children:_jsxs(_components.p,{children:[`Birth date as `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`. `,_jsx(_components.code,{children:`birthdate`}),` is accepted as an alias.`]})}),`\n`,_jsx(ParamField,{query:`age`,type:`integer`,id:`param-age`,children:_jsx(_components.p,{children:`Age, 1 to 120. Used only when no birth date is sent.`})}),`\n`,_jsx(ParamField,{query:`gender`,type:`string`,id:`param-gender`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`male`}),`, `,_jsx(_components.code,{children:`female`}),`, `,_jsx(_components.code,{children:`m`}),` or `,_jsx(_components.code,{children:`f`}),`.`]})}),`\n`,_jsx(ParamField,{query:`zip`,type:`string`,id:`param-zip`,children:_jsx(_components.p,{children:`Postal code.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`success`}),`, or `,_jsx(_components.code,{children:`error`}),` for validation and rate-limit errors.`]})}),`\n`,_jsx(ResponseField,{name:`uh`,type:`string`,id:`param-uh`,children:_jsxs(_components.p,{children:[`User hash. Use it as `,_jsx(_components.code,{children:`Bearer {uh}`}),` on the qualification endpoints.`]})}),`\n`,_jsx(ResponseField,{name:`count`,type:`integer`,id:`param-count`,children:_jsx(_components.p,{children:`Number of surveys returned.`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string | null`,id:`param-message`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`null`}),` when surveys were returned. Otherwise it says why the list is empty. See `,_jsx(_components.a,{href:`#empty-results`,children:`Empty results`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`errors`,type:`object`,id:`param-errors`,children:_jsx(_components.p,{children:`Only on validation errors: field name to a list of messages.`})}),`\n`,_jsx(ResponseField,{name:`surveys`,type:`object[]`,id:`param-surveys`,children:_jsxs(Expandable,{title:`survey properties`,children:[_jsx(ResponseField,{name:`hash`,type:`string`,id:`param-hash`,children:_jsxs(_components.p,{children:[`Survey hash. Send it as `,_jsx(_components.code,{children:`survey`}),` to Start qualification.`]})}),_jsx(ResponseField,{name:`id`,type:`integer`,id:`param-id`,children:_jsx(_components.p,{children:`Numeric survey ID.`})}),_jsx(ResponseField,{name:`loi`,type:`integer | null`,id:`param-loi`,children:_jsx(_components.p,{children:`Estimated length of interview, in minutes.`})}),_jsx(ResponseField,{name:`publisher_payout`,type:`number`,id:`param-publisher-payout`,children:_jsx(_components.p,{children:`What you earn for a complete, in USD.`})}),_jsx(ResponseField,{name:`user_reward`,type:`integer`,id:`param-user-reward`,children:_jsx(_components.p,{children:`Reward to show the user, in your app’s currency, bonuses included.`})}),_jsx(ResponseField,{name:`user_reward_without_bonus`,type:`integer`,id:`param-user-reward-without-bonus`,children:_jsx(_components.p,{children:`Same reward before bonuses.`})}),_jsx(ResponseField,{name:`bonus`,type:`number`,id:`param-bonus`,children:_jsx(_components.p,{children:`Bonus on this survey, in percent.`})}),_jsx(ResponseField,{name:`conversion_rate`,type:`number`,id:`param-conversion-rate`,children:_jsx(_components.p,{children:`Share of entrants who complete, 0 to 100.`})}),_jsx(ResponseField,{name:`score`,type:`number`,id:`param-score`,children:_jsx(_components.p,{children:`Ranking score. Surveys are already sorted by it.`})}),_jsx(ResponseField,{name:`user_rating_avg`,type:`number`,id:`param-user-rating-avg`,children:_jsxs(_components.p,{children:[`Average user rating, in steps of 0.5. `,_jsx(_components.code,{children:`0`}),` when there are not enough ratings.`]})}),_jsx(ResponseField,{name:`user_rating_count`,type:`integer`,id:`param-user-rating-count`,children:_jsx(_components.p,{children:`Number of user ratings.`})}),_jsx(ResponseField,{name:`hot`,type:`integer`,id:`param-hot`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1`}),` for high-converting surveys, otherwise `,_jsx(_components.code,{children:`0`}),`.`]})}),_jsx(ResponseField,{name:`url`,type:`string`,id:`param-url`,children:_jsx(_components.p,{children:`Survey entry link. Send the user here to qualify on the survey page instead of using the qualification API.`})}),_jsx(ResponseField,{name:`order`,type:`integer`,id:`param-order`,children:_jsx(_components.p,{children:`Position in the list, starting at 1.`})})]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Extra survey fields, such as `,_jsx(_components.code,{children:`supplier_id`}),` or `,_jsx(_components.code,{children:`buyer_id`}),`, can be turned on for your app. Ask your account manager.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`empty-results`,children:`Empty results`}),`\n`,_jsxs(_components.p,{children:[`When there are no surveys, `,_jsx(_components.code,{children:`status`}),` is still `,_jsx(_components.code,{children:`success`}),`, `,_jsx(_components.code,{children:`count`}),` is `,_jsx(_components.code,{children:`0`}),` and `,_jsx(_components.code,{children:`message`}),` says why:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`no_surveys`})}),_jsx(_components.td,{children:`No surveys match this user right now. Try again later.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`inactive_user`})}),_jsx(_components.td,{children:`The user is inactive, or your app or the user’s country is disabled.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`disabled_app_or_country`})}),_jsx(_components.td,{children:`Your app or the requested country is disabled.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`disabled_source`})}),_jsx(_components.td,{children:`The traffic source is disabled for your app.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unallowed_user_creation [N]`})}),_jsx(_components.td,{children:`A new user could not be created, for example because new users are disabled for your app or country.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`banned`}),`, `,_jsx(_components.code,{children:`on_hold`}),`, `,_jsx(_components.code,{children:`on_review`})]}),_jsx(_components.td,{children:`The user’s account is restricted.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`vpn_detected`}),`, `,_jsx(_components.code,{children:`location_error`})]}),_jsx(_components.td,{children:`The user’s IP is a VPN, or its location doesn’t match.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed_to_upsert_user_profiling`})}),_jsxs(_components.td,{children:[`A profile parameter (`,_jsx(_components.code,{children:`birthday`}),`, `,_jsx(_components.code,{children:`age`}),` or `,_jsx(_components.code,{children:`gender`}),`) could not be saved. Check the values.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Body`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`200`})}),_jsxs(_components.td,{children:[`Validation error: `,_jsx(_components.code,{children:`{\"status\":\"error\",\"errors\":{...}}`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`Token or app errors. See `,_jsx(_components.a,{href:`/surveys/authentication#app-token`,children:`Authentication`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`app`}),`, `,_jsx(_components.code,{children:`external_user_id`}),`, `,_jsx(_components.code,{children:`ip`}),` or `,_jsx(_components.code,{children:`output=API`}),` missing.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`IP not on your allowlist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[`Invalid `,_jsx(_components.code,{children:`ip`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsxs(_components.td,{children:[`Rate limit exceeded: `,_jsx(_components.code,{children:`{\"status\":\"error\",\"count\":0,\"surveys\":[],\"message\":\"too_many_requests\"}`})]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get surveys","api":"GET /api/surveys","description":"Get the surveys available to one of your users. Creates the user on the first call.","href":"/surveys/get-surveys"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Call this endpoint from your server whenever you need the survey list for a user. It returns the user hash `,_jsx(_components.code,{children:`uh`}),`, which you need for the `,_jsx(_components.a,{href:`/surveys/qualification/start`,children:`qualification endpoints`}),`, and up to 50 surveys sorted by relevance.`]}),`\n`,_jsx(Heading,{level:`2`,id:`query-parameters`,children:`Query parameters`}),`\n`,_jsx(ParamField,{query:`app`,type:`string`,required:true,id:`param-app`,children:_jsx(_components.p,{children:`Your app hash.`})}),`\n`,_jsx(ParamField,{query:`external_user_id`,type:`string`,required:true,id:`param-external-user-id`,children:_jsx(_components.p,{children:`Your ID for the user. The user is created on the first call.`})}),`\n`,_jsx(ParamField,{query:`ip`,type:`string`,required:true,id:`param-ip`,children:_jsx(_components.p,{children:`The user’s IPv4 address. IPv6 is not supported. Surveys are matched to the user’s country from this IP.`})}),`\n`,_jsx(ParamField,{query:`output`,type:`string`,required:true,id:`param-output`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`API`}),`.`]})}),`\n`,_jsx(ParamField,{query:`user_agent`,type:`string`,id:`param-user-agent`,children:_jsxs(_components.p,{children:[`The user’s browser user agent. Required unless you send `,_jsx(_components.code,{children:`device`}),`. Used to detect the device type.`]})}),`\n`,_jsx(ParamField,{query:`device`,type:`string`,id:`param-device`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`desktop`}),`, `,_jsx(_components.code,{children:`mobile`}),` or `,_jsx(_components.code,{children:`tablet`}),`. Required unless you send `,_jsx(_components.code,{children:`user_agent`}),`. When both are sent, `,_jsx(_components.code,{children:`user_agent`}),` wins.`]})}),`\n`,_jsx(ParamField,{query:`token`,type:`string`,id:`param-token`,children:_jsx(_components.p,{children:`Your app API token. Required when secure API mode is on for your app.`})}),`\n`,_jsx(ParamField,{query:`limit`,type:`integer`,id:`param-limit`,children:_jsxs(_components.p,{children:[`Maximum number of surveys to return. Up to `,_jsx(_components.code,{children:`50`}),`.`]})}),`\n`,_jsx(ParamField,{query:`min_cpi`,type:`number`,id:`param-min-cpi`,children:_jsxs(_components.p,{children:[`Only return surveys whose `,_jsx(_components.code,{children:`publisher_payout`}),` (USD) is at least this value.`]})}),`\n`,_jsx(ParamField,{query:`locale`,type:`string`,id:`param-locale`,children:_jsxs(_components.p,{children:[`The user’s interface language, for example `,_jsx(_components.code,{children:`en`}),` or `,_jsx(_components.code,{children:`de`}),`. Up to 5 characters.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`profile-parameters`,children:`Profile parameters`}),`\n`,_jsx(_components.p,{children:`Send what you know about the user so they get better-matched surveys and fewer qualification questions. These values are saved when the user is new, or when no birth date is stored for them yet.`}),`\n`,_jsx(ParamField,{query:`birthday`,type:`string`,id:`param-birthday`,children:_jsxs(_components.p,{children:[`Birth date as `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`. `,_jsx(_components.code,{children:`birthdate`}),` is accepted as an alias.`]})}),`\n`,_jsx(ParamField,{query:`age`,type:`integer`,id:`param-age`,children:_jsx(_components.p,{children:`Age, 1 to 120. Used only when no birth date is sent.`})}),`\n`,_jsx(ParamField,{query:`gender`,type:`string`,id:`param-gender`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`male`}),`, `,_jsx(_components.code,{children:`female`}),`, `,_jsx(_components.code,{children:`m`}),` or `,_jsx(_components.code,{children:`f`}),`.`]})}),`\n`,_jsx(ParamField,{query:`zip`,type:`string`,id:`param-zip`,children:_jsx(_components.p,{children:`Postal code.`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`success`}),`, or `,_jsx(_components.code,{children:`error`}),` for validation and rate-limit errors.`]})}),`\n`,_jsx(ResponseField,{name:`uh`,type:`string`,id:`param-uh`,children:_jsxs(_components.p,{children:[`User hash. Use it as `,_jsx(_components.code,{children:`Bearer {uh}`}),` on the qualification endpoints.`]})}),`\n`,_jsx(ResponseField,{name:`count`,type:`integer`,id:`param-count`,children:_jsx(_components.p,{children:`Number of surveys returned.`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string | null`,id:`param-message`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`null`}),` when surveys were returned. Otherwise it says why the list is empty. See `,_jsx(_components.a,{href:`#empty-results`,children:`Empty results`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`errors`,type:`object`,id:`param-errors`,children:_jsx(_components.p,{children:`Only on validation errors: field name to a list of messages.`})}),`\n`,_jsx(ResponseField,{name:`surveys`,type:`object[]`,id:`param-surveys`,children:_jsxs(Expandable,{title:`survey properties`,children:[_jsx(ResponseField,{name:`hash`,type:`string`,id:`param-hash`,children:_jsxs(_components.p,{children:[`Survey hash. Send it as `,_jsx(_components.code,{children:`survey`}),` to Start qualification.`]})}),_jsx(ResponseField,{name:`id`,type:`integer`,id:`param-id`,children:_jsx(_components.p,{children:`Numeric survey ID.`})}),_jsx(ResponseField,{name:`loi`,type:`integer | null`,id:`param-loi`,children:_jsx(_components.p,{children:`Estimated length of interview, in minutes.`})}),_jsx(ResponseField,{name:`publisher_payout`,type:`number`,id:`param-publisher-payout`,children:_jsx(_components.p,{children:`What you earn for a complete, in USD.`})}),_jsx(ResponseField,{name:`user_reward`,type:`integer`,id:`param-user-reward`,children:_jsx(_components.p,{children:`Reward to show the user, in your app’s currency, bonuses included.`})}),_jsx(ResponseField,{name:`user_reward_without_bonus`,type:`integer`,id:`param-user-reward-without-bonus`,children:_jsx(_components.p,{children:`Same reward before bonuses.`})}),_jsx(ResponseField,{name:`bonus`,type:`number`,id:`param-bonus`,children:_jsx(_components.p,{children:`Bonus on this survey, in percent.`})}),_jsx(ResponseField,{name:`conversion_rate`,type:`number`,id:`param-conversion-rate`,children:_jsx(_components.p,{children:`Share of entrants who complete, 0 to 100.`})}),_jsx(ResponseField,{name:`score`,type:`number`,id:`param-score`,children:_jsx(_components.p,{children:`Ranking score. Surveys are already sorted by it.`})}),_jsx(ResponseField,{name:`user_rating_avg`,type:`number`,id:`param-user-rating-avg`,children:_jsxs(_components.p,{children:[`Average user rating, in steps of 0.5. `,_jsx(_components.code,{children:`0`}),` when there are not enough ratings.`]})}),_jsx(ResponseField,{name:`user_rating_count`,type:`integer`,id:`param-user-rating-count`,children:_jsx(_components.p,{children:`Number of user ratings.`})}),_jsx(ResponseField,{name:`hot`,type:`integer`,id:`param-hot`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1`}),` for high-converting surveys, otherwise `,_jsx(_components.code,{children:`0`}),`.`]})}),_jsx(ResponseField,{name:`url`,type:`string`,id:`param-url`,children:_jsx(_components.p,{children:`Survey entry link. Send the user here to qualify on the survey page instead of using the qualification API.`})}),_jsx(ResponseField,{name:`order`,type:`integer`,id:`param-order`,children:_jsx(_components.p,{children:`Position in the list, starting at 1.`})})]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Extra survey fields, such as `,_jsx(_components.code,{children:`supplier_id`}),` or `,_jsx(_components.code,{children:`buyer_id`}),`, can be turned on for your app. Ask your account manager.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`empty-results`,children:`Empty results`}),`\n`,_jsxs(_components.p,{children:[`When there are no surveys, `,_jsx(_components.code,{children:`status`}),` is still `,_jsx(_components.code,{children:`success`}),`, `,_jsx(_components.code,{children:`count`}),` is `,_jsx(_components.code,{children:`0`}),` and `,_jsx(_components.code,{children:`message`}),` says why:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`message`})}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`no_surveys`})}),_jsx(_components.td,{children:`No surveys match this user right now. Try again later.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`inactive_user`})}),_jsx(_components.td,{children:`The user is inactive, or your app or the user’s country is disabled.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`disabled_app_or_country`})}),_jsx(_components.td,{children:`Your app or the requested country is disabled.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`disabled_source`})}),_jsx(_components.td,{children:`The traffic source is disabled for your app.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`unallowed_user_creation [N]`})}),_jsx(_components.td,{children:`A new user could not be created, for example because new users are disabled for your app or country.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`banned`}),`, `,_jsx(_components.code,{children:`on_hold`}),`, `,_jsx(_components.code,{children:`on_review`})]}),_jsx(_components.td,{children:`The user’s account is restricted.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`vpn_detected`}),`, `,_jsx(_components.code,{children:`location_error`})]}),_jsx(_components.td,{children:`The user’s IP is a VPN, or its location doesn’t match.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed_to_upsert_user_profiling`})}),_jsxs(_components.td,{children:[`A profile parameter (`,_jsx(_components.code,{children:`birthday`}),`, `,_jsx(_components.code,{children:`age`}),` or `,_jsx(_components.code,{children:`gender`}),`) could not be saved. Check the values.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`HTTP`}),_jsx(_components.th,{children:`Body`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`200`})}),_jsxs(_components.td,{children:[`Validation error: `,_jsx(_components.code,{children:`{\"status\":\"error\",\"errors\":{...}}`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`Token or app errors. See `,_jsx(_components.a,{href:`/surveys/authentication#app-token`,children:`Authentication`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`app`}),`, `,_jsx(_components.code,{children:`external_user_id`}),`, `,_jsx(_components.code,{children:`ip`}),` or `,_jsx(_components.code,{children:`output=API`}),` missing.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`IP not on your allowlist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsxs(_components.td,{children:[`Invalid `,_jsx(_components.code,{children:`ip`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsxs(_components.td,{children:[`Rate limit exceeded: `,_jsx(_components.code,{children:`{\"status\":\"error\",\"count\":0,\"surveys\":[],\"message\":\"too_many_requests\"}`})]})]})]})]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` GET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://partners.{your-domain}/api/surveys?app=8f2c1e4a-7b3d-4f6a-9c0e-1d2b3a4c5e6f\u0026external_user_id=user-123\u0026ip=203.0.113.5\u0026output=API\u0026device=mobile\u0026token=YOUR_APP_TOKEN\u0026limit=20'`})]}),`\n`]})})})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`Surveys`,numberOfLines:`25`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`25`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"uh\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"surveys\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`123456`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"a4df4600-df48-4286-990d-fa68db595f44\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"loi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"publisher_payout\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.25`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_reward\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`125`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_reward_without_bonus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`125`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"bonus\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"conversion_rate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`35`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`180`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_rating_avg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4.5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_rating_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`42`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_rating_ct\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`42`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hot\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://{surveys-host}/survey?app=8f2c1e4a-7b3d-4f6a-9c0e-1d2b3a4c5e6f\u0026uh=0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f\u0026sh=a4df4600-df48-4286-990d-fa68db595f44\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"order\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`No surveys`,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"uh\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"surveys\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"no_surveys\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Validation error`,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"errors\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The user agent field is required when device is not present.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get surveys","api":"GET /api/surveys","description":"Get the surveys available to one of your users. Creates the user on the first call.","href":"/surveys/get-surveys"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Query parameters","slug":"query-parameters","depth":2,"children":[{"title":"Profile parameters","slug":"profile-parameters","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Empty results","slug":"empty-results","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"2\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> GET\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --url\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'https://partners.{your-domain}/api/surveys?app=8f2c1e4a-7b3d-4f6a-9c0e-1d2b3a4c5e6f\u0026#x26;external_user_id=user-123\u0026#x26;ip=203.0.113.5\u0026#x26;output=API\u0026#x26;device=mobile\u0026#x26;token=YOUR_APP_TOKEN\u0026#x26;limit=20'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"Surveys","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"25\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"uh\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"surveys\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">123456\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"a4df4600-df48-4286-990d-fa68db595f44\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"loi\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">12\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"publisher_payout\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1.25\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_reward\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">125\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_reward_without_bonus\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">125\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"bonus\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"conversion_rate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">35\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"score\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">180\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_rating_avg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">4.5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_rating_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">42\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_rating_ct\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">42\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"hot\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://{surveys-host}/survey?app=8f2c1e4a-7b3d-4f6a-9c0e-1d2b3a4c5e6f\u0026#x26;uh=0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f\u0026#x26;sh=a4df4600-df48-4286-990d-fa68db595f44\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"order\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"No surveys","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"7\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"uh\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"surveys\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"no_surveys\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Validation error","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_agent\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The user agent field is required when device is not present.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Get surveys","path":"/api/surveys","servers":[{"url":"https://partners.{your-domain}"}],"method":"get","request":{"security":[],"parameters":{"query":{"app":{"schema":[{"type":"string","description":"Your app hash.","required":true}]},"external_user_id":{"schema":[{"type":"string","description":"Your ID for the user. The user is created on the first call.","required":true}]},"ip":{"schema":[{"type":"string","description":"The user’s IPv4 address. IPv6 is not supported. Surveys are matched to the user’s country from this IP.","required":true}]},"output":{"schema":[{"type":"string","description":"Always `API` .","required":true}]},"user_agent":{"schema":[{"type":"string","description":"The user’s browser user agent. Required unless you send `device` . Used to detect the device type."}]},"device":{"schema":[{"type":"string","description":"`desktop` , `mobile` or `tablet` . Required unless you send `user_agent` . When both are sent, `user_agent` wins."}]},"token":{"schema":[{"type":"string","description":"Your app API token. Required when secure API mode is on for your app."}]},"limit":{"schema":[{"type":"integer","description":"Maximum number of surveys to return. Up to `50` ."}]},"min_cpi":{"schema":[{"type":"number","description":"Only return surveys whose `publisher_payout` (USD) is at least this value."}]},"locale":{"schema":[{"type":"string","description":"The user’s interface language, for example `en` or `de` . Up to 5 characters."}]},"birthday":{"schema":[{"type":"string","description":"Birth date as `YYYY-MM-DD` . `birthdate` is accepted as an alias."}]},"age":{"schema":[{"type":"integer","description":"Age, 1 to 120. Used only when no birth date is sent."}]},"gender":{"schema":[{"type":"string","description":"`male` , `female` , `m` or `f` ."}]},"zip":{"schema":[{"type":"string","description":"Postal code."}]}},"header":{},"cookie":{},"path":{}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"status":[{"type":"string","description":"`success` , or `error` for validation and rate-limit errors.","required":true}],"uh":[{"type":"string","description":"User hash. Use it as `Bearer {uh}` on the qualification endpoints."}],"count":[{"type":"integer","description":"Number of surveys returned."}],"message":[{"type":"object","properties":{},"description":"`null` when surveys were returned. Otherwise it says why the list is empty. See Empty results ."}],"errors":[{"type":"object","properties":{},"description":"Only on validation errors: field name to a list of messages."}],"surveys":[{"type":"array","items":[{"type":"object","properties":{"hash":[{"type":"string","description":"Survey hash. Send it as `survey` to Start qualification."}],"id":[{"type":"integer","description":"Numeric survey ID."}],"loi":[{"type":"object","properties":{},"description":"Estimated length of interview, in minutes."}],"publisher_payout":[{"type":"number","description":"What you earn for a complete, in USD."}],"user_reward":[{"type":"integer","description":"Reward to show the user, in your app’s currency, bonuses included."}],"user_reward_without_bonus":[{"type":"integer","description":"Same reward before bonuses."}],"bonus":[{"type":"number","description":"Bonus on this survey, in percent."}],"conversion_rate":[{"type":"number","description":"Share of entrants who complete, 0 to 100."}],"score":[{"type":"number","description":"Ranking score. Surveys are already sorted by it."}],"user_rating_avg":[{"type":"number","description":"Average user rating, in steps of 0.5. `0` when there are not enough ratings."}],"user_rating_count":[{"type":"integer","description":"Number of user ratings."}],"hot":[{"type":"integer","description":"`1` for high-converting surveys, otherwise `0` ."}],"url":[{"type":"string","description":"Survey entry link. Send the user here to qualify on the survey page instead of using the qualification API."}],"order":[{"type":"integer","description":"Position in the list, starting at 1."}]}}]}]}}],"examples":{"example":{"value":{"status":"\u003cstring>","uh":"\u003cstring>","count":123,"message":{},"errors":{},"surveys":[{"hash":"\u003cstring>","id":123,"loi":{},"publisher_payout":123,"user_reward":123,"user_reward_without_bonus":123,"bonus":123,"conversion_rate":123,"score":123,"user_rating_avg":123,"user_rating_count":123,"hot":123,"url":"\u003cstring>","order":123}]}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"primeinsights","siteName":"Prime Insights","title":"Get surveys - Prime Insights","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-23T14:26:39.914Z","originalFileLocation":"surveys/get-surveys.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Get the surveys available to one of your users. Creates the user on the first call.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Prime Insights\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get surveys - Prime Insights\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get the surveys available to one of your users. Creates the user on the first call.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Prime Insights\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs-saas.primeearn.com/surveys/get-surveys\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://primeinsights.mintlify.site/_mintlify/api/og/v2?division=Surveys\u0026amp;title=Get+surveys\u0026amp;description=Get+the+surveys+available+to+one+of+your+users.+Creates+the+user+on+the+first+call.\u0026amp;theme=be394bdd824f66fd2549706a\u0026amp;signature=f49403b3f81e3de0b73999ed3fc02ada2ecfdd2c2c9986a407f7502e662821fa\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get surveys - Prime Insights\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get the surveys available to one of your users. Creates the user on the first call.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://primeinsights.mintlify.site/_mintlify/api/og/v2?division=Surveys\u0026amp;title=Get+surveys\u0026amp;description=Get+the+surveys+available+to+one+of+your+users.+Creates+the+user+on+the+first+call.\u0026amp;theme=be394bdd824f66fd2549706a\u0026amp;signature=f49403b3f81e3de0b73999ed3fc02ada2ecfdd2c2c9986a407f7502e662821fa\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/primeinsights/26PxvF8d5oJl0n0l/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Prime Insights\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs-saas.primeearn.com/surveys/get-surveys\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/surveys/get-surveys.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs-saas.primeearn.com/#organization\",\"name\":\"Prime Insights\",\"url\":\"https://docs-saas.primeearn.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs-saas.primeearn.com#website\",\"name\":\"Prime Insights\",\"url\":\"https://docs-saas.primeearn.com\",\"publisher\":{\"@id\":\"https://docs-saas.primeearn.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs-saas.primeearn.com/surveys/get-surveys#webpage\",\"url\":\"https://docs-saas.primeearn.com/surveys/get-surveys\",\"name\":\"Get surveys\",\"description\":\"Get the surveys available to one of your users. Creates the user on the first call.\",\"dateModified\":\"2026-11-23T14:26:39.914Z\",\"isPartOf\":{\"@id\":\"https://docs-saas.primeearn.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs-saas.primeearn.com/surveys/get-surveys#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs-saas.primeearn.com/surveys/get-surveys#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prime Insights\",\"item\":\"https://docs-saas.primeearn.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get surveys\",\"item\":\"https://docs-saas.primeearn.com/surveys/get-surveys\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs-saas.primeearn.com/surveys/get-surveys#apireference\",\"headline\":\"Get surveys\",\"name\":\"Get surveys\",\"description\":\"Get the surveys available to one of your users. Creates the user on the first call.\",\"url\":\"https://docs-saas.primeearn.com/surveys/get-surveys\",\"mainEntityOfPage\":{\"@id\":\"https://docs-saas.primeearn.com/surveys/get-surveys#webpage\"},\"dateModified\":\"2026-11-23T14:26:39.914Z\",\"publisher\":{\"@id\":\"https://docs-saas.primeearn.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs-saas.primeearn.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Prime Insights\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Prime Insights\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/surveys/get-surveys.md","siteName":"Prime Insights","nav":{"global":null,"tabs":[{"tab":"Surveys","groups":[{"group":"Get started","pages":[{"title":"Overview","href":"/surveys/overview"},{"title":"Authentication","description":"How server and user requests are authenticated, IP allowlisting and rate limits.","href":"/surveys/authentication"}]},{"group":"Surveys","pages":[{"title":"Get surveys","api":"GET /api/surveys","href":"/surveys/get-surveys"},{"title":"Surveys list","api":"GET /api/surveys/list","description":"List all surveys available to your app in a country, without a user.","href":"/surveys/surveys-list"}]},{"group":"Qualification","pages":[{"title":"Start qualification","api":"POST /api/qualification","href":"/surveys/qualification/start"},{"title":"Submit an answer","api":"POST /api/answers","href":"/surveys/qualification/submit-answer"},{"title":"Search answers","api":"GET /api/question/{question}/answers","href":"/surveys/qualification/search-answers"},{"title":"Question types","href":"/surveys/qualification/question-types"}]}]}]},"basePath":"","title":"Get surveys - Prime Insights","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-_HcdDqS2.js","snippetPresets-CXnm-WO6.js","utils-Dg59J__o.js","style-to-object-BY3JEAdk.js","utils-D8TRpdk7.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-B6QaxWc5.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DeMZ-lcM.js","_Uint8Array-BjA2mcVW.js","isObject-FP1Yky1u.js","ApiExamples-cjPyMv63.js","usePlaygroundInputsStore-D7BWoaw4.js","shallow-Z1ceDNSG.js","isEqual-BObTuQrO.js","CodeSnippets-D1UZ1AE-.js","CodeSnippet-B373COAT.js","getApiPlaygroundDisplay-CfL-UuDS.js","Page-DuqezyvM.js","DynamicMarkdown-5yMTCLas.js","SectionHeading-BxT1HYfP.js","icon-DYJTTD3g.js","MethodPill-4AyycJeu.js","getPastedJson-Bp3WV6cN.js","Check2Icon-PhZu6Gry.js","axios-CsQoIw0U.js"]}