List Submissions

List all submissions, or list submissions for a given template ID.

HTTP Request

  • List all submissions for your account:

GET https://api.docspring.com/api/v1/submissions

  • List submissions for a template ID:

GET https://api.docspring.com/api/v1/templates/<template_id>/submissions

Authentication

You must send an Authorization header with the value Basic followed by base 64 encoded token_id:token_secret.

For example: Authorization: Basic dG9rZW5faWQ6dG9rZW5fc2VjcmV0Cg==

See the Authentication documentation for more information.

Parameters

  • <template_id> (in path): Only return submissions for this template ID
    • GET /api/v1/templates/<template_id>/submissions
  • type: Return test, live, or all submissions. (Default: all)
  • include_data: Include all submission data in the response (Default: false)
  • limit: Maximum number of submissions to return (Default: 50, Min: 1, Max: 50)
  • cursor: Return submissions after this submission ID (for pagination)
    • Each response includes a next_cursor property that you can use to fetch the next page. (This is the ID of the last submission in the submissions array.)
    • There are no more results when the submissions array is empty or has less than limit elements (default: 50)
  • created_after: Return submissions created after this time. ISO 8601 formatted date, e.g. "2021-08-30T22:02:35+12:00"
  • created_before: Return submissions created before this time. ISO 8601 formatted date, e.g. "2021-08-30T22:02:35+12:00"

Example URL that uses all possible parameters:

https://api.docspring.com/api/v1/templates/tpl_000000000000000001/submissions?type=test&include_data=true&limit=20&cursor=sub_000000000000000005&created_after=2020-08-30T22:02:35%2B12:00&created_before=2020-12-30T22:02:35%2B12:00

Example Response

{
  "limit": 50,
  "next_cursor": "sub_000000000000000001",
  "submissions": [
    {
      "id": "sub_000000000000000001",
      "template_id": "tpl_000000000000000001",
      "batch_id": null,
      "state": "processed",
      "test": true,
      "editable": false,
      "expired": false,
      "expires_at": "2018-10-27T13:00:00Z",
      "json_schema_errors": [],
      "truncated_text": {},
      "metadata": {},
      "processed_at": "2020-05-14T02:00:00Z",
      "data_requests": [],
      "pdf_hash": "bbc369dd471442006963e3244a1b43610e066165c09770978221f91bd7ace8f5",
      "download_url": "https://example.com/submissions/submission.pdf",
      "permanent_download_url": "http://app.docspring.localhost/submissions/sub_000000000000000001/download",
      "actions": [],
      "source": "api",
      "referrer": null,
      "data": {
        "first_name": "John",
        "last_name": "Smith",
        "phone_number": "+11234567890"
      }
    }
  ]
}

results matching ""

    No results matching ""