Introduction

SurveySparrow API allows you to integrate third party applications in your enterprise ecosystem and helps you to automate workflows like, sending a survey when a ticket is closed or a employee leaves the organisation.


Authentication

SurveySparrow uses OAuth 2.0 for Authentication . There are 2 ways you can authorize your app to connect with SurveySparrow

Prerequisites

  • Login to your surveysparrow account and go to Settings → Apps & Integrations

  • Create a Private App

  • Enter Name, Description, select scope and generate the access token

  • Copy and keep the access token in a safe place (Access token will be displayed only once and you may need to re-generate if you misplaced)

  • Save your app and you are good to start developing your private app

Your access token can be used as the Bearer token, to authorize with SurveySparrow

Request

curl --request GET \
--url https://api.surveysparrow.com/v1/contacts \
--header 'Authorization: Bearer your-surveysparrow-access-token'

Response codes

SurveSparrow uses standard HTTP status codes like 2xx for success and 4xx for failure. Refer the following table for status codes.

Response codeDescription
200 OKThe request has succeeded
202 AcceptedThe request has been accepted for processing, but the processing has not been completed
204 No ContentThe server has successfully fulfilled the request and that there is no additional content to send in the response payload body.
400 Bad RequestRequest has missing required parameters or validation errors
401 UnauthorizedThe request has not been applied because it lacks valid authentication credentials for the target resource
403 ForbiddenThe server understood the request but refuses to authorize it.
404 Not FoundThe requested resource doesn’t exist
409 ConflictRequest conflicts with another, trying to create already existing resource
422 Unprocessable EntityThe request was well-formed but was unable to be followed due to semantic errors
429 Too Many RequestsThe user has sent too many requests in a given amount of time
500 Internal Server ErrorThe server encountered an unexpected condition that prevented it from fulfilling the request.