API Overview

The REST API lets you programmatically manage tenants, plans, and subscriptions. Build custom integrations and automations.

The Perfex CRM SaaS Module includes a REST API that allows you to manage your SaaS platform programmatically. This is useful for:

  • Custom signup pages β€” Build your own registration flow

  • Third-party integrations β€” Connect with external tools (Zapier, Integromat, custom apps)

  • Billing automation β€” Sync with external billing systems

  • Monitoring β€” Build custom dashboards and monitoring tools

  • Mobile apps β€” Create mobile management interfaces

Getting Started with the API

Step 1: Enable the API

  1. Go to SaaS Management β†’ SuperAdmin Settings

  2. Click the API Settings tab

  3. Toggle the API ON

  4. Generate an API token

Step 2: Authentication

All API requests require authentication via a Bearer token in the request header:

Authorization: Bearer YOUR_API_TOKEN_HERE

Step 3: Base URL

Your API base URL is:

Replace yoursite.com with your actual domain.


Quick Example

Here's a quick example of creating a tenant via the API:

Response:


API Capabilities

Endpoint Group
What You Can Do

Tenants

Create, read, update, delete tenants

Plans

List, create, update plans

Subscriptions

Manage tenant subscriptions

Usage

Query tenant usage and quotas

For the complete list of endpoints, see the API Reference.


Rate Limiting

The API implements rate limiting to protect your server:

  • 100 requests per minute per API token

  • Rate limit headers are included in every response

If you exceed the rate limit, you'll receive a 429 Too Many Requests response.


Best Practices

  1. Keep your API token secret β€” Never expose it in client-side code or public repositories

  2. Use HTTPS β€” Always make API requests over HTTPS

  3. Handle errors gracefully β€” Check response status codes and handle errors appropriately

  4. Cache when possible β€” Don't query the same data repeatedly; cache responses when they don't change often

circle-info

Need a custom integration? If the API doesn't cover your use case, contact us through support. We're constantly expanding the API based on customer feedback.

API Referencechevron-right

Last updated