PollifyPollify
Get Started

API Documentation

Complete reference for the Pollify REST API

Quick Start
Get started with the Pollify API in minutes

1. Create an API Token

Go to API Tokens in your dashboard to create a new token with the permissions you need.

2. Make your first request

curl -X GET "/api/v1/events" \
  -H "Authorization: Bearer pol_your_token_here"

3. Authentication

All API requests require authentication via Bearer token in the Authorization header. Tokens can have different permissions: read,write,delete,admin

Rate Limiting & Best Practices

Rate Limits

  • 100 requests per minute per token
  • 1000 requests per hour per token
  • Responses include rate limit headers

Response Format

  • All responses are JSON
  • Success responses include success: true
  • Error responses include error

Events

GET
/events
read
List all events for the authenticated user

Query Parameters

page(number)- Page number (default: 1)
limit(number)- Items per page (default: 20, max: 100)
status(string)- Filter by status: active, ended, all
search(string)- Search by event name

Example Request

curl -X GET "/api/v1/events?status=active&limit=10" \
  -H "Authorization: Bearer pol_your_token_here"

Example Response

{
  "success": true,
  "data": {
    "events": [
      {
        "id": "uuid",
        "name": "My Event",
        "event_code": "ABC123",
        "numeric_code": "123456",
        "is_active": true,
        "created_at": "2025-01-01T00:00:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 10,
      "total": 1,
      "totalPages": 1
    }
  }
}
POST
/events
write
Create a new event

Request Body

name(string)
required
- Event name
description(string)- Event description

Example Request

curl -X POST /api/v1/events \
  -H "Authorization: Bearer pol_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Team Meeting Q1",
    "description": "Quarterly team sync"
  }'

Example Response

{
  "success": true,
  "data": {
    "id": "uuid",
    "name": "Team Meeting Q1",
    "description": "Quarterly team sync",
    "event_code": "XYZ789",
    "numeric_code": "789012",
    "is_active": true,
    "created_at": "2025-01-01T00:00:00Z"
  }
}
GET
/events/{eventId}
read
Get a specific event by ID

Example Request

curl -X GET /api/v1/events/{eventId} \
  -H "Authorization: Bearer pol_your_token_here"
PATCH
/events/{eventId}
write
Update an event

Request Body

name(string)- Event name
description(string)- Event description
is_active(boolean)- Event active status

Example Request

curl -X PATCH /api/v1/events/{eventId} \
  -H "Authorization: Bearer pol_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{ "is_active": false }'
DELETE
/events/{eventId}
delete
Delete an event

Example Request

curl -X DELETE /api/v1/events/{eventId} \
  -H "Authorization: Bearer pol_your_token_here"

Ready to integrate?

Create your free account and start building with the Pollify API

Get Started for Free