API Reference

Build powerful integrations with the Simplified Surveys API

API Access Required

API access is available on Professional and Enterprise plans. Generate your API key from your account settings.

View pricing plans

Base URL

https://simplifiedsurveys.com/api

Authentication

All API requests require authentication using a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_TOKEN

Authentication

Authenticate and manage API access

POST/api/auth/token

Generate API access token

curl -X POST "https://simplifiedsurveys.com/api/auth/token" \
  -d '{
  "email": "user@example.com",
  "password": "your-password"
}'

Response

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "expiresAt": "2024-12-31T23:59:59Z"
}

Surveys

Create, read, update, and delete surveys

GET/api/surveys

List all surveys for your organization

curl -X GET "https://simplifiedsurveys.com/api/surveys" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
  "surveys": [
    {
      "id": "survey-123",
      "slug": "customer-feedback",
      "title": "Customer Feedback Survey",
      "status": "published",
      "responses": 42,
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ]
}
GET/api/surveys/{slug}

Get survey details

curl -X GET "https://simplifiedsurveys.com/api/surveys/{slug}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
  "id": "survey-123",
  "slug": "customer-feedback",
  "title": "Customer Feedback Survey",
  "description": "Tell us about your experience",
  "questions": [
    {
      "id": "q1",
      "type": "text",
      "question": "What did you like most?",
      "required": true
    }
  ]
}
POST/api/surveys

Create a new survey

curl -X POST "https://simplifiedsurveys.com/api/surveys" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "New Survey",
  "description": "Survey description",
  "questions": [
    {
      "type": "text",
      "question": "Your question here",
      "required": true
    }
  ]
}'

Response

{
  "id": "survey-456",
  "slug": "new-survey",
  "shareUrl": "https://simplifiedsurveys.com/s/new-survey"
}
PUT/api/surveys/{slug}

Update survey details

curl -X PUT "https://simplifiedsurveys.com/api/surveys/{slug}" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Updated Title",
  "status": "published"
}'

Response

{
  "success": true,
  "survey": {}
}
DELETE/api/surveys/{slug}

Delete a survey

curl -X DELETE "https://simplifiedsurveys.com/api/surveys/{slug}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
  "success": true,
  "message": "Survey deleted successfully"
}

Responses

Manage and retrieve survey responses

GET/api/surveys/{slug}/responses

Get all responses for a survey

curl -X GET "https://simplifiedsurveys.com/api/surveys/{slug}/responses" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
  "responses": [
    {
      "id": "response-1",
      "surveyId": "survey-123",
      "answers": {
        "q1": "Great service!",
        "q2": [
          "option1",
          "option2"
        ]
      },
      "submittedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "total": 42,
  "page": 1,
  "pages": 1
}
POST/api/surveys/{slug}/respond

Submit a survey response programmatically

curl -X POST "https://simplifiedsurveys.com/api/surveys/{slug}/respond" \
  -H "Content-Type: application/json" \
  -d '{
  "answers": {
    "question_1": "Answer text",
    "question_2": [
      "option1",
      "option2"
    ]
  }
}'

Response

{
  "success": true,
  "responseId": "response-789"
}
GET/api/surveys/{slug}/responses/export

Export responses as CSV

curl -X GET "https://simplifiedsurveys.com/api/surveys/{slug}/responses/export" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

"CSV file download"

Analytics

Get survey analytics and insights

GET/api/surveys/{slug}/analytics

Get survey analytics

curl -X GET "https://simplifiedsurveys.com/api/surveys/{slug}/analytics" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Response

{
  "totalResponses": 42,
  "completionRate": 0.85,
  "averageTime": 180,
  "responsesByDay": [
    {
      "date": "2024-01-01",
      "count": 5
    },
    {
      "date": "2024-01-02",
      "count": 8
    }
  ],
  "questionStats": [
    {
      "questionId": "q1",
      "type": "multiple_choice",
      "responses": {
        "option1": 15,
        "option2": 20,
        "option3": 7
      }
    }
  ]
}

Webhooks

Configure webhooks for real-time notifications

POST/api/webhooks

Create a webhook

curl -X POST "https://simplifiedsurveys.com/api/webhooks" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://your-app.com/webhook",
  "events": [
    "response.created",
    "survey.completed"
  ],
  "surveyId": "survey-123"
}'

Response

{
  "id": "webhook-1",
  "url": "https://your-app.com/webhook",
  "secret": "whsec_abc123..."
}

Rate Limiting

API requests are limited to 100 requests per minute for Professional plans and 1000 requests per minute for Enterprise plans. Rate limit information is included in response headers.

Need Help?

Check our documentation or contact support for API assistance.