Responses

Search for responses

Search for responses.

Required scopes: read responses

Accepted date filters are:

  • created_start_date
  • created_end_date
  • modified_start_date
  • modified_end_date

Accepted comparison values are:

  • is
  • is_not
  • contains
  • does_not_contain
  • is_unknown
  • has_any_value

Accepted key values are:

  • choice_value
  • collaborator
  • company
  • comment
  • customer (name)
  • customer.email
  • ip
  • metric
  • sentiment
  • source
  • survey (token)
  • tag
  • team_member (name)
  • team_member.email
  • team_member.id (external_id)
  • ticket_id (external_id)
  • customer.attribute (add the attribute field to the filter to specify the attribute to filter on)
  • ticket.attribute (add the attribute field to the filter to specify the attribute to filter on)
post/api/v1/responses/search

Request

  • Base URL: https://api.simplesat.io
  • URL: https://api.simplesat.io/api/v1/responses/search
  • Auth: API key in header X-Simplesat-Token

Query parameters

page_sizeinteger

The number of responses to return per page

pageinteger

The page number to return

Request body

start_datestring date-time
created_start_datestring date-time
end_datestring date-time
created_end_datestring date-time
modified_start_datestring date-time
modified_end_datestring date-time

Example request

{
  "created_start_date": "2024-01-01T00:00:00Z",
  "created_end_date": "2024-12-31T23:59:59Z",
  "filters": [
    {
      "key": "customer.email",
      "values": [
        "tester@simplesat.io"
      ],
      "comparison": "is"
    }
  ]
}

Response

Successful response

nextstring
previousstring nullable
countinteger

Example response

{
  "next": null,
  "previous": null,
  "count": 1,
  "responses": [
    {
      "id": 1,
      "survey": {
        "id": 1,
        "name": "CSAT Survey"
      },
      "language": "en",
      "tags": [
        "tag1",
        "tag2"
      ],
      "created": "2024-01-01T00:00:00Z",
      "modified": "2024-01-01T00:00:00Z",
      "ip_address": "192.168.1.1",
      "ticket": {
        "id": 1,
        "external_id": "1",
        "subject": "Ticket subject",
        "custom_attributes": {
          "Priority": "Medium",
          "Category": "Support"
        }
      },
      "team_members": [
        {
          "id": 1,
          "role": "Agent",
          "is_primary": true,
          "external_id": "1",
          "name": "Tester McTestFace",
          "email": "tester@simplesat.io",
          "groups": [
            {
              "token": "iLA0X65ayqAgnnqnKSFuAwlgtiFGbt3gcN-L73SHNP0",
              "name": "Outsource BPO"
            }
          ]
        }
      ],
      "customer": {
        "id": 1,
        "external_id": "1",
        "name": "Tester McTestFace",
        "email": "tester@simplesat.io",
        "company": "Simplesat",
        "tags": [
          "tag1",
          "tag2"
        ],
        "custom_attributes": {
          "Country": "United States",
          "City": "San Francisco",
          "Channels": [
            "Web",
            "Mobile App"
          ]
        }
      },
      "answers": [
        {
          "id": 1,
          "question": {
            "id": 1,
            "text": "How did we do?",
            "metric": "csat"
          },
          "choice": "4",
          "choices": [
            "Option1",
            "Option2"
          ],
          "comment": "Great!",
          "sentiment": "positive",
          "follow_up_answer": "Great!",
          "follow_up_answer_choice": "yes",
          "follow_up_answer_choices": [
            "Option A",
            "Option B"
          ],
          "follow_up_question": {
            "id": 1,
            "text": "Was there anything in particular we did that delighted you?",
            "metric": "custom"
          },
          "topics": [
            {
              "id": 1,
              "name": "Response time",
              "description": "How quickly the team responded to the request.",
              "sentiment": "positive"
            }
          ],
          "source": "generic_embed",
          "language": "en"
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.