API Documentation

Developer Documentation

Everything you need to integrate Gclap into your application. RESTful API, webhooks, and comprehensive guides.

Quick Start

1Get Your API Key

Sign up and create an API key from your dashboard. Each key can have specific scopes and permissions.

Dashboard → Settings → API Keys → Create New Key

2Send Your First Email

Use our REST API to send transactional emails. Here's a simple example:

Python
import requests

response = requests.post(
    'http://localhost:8000/api/v1/emails/send/',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'to': 'user@example.com',
        'subject': 'Welcome to Gclap!',
        'html': '<h1>Hello!</h1><p>Thanks for joining.</p>',
        'from_email': 'hello@yourdomain.com'
    }
)

print(response.json())

3Track Events

Monitor opens, clicks, bounces, and more through our analytics API or webhook events.

API Features

Comprehensive APIs for email delivery, analytics, automation, and more.

Email Sending

Send transactional and marketing emails via REST API or SMTP

/api/v1/emails/send/

Analytics

Track opens, clicks, bounces, and engagement metrics

/api/v1/analytics/dashboard/

Contact Management

Manage contacts, lists, and segments programmatically

/api/v1/contacts/

Automation

Create and manage email workflows and triggers

/api/v1/automation/

Webhooks

Real-time event notifications for email activities

/api/v1/webhooks/endpoints/

API Keys

Secure key management with scopes and rotation

/api/v1/accounts/api-keys/

Alerts

Configure alerts for metrics and anomalies

/api/v1/analytics/alert-configs/

Scheduled Reports

Automated email reports on custom schedules

/api/v1/analytics/scheduled-reports/

Deliverability

Monitor sender reputation and inbox placement

/api/v1/deliverability/score/

Core API Endpoints

POST
/api/v1/emails/send/

Send Email

Send a single transactional or marketing email

Parameters

tostringrequired

Recipient email address

subjectstringrequired

Email subject line

htmlstring

HTML email body

textstring

Plain text email body

from_emailstring

Sender email address

GET
/api/v1/analytics/dashboard/

Dashboard Stats

Get overview statistics for your account

Parameters

daysinteger

Number of days to include (default: 30)

GET
/api/v1/contacts/

List Contacts

Retrieve all contacts in your organization

Parameters

pageinteger

Page number for pagination

searchstring

Search by email or name

listuuid

Filter by list ID

POST
/api/v1/webhooks/endpoints/

Create Webhook

Register a webhook endpoint for event notifications

Parameters

urlstringrequired

Webhook URL to receive events

eventsarrayrequired

Event types to subscribe to

descriptionstring

Webhook description

POST
/api/v1/accounts/api-keys/

Create API Key

Generate a new API key with specific permissions

Parameters

namestringrequired

Key name for identification

scopesarray

Permission scopes (default: all)

expires_atdatetime

Expiration date

Authentication

API Key Authentication

All API requests require authentication using your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Security: Never expose your API keys in client-side code or public repositories. Use environment variables and keep keys secure.

Webhook Events

Receive real-time notifications when email events occur. Configure webhook endpoints to get instant updates.

email.sent

Email was successfully sent to the recipient

email.delivered

Email was delivered to recipient's inbox

email.opened

Recipient opened the email

email.clicked

Recipient clicked a link in the email

email.bounced

Email bounced (hard or soft bounce)

email.unsubscribed

Recipient unsubscribed from emails

email.spam

Email was marked as spam

campaign.completed

Campaign finished sending to all recipients

Rate Limits & Quotas

API Rate Limits

  • Free: 100 requests/minute
  • Pro: 1,000 requests/minute
  • Business: 5,000 requests/minute

Email Quotas

  • Free: 1,000 emails/month
  • Pro: 50,000 emails/month
  • Business: 200,000 emails/month

Need Help?

Our team is here to help you get started and answer any questions.