API Documentation

Welcome to the #divisions API. This reference covers all available endpoints, authentication methods, and response formats for integrating with our platform.

Base URL: https://api.divisions.io/v1

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Authentication

The #divisions API uses Bearer Token authentication. You can generate API keys from your dashboard settings.

HTTP Header
Authorization: Bearer your_api_key_here

Token Types

  • Read-only: Can fetch data but cannot modify resources
  • Admin: Full access to all endpoints and configurations
  • Service: For server-to-server integrations (expires after 24h)

Rate Limits

To ensure platform stability, API requests are rate-limited. Limits vary by subscription tier:

PlanRequests/MinBurst Limit
Starter60100
Professional1,0001,500
Enterprise10,00015,000

Rate limit headers are included in every response:

Response Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 942
X-RateLimit-Reset: 1698765432

Projects

GET /projects

Returns a paginated list of all projects associated with your account.

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by: active, archived, draft

Example Response

200 OK
{
  "data": [
    {
      "id": "proj_8x72k91",
      "name": "Analytics Dashboard v2",
      "status": "active",
      "created_at": "2024-11-15T08:30:00Z"
    }
  ],
  "meta": {
    "total": 42,
    "page": 1
  }
}
POST /projects

Creates a new project. Returns the project object upon success.

Request Body

application/json
{
  "name": "Mobile App Integration", // required
  "description": "Cross-platform sync module",
  "tier": "professional",
  "team_ids": ["team_123", "team_456"]
}

Analytics

GET /analytics/:project_id

Retrieves real-time and historical analytics for a specific project.

Path Parameters

ParameterTypeDescription
project_idstringThe unique identifier of the project

Example Response

200 OK
{
  "project_id": "proj_8x72k91",
  "period": "last_30_days",
  "metrics": {
    "requests_total": 142857,
    "avg_latency_ms": 42,
    "error_rate": 0.012,
    "uptime_percent": 99.98
  }
}

Workflows

PUT /workflows/:id

Updates an existing workflow configuration. Partial updates are supported.

DELETE /workflows/:id

Permanently deletes a workflow. This action cannot be undone.

Error Codes

#divisions uses standard HTTP status codes to indicate success or failure of requests.

CodeMeaningDescription
400Bad RequestYour request is invalid or missing required parameters.
401UnauthorizedMissing or invalid API key.
403ForbiddenYour API key lacks permission for this action.
404Not FoundThe requested resource does not exist.
429Too Many RequestsRate limit exceeded. Wait before retrying.
500Internal ErrorSomething went wrong on our end.
Error Response Format
{
  "error": {
    "code": "invalid_request",
    "message": "Missing required field: name",
    "status": 400
  }
}

SDKs & Libraries

Official client libraries are available for popular languages. Community-maintained packages are also listed.

npm install
npm install @divisions/sdk
pip install
pip install divisions-python