API & Webhook Documentation

Integrate SheetMania into your applications with our comprehensive API

Getting Started

The SheetMania API allows you to programmatically create, manage, and monitor your automations. Our RESTful API uses standard HTTP methods and returns JSON responses.

Base URL: https://api.sheetmania.com/v1

Quick Start

  1. 1.Get your API key from your account settings
  2. 2.Include the key in the Authorization header of your requests
  3. 3.Start making API calls to automate your workflows

API Endpoints

Authentication

All API requests require authentication using an API key in the Authorization header.

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.sheetmania.com/v1/automations

List Automations

Retrieve a list of all automations for your account.

GET /v1/automations

{
  "automations": [
    {
      "id": "auto_123",
      "name": "Daily Report",
      "status": "active",
      "created_at": "2024-01-05T10:30:00Z"
    }
  ]
}

Create Automation

Create a new automation with triggers and actions.

POST /v1/automations

{
  "name": "Daily Report",
  "trigger": {
    "type": "schedule",
    "schedule": "daily_9am"
  },
  "actions": [
    {
      "type": "send_email",
      "recipients": ["admin@company.com"]
    }
  ]
}

Webhook Event

Webhooks are sent to your configured endpoint when events occur.

POST https://your-webhook-endpoint.com/webhooks

{
  "event_type": "automation.executed",
  "automation_id": "auto_123",
  "execution_id": "exec_456",
  "status": "success",
  "timestamp": "2024-01-05T10:30:00Z",
  "data": {
    "rows_processed": 150,
    "duration_ms": 2341
  }
}

Error Handling

The API returns standard HTTP status codes and detailed error information.

{
  "error": {
    "code": "invalid_trigger",
    "message": "The specified trigger configuration is invalid",
    "details": {
      "field": "trigger.schedule",
      "reason": "Invalid cron expression"
    }
  }
}

Webhook Events

Webhooks allow your application to receive real-time notifications when events occur in SheetMania. Set up webhook endpoints in your account settings.

automation.created

Fired when a new automation is created

automation.updated

Fired when an automation configuration changes

automation.executed

Fired when an automation runs successfully

automation.failed

Fired when an automation encounters an error

automation.deleted

Fired when an automation is deleted

HTTP Status Codes

200

OK

Request succeeded

201

Created

Resource created successfully

400

Bad Request

Invalid request parameters

401

Unauthorized

Invalid or missing API key

404

Not Found

Resource not found

429

Rate Limited

Too many requests

500

Server Error

Internal server error

503

Service Unavailable

Service temporarily unavailable

Ready to Build?

Get your API key and start integrating SheetMania into your applications today.