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.
SurveySparrow uses OAuth 2.0 for Authentication . There are 2 ways you can authorize your app to connect with SurveySparrow
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
curl --request GET \--url https://api.surveysparrow.com/v1/contacts \--header 'Authorization: Bearer your-surveysparrow-access-token'
You can pass your access token in the URL as a query parameter
curl --request GET \--url https://api.surveysparrow.com/v1/contacts?access_token=<token>
SurveSparrow uses standard HTTP status codes like 2xx for success and 4xx for failure. Refer the following table for status codes.
|200 OK||The request has succeeded|
|202 Accepted||The request has been accepted for processing, but the processing has not been completed|
|204 No Content||The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.|
|400 Bad Request||Request has missing required parameters or validation errors|
|401 Unauthorized||The request has not been applied because it lacks valid authentication credentials for the target resource|
|403 Forbidden||The server understood the request but refuses to authorize it.|
|404 Not Found||The requested resource doesn’t exist|
|409 Conflict||Request conflicts with another, trying to create already existing resource|
|422 Unprocessable Entity||The request was well-formed but was unable to be followed due to semantic errors|
|429 Too Many Requests||The user has sent too many requests in a given amount of time|
|500 Internal Server Error||The server encountered an unexpected condition that prevented it from fulfilling the request.|