Back to Help
Export

Troubleshoot API Response Pulls

Debug API pulls by checking keys, headers, survey ids, pagination, status codes, and manual exports.

Troubleshoot API Pulls Systematically

If an API script cannot pull survey responses, check the key, survey id, request headers, pagination, permissions, and expected response shape. Fix one layer at a time so you do not confuse an authentication problem with a data parsing problem.

Use the browser export as the reference point. If Export shows responses but the API does not, the problem is probably the request, credentials, survey id, or pagination. If both are missing the same rows, investigate collection, Flow, or response cleaning first.

Export: Data Output

Block Builder
Preview
Deploy

Export

Download analysis-ready response data from the Export tab.

Debug The Request

  1. Step 1: Confirm the key exists. Follow Pull Survey Responses With the API to create or identify the API key in Settings.

    Step 1: Confirm the key exists

    Top Navigation

    This is the same navigation component used in the app shell.

  2. Step 2: Check the Authorization header. Send the key as a Bearer token and avoid copying extra spaces or quotes from an environment file.

    Step 2: Check the Authorization header

    Block Builder
    Preview
    Deploy

    Export

    Download analysis-ready response data from the Export tab.

  3. Step 3: Confirm the survey id. Use the UUID from the survey URL, not the public link slug or title.

    Step 3: Confirm the survey id

    Block Builder
    Preview
    Deploy

    Export

    Download analysis-ready response data from the Export tab.

  4. Step 4: Test a small request. Start with limit=1 or another low limit before wiring the request into a full data pipeline.

    Step 4: Test a small request

    Block Builder
    Preview
    Deploy

    Export

    Download analysis-ready response data from the Export tab.

  5. Step 5: Handle pagination. Keep requesting until next_cursor is null, as described in Pull Survey Responses With the API.

    Step 5: Handle pagination

    Block Builder
    Preview
    Deploy

    Export

    Download analysis-ready response data from the Export tab.

  6. Step 6: Compare with a manual export. Download Export data and confirm your script receives the same expected fields and response count.

    Step 6: Compare with a manual export

    Block Builder
    Preview
    Deploy

    Export

    Download analysis-ready response data from the Export tab.

Common API Errors

  • 401: the key is missing, invalid, expired, or copied incorrectly.
  • 403: the key does not have access to the requested survey.
  • 404: the survey id is wrong or the survey is unavailable to that key.
  • 429: the script is sending requests too quickly; add a delay between pages.
  • 500: retry once, then check whether your request parameters are valid before assuming responses are missing.
  • Empty data: check whether responses exist, whether you are using the right survey id, whether the key belongs to the right workspace, and whether pagination has reached the end.

Export: Data Output

Block Builder
Preview
Deploy

Export

Download analysis-ready response data from the Export tab.

Request Checklist

  • Header: Authorization: Bearer dmdt_... with no surrounding quotes in the actual header value.
  • Endpoint: /api/v1/responses with survey_id as a query parameter.
  • Survey id: the UUID from the editor URL, not the published /s/... path.
  • Limit: keep test requests small, then increase up to the documented maximum once the response shape is correct.
  • Cursor: pass the previous next_cursor value exactly; do not reformat the timestamp.
  • Logging: log status code, request URL without the key, response count, and next cursor for every page.

Related Help