Developer Docs

Developer API Reference

Build custom integrations with our REST API. Manage surveys, collect responses, trigger campaigns, and access analytics programmatically.

Quick Start

Get Started in Minutes

Quick Start

# Base URL

https://api.claform.com/api/v1

# Authentication: Bearer token in header

curl -H "Authorization: Bearer your_api_key" \

https://api.claform.com/api/v1/surveys

# Response format: JSON

{

"data": [...],

"meta": { "total": 42, "page": 1 }

}

Authentication

Secure Access

API Keys

Scoped API keys with per-endpoint permissions. Pass via Authorization: Bearer header.

JWT Tokens

OAuth 2.0 bearer tokens for user-context requests. Pass via Authorization header.

Rate Limiting

60 requests/minute default. Higher limits on Business (300/min) and Enterprise (custom) plans.

Endpoints

Core API Endpoints

All endpoints use the base URL /api/v1 and return JSON responses.

Surveys

GET/surveys
POST/surveys
GET/surveys/:id
PATCH/surveys/:id
DELETE/surveys/:id
GET/surveys/:id/responses

Responses

GET/responses
POST/responses
GET/responses/:id
DELETE/responses/:id

Campaigns

POST/email-campaigns
POST/sms-campaigns
POST/whatsapp-campaigns
POST/voice-distribution
GET/email-campaigns/:id

Analytics

GET/analytics/survey/:id/stats
GET/analytics/survey/:id/trends
POST/analytics/ai/sentiment
POST/analytics/ai/summary

Audiences

GET/audiences
POST/audiences
POST/audiences/:id/contacts
GET/audiences/:id/contacts

Webhooks

POST/webhooks
GET/webhooks
DELETE/webhooks/:id
POST/webhooks/:id/test

SDKs

Official SDKs for 4 Platforms

Production-ready SDKs with offline support, type safety, and comprehensive documentation.

TypeScript / Node.js
npm install @claform/sdk-core
React Native
npm install @claform/sdk-react-native
Flutter / Dart
flutter pub add claform_sdk_flutter
iOS / Swift
.package(url: "https://github.com/claform/sdk-ios")
Android / Kotlin
implementation "com.claform:sdk-android:1.0.0"

Webhooks

16 Webhook Event Types

Subscribe to events and receive real-time HTTP callbacks when actions occur in your account.

survey.created
survey.published
survey.closed
survey.deleted
response.started
response.completed
response.updated
response.deleted
campaign.sent
campaign.delivered
campaign.failed
campaign.bounced
contact.created
contact.opted_out
analytics.report_ready
webhook.test

Error Handling

Error Codes

CodeNameDescription
400Bad RequestInvalid request parameters or body
401UnauthorizedMissing or invalid API key
403ForbiddenInsufficient permissions for this resource
404Not FoundResource does not exist
409ConflictResource state conflict (e.g., duplicate)
422UnprocessableValidation error in request body
429Too Many RequestsRate limit exceeded
500Server ErrorUnexpected server error

Start Building Today

Create your account and generate an API key in seconds. Full API access is available on all plans, including Free.