API Reference

Complete API endpoint reference with request/response examples for the Perfex CRM SaaS Module REST API.

This is the complete reference for all available API endpoints.

Authentication

All endpoints require the Authorization header:

Authorization: Bearer YOUR_API_TOKEN

Response Format

All responses follow this structure:

{
  "success": true,
  "data": { ... },
  "message": "Description of the result"
}

Error responses:

{
  "success": false,
  "error": "Error description",
  "code": 400
}

Tenants

List All Tenants

Parameters:

Parameter
Type
Required
Description

page

integer

No

Page number for pagination

per_page

integer

No

Results per page (default: 25, max: 100)

status

string

No

Filter by status: active, inactive, trial

Example Response:

Get Single Tenant

Example Response:

Create Tenant

Body Parameters:

Parameter
Type
Required
Description

company_name

string

Yes

Company name

email

string

Yes

Primary contact email

first_name

string

Yes

Contact first name

last_name

string

Yes

Contact last name

plan_id

integer

Yes

The plan to assign

subdomain

string

Yes

Desired subdomain/slug

password

string

No

Account password (auto-generated if omitted)

Example:

Update Tenant

Body Parameters:

Parameter
Type
Required
Description

company_name

string

No

Updated company name

plan_id

integer

No

New plan to assign

status

string

No

active or inactive

Delete Tenant

triangle-exclamation

Plans

List All Plans

Example Response:

Get Single Plan

Create Plan

Update Plan

Delete Plan


Subscriptions

Get Tenant Subscription

Example Response:

Update Subscription

Body Parameters:

Parameter
Type
Required
Description

plan_id

integer

No

New plan ID

expires_at

datetime

No

New expiration date


Usage

Get Tenant Usage

Example Response:


HTTP Status Codes

Code
Meaning

200

Success

201

Created successfully

400

Bad request β€” check your parameters

401

Unauthorized β€” invalid or missing API token

404

Not found β€” the resource doesn't exist

422

Validation error β€” one or more fields are invalid

429

Rate limit exceeded β€” slow down your requests

500

Server error β€” contact support if this persists


Need Help?

If you have questions about the API or need additional endpoints, contact us through our Support & Community channels.

Last updated