API v1 — REST / JSON

Mewayz Developer Hub

Build on top of Mewayz with our REST API. Manage contacts, send invoices, pull reports, and automate workflows — all programmatically.

🔑 Authentication

All API requests use Bearer token authentication. Generate your API key from Settings › API Keys in your Mewayz dashboard.

# Include in every request header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json

Starter

Rate limit: 1,000 req/hr

Pro

Rate limit: 5,000 req/hr

Enterprise

Rate limit: Custom limits

Common Endpoints

GET /api/contacts

List all contacts. Supports ?search=, ?page=, ?limit=

POST /api/contacts

Create a new contact. Body: { name, email, phone, company }

GET /api/contacts/{id}

Get a single contact by ID

PUT /api/contacts/{id}

Update a contact

DELETE /api/contacts/{id}

Delete a contact

GET /api/invoices

List invoices. Supports ?status=paid|unpaid|overdue, ?page=

POST /api/invoices

Create invoice. Body: { contact_id, items[], due_date, currency }

GET /api/invoices/{id}

Get a single invoice

POST /api/invoices/{id}/send

Send invoice to client by email

GET /api/reports/revenue

Revenue summary. Supports ?from=&to= (ISO 8601 dates)

GET /api/reports/contacts

Contact growth metrics

GET /api/reports/invoices

Invoice and payment analytics

Webhooks

Configure webhook endpoints in Settings › Webhooks. Mewayz sends signed POST requests for real-time events. All payloads are signed with HMAC-SHA256 using your webhook secret.

invoice.paid
invoice.overdue
contact.created
deal.won
deal.lost
payment.failed
subscription.cancelled
task.completed

Code Examples


// PHP — List contacts using cURL
$apiKey = 'YOUR_API_KEY';
$ch = curl_init('https://app.mewayz.com/api/contacts?page=1&limit=25');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => [
        "Authorization: Bearer {$apiKey}",
        'Accept: application/json',
    ],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

// Create an invoice
$ch2 = curl_init('https://app.mewayz.com/api/invoices');
curl_setopt_array($ch2, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode([
        'contact_id' => 42,
        'currency'   => 'USD',
        'due_date'   => '2026-04-01',
        'items'      => [[
            'name'  => 'Consulting',
            'qty'   => 1,
            'price' => 1500,
        ]],
    ]),
    CURLOPT_HTTPHEADER     => [
        "Authorization: Bearer {$apiKey}",
        'Content-Type: application/json',
        'Accept: application/json',
    ],
]);
$invoice = json_decode(curl_exec($ch2), true);

Frequently Asked Questions

Log into your Mewayz account, go to Settings > API Keys, and click "Generate New Key". Your API key is a Bearer token used in the Authorization header of every request.
The Mewayz API uses Bearer token authentication. Include your API key in the Authorization header: "Authorization: Bearer YOUR_API_KEY". All requests must be made over HTTPS.
Rate limits depend on your plan: Starter: 1,000 req/hr, Pro: 5,000 req/hr, Enterprise: custom. Rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset) are returned with every response.
Yes. Configure webhook endpoints in Settings > Webhooks. Mewayz sends POST requests for events like invoice.paid, contact.created, and deal.won. All payloads are signed with HMAC-SHA256.
All responses are JSON with UTF-8 encoding. Successful responses return HTTP 200/201 with a "data" key. Errors return HTTP 400/401/403/404/422/429/500 with an "error" key.

Ready to start building?

Get your free API key today. All plans include API access. No credit card required to start.