Modulynk API Documentation

Welcome to the Modulynk API! This API allows you to interact with your Modulynk data, including services, custom fields, and bookings.

Authentication

To use the API, you need to include an API key in the X-API-Key header of your requests.

You can generate and manage your API keys in the Modulynk settings page under "API Keys".

API Version

The current version of the API is v1. All API endpoints are prefixed with /api/v1.

Endpoints

Services

Get all services

curl -X GET https://api.modulynk.app/api/v1/services \
      -H "X-API-Key: YOUR_API_KEY"
[
      {
        "id": 1,
        "name": "Haircut",
        "description": "A standard haircut.",
        "price": 50,
        "duration": 30,
        "hasVariants": false,
        "variants": [],
        "userId": 1,
        "createdAt": "2025-09-13T00:00:00.000Z",
        "updatedAt": "2025-09-13T00:00:00.000Z"
      }
    ]

Custom Fields

Get all custom field templates

curl -X GET https://api.modulynk.app/api/v1/custom-fields \
      -H "X-API-Key: YOUR_API_KEY"
[
      {
        "id": 1,
        "title": "Car Make/Model",
        "userId": 1,
        "createdAt": "2025-09-13T00:00:00.000Z",
        "updatedAt": "2025-09-13T00:00:00.000Z"
      }
    ]

Bookings

Create a booking

{
      "serviceId": 1,
      "startTime": "2025-10-01T10:00:00.000Z",
      "endTime": "2025-10-01T10:30:00.000Z",
      "price": 50,
      "status": "confirmed",
      "clientId": 1,
      "description": "Headlight Restoration, Leather Treatment",
      "customFields": [
        {
          "title": "CAR MAKE/MODEL",
          "value": "Toyota Camry"
        }
      ]
    }
curl -X POST https://api.modulynk.app/api/v1/bookings \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{ 
        "serviceId": 1,
        "startTime": "2025-10-01T10:00:00.000Z",
        "endTime": "2025-10-01T10:30:00.000Z",
        "price": 50,
        "status": "confirmed",
        "clientId": 1,
        "customFields": [
          {
            "title": "CAR MAKE/MODEL",
            "value": "Toyota Camry"
          }
        ]
      }'
{
      "id": 1,
      "serviceId": 1,
      "startTime": "2025-10-01T10:00:00.000Z",
      "endTime": "2025-10-01T10:30:00.000Z",
      "price": 50,
      "status": "confirmed",
      "clientId": 1,
      "customFields": {
        "1": "Toyota Camry"
      },
      "userId": 1,
      "serviceName": "Haircut",
      "createdAt": "2025-09-13T00:00:00.000Z",
      "updatedAt": "2025-09-13T00:00:00.000Z"
    }

Clients

Find a client by phone number

curl -X GET "https://api.modulynk.app/api/v1/clients?phone=1234567890" \
-H "X-API-Key: YOUR_API_KEY"
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"userId": 1,
"createdAt": "2025-09-15T00:00:00.000Z",
"updatedAt": "2025-09-15T00:00:00.000Z"
}
404 Not Found

Create a client

{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890"
}
curl -X POST https://api.modulynk.app/api/v1/clients \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ 
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890"
}'
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"userId": 1,
"createdAt": "2025-09-15T00:00:00.000Z",
"updatedAt": "2025-09-15T00:00:00.000Z"
}

AI Agent

Chat with the AI Agent

{
      "message": "Hello, I would like to book an appointment."
    }
curl -X POST https://api.modulynk.app/api/v1/agent/chat \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"message": "Hello, I would like to book an appointment."}'
{
      "response": "Of course! What service are you interested in?"
    }

SMS

Send an SMS

{
      "phone": "+1234567890",
      "message": "Hello from the API!"
    }
curl -X POST https://api.modulynk.app/api/v1/sms/send \
      -H "X-API-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"phone": "+1234567890", "message": "Hello from the API!"}'
{
      "success": true,
      "message": "SMS sent successfully."
    }