MENU navbar-image

Introduction

Powerful WhatsApp Business API for sending messages, managing contacts, and automating conversations.

Welcome to the SamparkPro WhatsApp API documentation. This API allows you to integrate WhatsApp Business messaging into your applications.

Features

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer YOUR_API_TOKEN".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can generate API tokens by logging into your vendor dashboard at /console/api-tokens. Include the token in the Authorization header as a Bearer token.

CRM

Manage customer relationships programmatically. This group of APIs allows you to create and track contacts, deals, tasks, and retrieve pipeline stages. All endpoints in this group may require an active CRM Pro subscription.

Contacts

List all Contacts

requires authentication

Get a paginated list of CRM contacts belonging to your account.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/crm/contacts?search=architecto&per_page=16" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/contacts"
);

const params = {
    "search": "architecto",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/contacts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search' => 'architecto',
            'per_page' => '16',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/contacts'
params = {
  'search': 'architecto',
  'per_page': '16',
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "success": true,
    "message": "Contacts retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "John Doe",
            "phone": "+1234567890",
            "country_code": "US",
            "email": "john@example.com",
            "source": "api",
            "status": "active",
            "lead_score": 50,
            "company_id": null,
            "custom_attributes": null,
            "tags": [
                {
                    "id": 5,
                    "name": "Hot Lead",
                    "color": "danger"
                }
            ]
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 1
    }
}
 

Request      

GET api/v1/crm/contacts

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

search   string  optional    

Optional search term to filter contacts by name, email, or phone. Example: architecto

per_page   integer  optional    

Optional number of results per page (default: 15). Example: 16

Get Contact

requires authentication

Retrieve detailed information for a specific contact.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/crm/contacts/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/contacts/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/contacts/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/contacts/architecto'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Contact retrieved successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "phone": "+1234567890",
        "country_code": "US",
        "email": "john@example.com",
        "source": "api",
        "status": "active",
        "lead_score": 50,
        "company_id": null,
        "custom_attributes": null,
        "tags": []
    }
}
 

Request      

GET api/v1/crm/contacts/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the contact. Example: architecto

Create Contact

requires authentication

Create a new contact in your CRM. Validates plans limits and parses formatting automatically.

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/crm/contacts" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Jane Doe\",
    \"country_code\": \"US\",
    \"phone\": \"+1234567890\",
    \"email\": \"jane@example.com\",
    \"source\": \"api\",
    \"tags\": [
        1,
        2
    ],
    \"custom_attributes\": {
        \"custom_field\": \"value\"
    },
    \"company_id\": 3,
    \"lead_score\": 75
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/contacts"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Jane Doe",
    "country_code": "US",
    "phone": "+1234567890",
    "email": "jane@example.com",
    "source": "api",
    "tags": [
        1,
        2
    ],
    "custom_attributes": {
        "custom_field": "value"
    },
    "company_id": 3,
    "lead_score": 75
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/contacts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Jane Doe',
            'country_code' => 'US',
            'phone' => '+1234567890',
            'email' => 'jane@example.com',
            'source' => 'api',
            'tags' => [
                1,
                2,
            ],
            'custom_attributes' => [
                'custom_field' => 'value',
            ],
            'company_id' => 3,
            'lead_score' => 75,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/contacts'
payload = {
    "name": "Jane Doe",
    "country_code": "US",
    "phone": "+1234567890",
    "email": "jane@example.com",
    "source": "api",
    "tags": [
        1,
        2
    ],
    "custom_attributes": {
        "custom_field": "value"
    },
    "company_id": 3,
    "lead_score": 75
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
    "success": true,
    "message": "Contact created successfully",
    "data": {
        "id": 2,
        "name": "Jane Doe",
        "phone": "+1234567890",
        "country_code": "US",
        "email": "jane@example.com",
        "source": "api",
        "status": "active",
        "lead_score": 75,
        "company_id": 3
    }
}
 

Request      

POST api/v1/crm/contacts

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The name of the contact. Example: Jane Doe

country_code   string  optional    

The country code (ISO 3166-1 alpha-2) of the phone. Example: US

phone   string     

The contact phone number. Example: +1234567890

email   string  optional    

The email address. Example: jane@example.com

source   string  optional    

The source of the contact. Example: api

tags   string[]  optional    

List of tag IDs to attach to the contact.

custom_attributes   object  optional    

Key-value pair of custom contact attributes.

company_id   integer  optional    

The associated company ID. Example: 3

lead_score   integer  optional    

The lead score (0-100). Example: 75

Update Contact

requires authentication

Update an existing contact's details.

Example request:
curl --request PUT \
    "https://www.samparkpro.com/api/v1/crm/contacts/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Jane Smith\",
    \"country_code\": \"US\",
    \"phone\": \"+1234567890\",
    \"email\": \"jane.smith@example.com\",
    \"company_id\": 3,
    \"lead_score\": 90,
    \"tags\": [
        1
    ],
    \"custom_attributes\": {
        \"custom_field\": \"new value\"
    }
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/contacts/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Jane Smith",
    "country_code": "US",
    "phone": "+1234567890",
    "email": "jane.smith@example.com",
    "company_id": 3,
    "lead_score": 90,
    "tags": [
        1
    ],
    "custom_attributes": {
        "custom_field": "new value"
    }
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/contacts/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Jane Smith',
            'country_code' => 'US',
            'phone' => '+1234567890',
            'email' => 'jane.smith@example.com',
            'company_id' => 3,
            'lead_score' => 90,
            'tags' => [
                1,
            ],
            'custom_attributes' => [
                'custom_field' => 'new value',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/contacts/architecto'
payload = {
    "name": "Jane Smith",
    "country_code": "US",
    "phone": "+1234567890",
    "email": "jane.smith@example.com",
    "company_id": 3,
    "lead_score": 90,
    "tags": [
        1
    ],
    "custom_attributes": {
        "custom_field": "new value"
    }
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "success": true,
    "message": "Contact updated successfully",
    "data": {
        "id": 2,
        "name": "Jane Smith",
        "phone": "+1234567890",
        "country_code": "US",
        "email": "jane.smith@example.com",
        "status": "active"
    }
}
 

Request      

PUT api/v1/crm/contacts/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the contact. Example: architecto

Body Parameters

name   string  optional    

The name of the contact. Example: Jane Smith

country_code   string  optional    

The country code (ISO 3166-1 alpha-2) of the phone. Example: US

phone   string  optional    

The contact phone number. Example: +1234567890

email   string  optional    

The email address. Example: jane.smith@example.com

company_id   integer  optional    

The associated company ID. Example: 3

lead_score   integer  optional    

The lead score (0-100). Example: 90

tags   string[]  optional    

List of tag IDs to attach to the contact.

custom_attributes   object  optional    

Key-value pair of custom contact attributes.

Delete Contact

requires authentication

Delete a contact from the CRM.

Example request:
curl --request DELETE \
    "https://www.samparkpro.com/api/v1/crm/contacts/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/contacts/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/contacts/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/contacts/architecto'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Contact deleted successfully"
}
 

Request      

DELETE api/v1/crm/contacts/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the contact. Example: architecto

Deals

List all Deals

requires authentication

Get a paginated list of CRM deals.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/crm/deals?stage_id=1&contact_id=5&company_id=3&status=active&per_page=16" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/deals"
);

const params = {
    "stage_id": "1",
    "contact_id": "5",
    "company_id": "3",
    "status": "active",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/deals';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'stage_id' => '1',
            'contact_id' => '5',
            'company_id' => '3',
            'status' => 'active',
            'per_page' => '16',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/deals'
params = {
  'stage_id': '1',
  'contact_id': '5',
  'company_id': '3',
  'status': 'active',
  'per_page': '16',
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "success": true,
    "message": "Deals retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "Enterprise Deal",
            "value": "15000.00",
            "currency": "INR",
            "status": "active",
            "closing_date": "2026-07-15",
            "stage_id": 2,
            "contact_id": 5,
            "company_id": 3,
            "assigned_to": 1
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 1
    }
}
 

Request      

GET api/v1/crm/deals

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

stage_id   integer  optional    

Filter by pipeline stage ID. Example: 1

contact_id   integer  optional    

Filter by contact ID. Example: 5

company_id   integer  optional    

Filter by company ID. Example: 3

status   string  optional    

Filter by status (active, won, lost). Example: active

per_page   integer  optional    

Optional number of results per page (default: 15). Example: 16

Get Deal

requires authentication

Retrieve detailed information for a specific deal.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/crm/deals/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/deals/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/deals/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/deals/architecto'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Deal retrieved successfully",
    "data": {
        "id": 1,
        "title": "Enterprise Deal",
        "value": "15000.00",
        "currency": "INR",
        "status": "active",
        "closing_date": "2026-07-15",
        "stage_id": 2,
        "contact_id": 5,
        "company_id": 3,
        "assigned_to": 1
    }
}
 

Request      

GET api/v1/crm/deals/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the deal. Example: architecto

Create Deal

requires authentication

Create a new deal in the CRM pipeline.

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/crm/deals" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Enterprise Deal\",
    \"value\": 15000,
    \"stage_id\": 1,
    \"contact_id\": 5,
    \"company_id\": 3,
    \"closing_date\": \"2026-07-15\",
    \"assigned_to\": 1
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/deals"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Enterprise Deal",
    "value": 15000,
    "stage_id": 1,
    "contact_id": 5,
    "company_id": 3,
    "closing_date": "2026-07-15",
    "assigned_to": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/deals';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'Enterprise Deal',
            'value' => 15000.0,
            'stage_id' => 1,
            'contact_id' => 5,
            'company_id' => 3,
            'closing_date' => '2026-07-15',
            'assigned_to' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/deals'
payload = {
    "title": "Enterprise Deal",
    "value": 15000,
    "stage_id": 1,
    "contact_id": 5,
    "company_id": 3,
    "closing_date": "2026-07-15",
    "assigned_to": 1
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
    "success": true,
    "message": "Deal created successfully",
    "data": {
        "id": 1,
        "title": "Enterprise Deal",
        "value": "15000.00",
        "currency": "INR",
        "status": "active",
        "closing_date": "2026-07-15",
        "stage_id": 2,
        "contact_id": 5,
        "company_id": 3,
        "assigned_to": 1
    }
}
 

Request      

POST api/v1/crm/deals

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

The title of the deal. Example: Enterprise Deal

value   number     

The monetary value of the deal. Example: 15000

stage_id   integer     

The stage ID of the pipeline. Example: 1

contact_id   integer  optional    

The contact ID associated. Example: 5

company_id   integer  optional    

The company ID associated. Example: 3

closing_date   string  optional    

The estimated closing date. Example: 2026-07-15

assigned_to   integer  optional    

The vendor/agent ID assigned to this deal. Example: 1

Update Deal

requires authentication

Update an existing deal's details.

Example request:
curl --request PUT \
    "https://www.samparkpro.com/api/v1/crm/deals/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Enterprise Deal Phase 2\",
    \"value\": 20000,
    \"stage_id\": 2,
    \"contact_id\": 5,
    \"company_id\": 3,
    \"closing_date\": \"2026-08-30\",
    \"assigned_to\": 1,
    \"status\": \"won\"
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/deals/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Enterprise Deal Phase 2",
    "value": 20000,
    "stage_id": 2,
    "contact_id": 5,
    "company_id": 3,
    "closing_date": "2026-08-30",
    "assigned_to": 1,
    "status": "won"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/deals/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'Enterprise Deal Phase 2',
            'value' => 20000.0,
            'stage_id' => 2,
            'contact_id' => 5,
            'company_id' => 3,
            'closing_date' => '2026-08-30',
            'assigned_to' => 1,
            'status' => 'won',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/deals/architecto'
payload = {
    "title": "Enterprise Deal Phase 2",
    "value": 20000,
    "stage_id": 2,
    "contact_id": 5,
    "company_id": 3,
    "closing_date": "2026-08-30",
    "assigned_to": 1,
    "status": "won"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "success": true,
    "message": "Deal updated successfully",
    "data": {
        "id": 1,
        "title": "Enterprise Deal Phase 2",
        "value": "20000.00",
        "currency": "INR",
        "status": "won",
        "closing_date": "2026-08-30"
    }
}
 

Request      

PUT api/v1/crm/deals/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the deal. Example: architecto

Body Parameters

title   string  optional    

The title of the deal. Example: Enterprise Deal Phase 2

value   number  optional    

The monetary value of the deal. Example: 20000

stage_id   integer  optional    

The stage ID of the pipeline. Example: 2

contact_id   integer  optional    

The contact ID associated. Example: 5

company_id   integer  optional    

The company ID associated. Example: 3

closing_date   string  optional    

The estimated closing date. Example: 2026-08-30

assigned_to   integer  optional    

The vendor/agent ID assigned. Example: 1

status   string  optional    

The status of the deal (active, won, lost). Example: won

Delete Deal

requires authentication

Delete a deal from the CRM pipeline.

Example request:
curl --request DELETE \
    "https://www.samparkpro.com/api/v1/crm/deals/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/deals/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/deals/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/deals/architecto'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Deal deleted successfully"
}
 

Request      

DELETE api/v1/crm/deals/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the deal. Example: architecto

Stages

List all CRM Stages

requires authentication

Get all CRM stages configured in your account. Useful to get the correct stage ID for deal operations.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/crm/stages" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/stages"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/stages';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/stages'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "CRM stages retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "Lead",
            "color": "#1abc9c",
            "probability": 10,
            "sort_order": 1,
            "is_won": false,
            "is_lost": false
        }
    ]
}
 

Request      

GET api/v1/crm/stages

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Tasks

List all Tasks

requires authentication

Get a paginated list of CRM tasks.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/crm/tasks?status=pending&priority=high&contact_id=5&deal_id=1&per_page=16" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/tasks"
);

const params = {
    "status": "pending",
    "priority": "high",
    "contact_id": "5",
    "deal_id": "1",
    "per_page": "16",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/tasks';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'status' => 'pending',
            'priority' => 'high',
            'contact_id' => '5',
            'deal_id' => '1',
            'per_page' => '16',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/tasks'
params = {
  'status': 'pending',
  'priority': 'high',
  'contact_id': '5',
  'deal_id': '1',
  'per_page': '16',
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "success": true,
    "message": "Tasks retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "Call Client",
            "description": "Follow up on enterprise proposal",
            "task_type": "call",
            "due_date": "2026-07-01",
            "due_time": "14:30",
            "status": "pending",
            "priority": "high",
            "contact_id": 5,
            "deal_id": 1,
            "assigned_to": 1
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 15,
        "total": 1
    }
}
 

Request      

GET api/v1/crm/tasks

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

status   string  optional    

Filter by status (pending, completed). Example: pending

priority   string  optional    

Filter by priority (low, medium, high). Example: high

contact_id   integer  optional    

Filter by contact ID. Example: 5

deal_id   integer  optional    

Filter by deal ID. Example: 1

per_page   integer  optional    

Optional number of results per page (default: 15). Example: 16

Get Task

requires authentication

Retrieve detailed information for a specific task.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/crm/tasks/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/tasks/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/tasks/architecto';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/tasks/architecto'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Task retrieved successfully",
    "data": {
        "id": 1,
        "title": "Call Client",
        "description": "Follow up on enterprise proposal",
        "task_type": "call",
        "due_date": "2026-07-01",
        "due_time": "14:30",
        "status": "pending",
        "priority": "high",
        "contact_id": 5,
        "deal_id": 1,
        "assigned_to": 1
    }
}
 

Request      

GET api/v1/crm/tasks/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the task. Example: architecto

Create Task

requires authentication

Create a new task.

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/crm/tasks" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Call Client\",
    \"description\": \"Follow up on enterprise proposal\",
    \"task_type\": \"call\",
    \"due_date\": \"2026-07-01\",
    \"due_time\": \"14:30\",
    \"priority\": \"high\",
    \"contact_id\": 5,
    \"deal_id\": 1,
    \"assigned_to\": 1
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/tasks"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Call Client",
    "description": "Follow up on enterprise proposal",
    "task_type": "call",
    "due_date": "2026-07-01",
    "due_time": "14:30",
    "priority": "high",
    "contact_id": 5,
    "deal_id": 1,
    "assigned_to": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/tasks';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'Call Client',
            'description' => 'Follow up on enterprise proposal',
            'task_type' => 'call',
            'due_date' => '2026-07-01',
            'due_time' => '14:30',
            'priority' => 'high',
            'contact_id' => 5,
            'deal_id' => 1,
            'assigned_to' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/tasks'
payload = {
    "title": "Call Client",
    "description": "Follow up on enterprise proposal",
    "task_type": "call",
    "due_date": "2026-07-01",
    "due_time": "14:30",
    "priority": "high",
    "contact_id": 5,
    "deal_id": 1,
    "assigned_to": 1
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
    "success": true,
    "message": "Task created successfully",
    "data": {
        "id": 1,
        "title": "Call Client",
        "description": "Follow up on enterprise proposal",
        "task_type": "call",
        "due_date": "2026-07-01",
        "due_time": "14:30",
        "status": "pending",
        "priority": "high",
        "contact_id": 5,
        "deal_id": 1,
        "assigned_to": 1
    }
}
 

Request      

POST api/v1/crm/tasks

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

title   string     

The title of the task. Example: Call Client

description   string  optional    

The description details. Example: Follow up on enterprise proposal

task_type   string     

Type of task (task, call, email, meeting, proposal). Example: call

due_date   string     

The due date. Example: 2026-07-01

due_time   string  optional    

The due time (24h format HH:MM). Example: 14:30

priority   string     

Priority of task (low, medium, high). Example: high

contact_id   integer  optional    

The contact ID associated. Example: 5

deal_id   integer  optional    

The deal ID associated. Example: 1

assigned_to   integer  optional    

The agent ID assigned to. Example: 1

Update Task

requires authentication

Update an existing task's details or toggle its status.

Example request:
curl --request PUT \
    "https://www.samparkpro.com/api/v1/crm/tasks/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Call Client Update\",
    \"description\": \"Follow up on enterprise proposal and pricing\",
    \"task_type\": \"meeting\",
    \"due_date\": \"2026-07-02\",
    \"due_time\": \"15:00\",
    \"priority\": \"high\",
    \"status\": \"completed\",
    \"contact_id\": 5,
    \"deal_id\": 1,
    \"assigned_to\": 1
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/tasks/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "Call Client Update",
    "description": "Follow up on enterprise proposal and pricing",
    "task_type": "meeting",
    "due_date": "2026-07-02",
    "due_time": "15:00",
    "priority": "high",
    "status": "completed",
    "contact_id": 5,
    "deal_id": 1,
    "assigned_to": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/tasks/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'Call Client Update',
            'description' => 'Follow up on enterprise proposal and pricing',
            'task_type' => 'meeting',
            'due_date' => '2026-07-02',
            'due_time' => '15:00',
            'priority' => 'high',
            'status' => 'completed',
            'contact_id' => 5,
            'deal_id' => 1,
            'assigned_to' => 1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/tasks/architecto'
payload = {
    "title": "Call Client Update",
    "description": "Follow up on enterprise proposal and pricing",
    "task_type": "meeting",
    "due_date": "2026-07-02",
    "due_time": "15:00",
    "priority": "high",
    "status": "completed",
    "contact_id": 5,
    "deal_id": 1,
    "assigned_to": 1
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "success": true,
    "message": "Task updated successfully",
    "data": {
        "id": 1,
        "title": "Call Client Update",
        "description": "Follow up on enterprise proposal and pricing",
        "status": "completed"
    }
}
 

Request      

PUT api/v1/crm/tasks/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the task. Example: architecto

Body Parameters

title   string  optional    

The title of the task. Example: Call Client Update

description   string  optional    

The description details. Example: Follow up on enterprise proposal and pricing

task_type   string  optional    

Type of task (task, call, email, meeting, proposal). Example: meeting

due_date   string  optional    

The due date. Example: 2026-07-02

due_time   string  optional    

The due time. Example: 15:00

priority   string  optional    

Priority of task (low, medium, high). Example: high

status   string  optional    

Status of task (pending, completed). Example: completed

contact_id   integer  optional    

The contact ID associated. Example: 5

deal_id   integer  optional    

The deal ID associated. Example: 1

assigned_to   integer  optional    

The agent ID assigned to. Example: 1

Delete Task

requires authentication

Delete a task from the CRM.

Example request:
curl --request DELETE \
    "https://www.samparkpro.com/api/v1/crm/tasks/architecto" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/crm/tasks/architecto"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/crm/tasks/architecto';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/crm/tasks/architecto'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Task deleted successfully"
}
 

Request      

DELETE api/v1/crm/tasks/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the task. Example: architecto

WhatsApp

Integrate with the WhatsApp Business API to retrieve accounts, manage templates, and send text/media messages. All endpoints in this group require an active WhatsApp API subscription.

Accounts

List all WhatsApp accounts

requires authentication

Get all WhatsApp Business Accounts connected to your vendor account.

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/whatsapp/accounts" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/whatsapp/accounts"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/whatsapp/accounts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/whatsapp/accounts'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "WhatsApp accounts retrieved successfully",
    "data": [
        {
            "id": 1,
            "display_phone_number": "+1234567890",
            "verified_name": "My Business",
            "nickname": "US Sales Number",
            "is_primary": true,
            "status": "active",
            "account_mode": "live"
        }
    ]
}
 

Request      

GET api/v1/whatsapp/accounts

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Messages

Send text message

requires authentication

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/whatsapp/messages/text" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"whatsapp_account_id\": 5,
    \"to\": \"+1234567890\",
    \"message\": \"Hello from SamparkPro!\",
    \"preview_url\": true
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/whatsapp/messages/text"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "message": "Hello from SamparkPro!",
    "preview_url": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/text';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'whatsapp_account_id' => 5,
            'to' => '+1234567890',
            'message' => 'Hello from SamparkPro!',
            'preview_url' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/text'
payload = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "message": "Hello from SamparkPro!",
    "preview_url": true
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/v1/whatsapp/messages/text

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

whatsapp_account_id   integer  optional    

Optional WhatsApp account ID to send from. Uses primary account if not provided. Example: 5

to   string     

Recipient phone number with country code. Example: +1234567890

message   string     

Message text (max 4096 chars). Example: Hello from SamparkPro!

preview_url   boolean  optional    

Optional Enable URL preview. Example: true

Send image message

requires authentication

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/whatsapp/messages/image" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"whatsapp_account_id\": 5,
    \"to\": \"+1234567890\",
    \"caption\": \"architecto\",
    \"image_url\": \"https:\\/\\/example.com\\/image.jpg\"
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/whatsapp/messages/image"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "architecto",
    "image_url": "https:\/\/example.com\/image.jpg"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/image';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'whatsapp_account_id' => 5,
            'to' => '+1234567890',
            'caption' => 'architecto',
            'image_url' => 'https://example.com/image.jpg',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/image'
payload = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "architecto",
    "image_url": "https:\/\/example.com\/image.jpg"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/v1/whatsapp/messages/image

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

whatsapp_account_id   integer  optional    

Optional WhatsApp account ID to send from. Example: 5

to   string     

Recipient phone number. Example: +1234567890

caption   string  optional    

Optional Image caption. Example: architecto

image_url   string     

Image URL. Example: https://example.com/image.jpg

Send audio message

requires authentication

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/whatsapp/messages/audio" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"whatsapp_account_id\": 5,
    \"to\": \"+1234567890\",
    \"caption\": \"Check out this image!\",
    \"audio_url\": \"https:\\/\\/example.com\\/audio.mp3\"
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/whatsapp/messages/audio"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "Check out this image!",
    "audio_url": "https:\/\/example.com\/audio.mp3"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/audio';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'whatsapp_account_id' => 5,
            'to' => '+1234567890',
            'caption' => 'Check out this image!',
            'audio_url' => 'https://example.com/audio.mp3',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/audio'
payload = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "Check out this image!",
    "audio_url": "https:\/\/example.com\/audio.mp3"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/v1/whatsapp/messages/audio

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

whatsapp_account_id   integer  optional    

Optional WhatsApp account ID to send from. Example: 5

to   string     

Recipient phone number. Example: +1234567890

caption   string  optional    

Optional caption for the media (max 1024 characters). Must not be greater than 1024 characters. Example: Check out this image!

audio_url   string     

Audio URL. Example: https://example.com/audio.mp3

Send video message

requires authentication

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/whatsapp/messages/video" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"whatsapp_account_id\": 5,
    \"to\": \"+1234567890\",
    \"caption\": \"architecto\",
    \"video_url\": \"https:\\/\\/example.com\\/video.mp4\"
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/whatsapp/messages/video"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "architecto",
    "video_url": "https:\/\/example.com\/video.mp4"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/video';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'whatsapp_account_id' => 5,
            'to' => '+1234567890',
            'caption' => 'architecto',
            'video_url' => 'https://example.com/video.mp4',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/video'
payload = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "architecto",
    "video_url": "https:\/\/example.com\/video.mp4"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/v1/whatsapp/messages/video

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

whatsapp_account_id   integer  optional    

Optional WhatsApp account ID to send from. Example: 5

to   string     

Recipient phone number. Example: +1234567890

caption   string  optional    

Optional Video caption. Example: architecto

video_url   string     

Video URL. Example: https://example.com/video.mp4

Send document message

requires authentication

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/whatsapp/messages/document" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"whatsapp_account_id\": 5,
    \"to\": \"+1234567890\",
    \"caption\": \"architecto\",
    \"document_url\": \"https:\\/\\/example.com\\/doc.pdf\",
    \"filename\": \"invoice.pdf\"
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/whatsapp/messages/document"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "architecto",
    "document_url": "https:\/\/example.com\/doc.pdf",
    "filename": "invoice.pdf"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/document';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'whatsapp_account_id' => 5,
            'to' => '+1234567890',
            'caption' => 'architecto',
            'document_url' => 'https://example.com/doc.pdf',
            'filename' => 'invoice.pdf',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/document'
payload = {
    "whatsapp_account_id": 5,
    "to": "+1234567890",
    "caption": "architecto",
    "document_url": "https:\/\/example.com\/doc.pdf",
    "filename": "invoice.pdf"
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Request      

POST api/v1/whatsapp/messages/document

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

whatsapp_account_id   integer  optional    

Optional WhatsApp account ID to send from. Example: 5

to   string     

Recipient phone number. Example: +1234567890

caption   string  optional    

Optional Document caption. Example: architecto

document_url   string     

Document URL. Example: https://example.com/doc.pdf

filename   string  optional    

Optional Document filename. Example: invoice.pdf

Send template message

requires authentication

Send a pre-approved WhatsApp message template with dynamic parameters.

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/whatsapp/messages/template" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"whatsapp_account_id\": 5,
    \"to\": \"+919876543210\",
    \"template_name\": \"welcome_message\",
    \"language\": \"en\",
    \"components\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/whatsapp/messages/template"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "whatsapp_account_id": 5,
    "to": "+919876543210",
    "template_name": "welcome_message",
    "language": "en",
    "components": [
        "architecto"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/template';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'whatsapp_account_id' => 5,
            'to' => '+919876543210',
            'template_name' => 'welcome_message',
            'language' => 'en',
            'components' => [
                'architecto',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/whatsapp/messages/template'
payload = {
    "whatsapp_account_id": 5,
    "to": "+919876543210",
    "template_name": "welcome_message",
    "language": "en",
    "components": [
        "architecto"
    ]
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
    "success": true,
    "message": "Template sent successfully",
    "data": {
        "id": 123,
        "type": "template",
        "template_name": "welcome_message",
        "status": "sent"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Failed to send template"
}
 

Request      

POST api/v1/whatsapp/messages/template

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

whatsapp_account_id   integer  optional    

Optional WhatsApp account ID to send from. Example: 5

to   string     

Recipient phone number in E.164 format. Example: +919876543210

template_name   string     

Approved template name. Example: welcome_message

language   string     

Template language code (ISO 639-1). Example: en

components   string[]  optional    

Optional Template components with dynamic values. See example below.

type   string     

Component type: header, body, or button. Example: body

parameters   string[]     

Array of parameter objects.

type   string     

Parameter type (text, currency, date_time, image, document, video). Example: text

text   string  optional    

Text value for text parameters. Example: John Doe

Webhooks

Manage webhook subscriptions for event notifications

List all webhooks

requires authentication

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/webhooks" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/webhooks"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/webhooks';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/webhooks'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Success",
    "data": [
        {
            "id": 1,
            "event_types": [
                "whatsapp.message.received",
                "whatsapp.message.sent"
            ],
            "account_filters": {
                "whatsapp": [
                    1
                ]
            },
            "url": "https://example.com/webhook",
            "is_active": true,
            "failure_count": 0,
            "last_triggered_at": "2026-06-30T12:00:00Z",
            "created_at": "2026-06-30T10:00:00Z"
        }
    ]
}
 

Request      

GET api/v1/webhooks

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Test webhook

requires authentication

Example request:
curl --request GET \
    --get "https://www.samparkpro.com/api/v1/webhooks/16" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/webhooks/16"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/webhooks/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/webhooks/16'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Test webhook sent",
    "data": {
        "status": "success",
        "http_status": 200
    }
}
 

Request      

GET api/v1/webhooks/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the webhook. Example: 16

Create webhook

requires authentication

Example request:
curl --request POST \
    "https://www.samparkpro.com/api/v1/webhooks" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"event_types\": [
        \"whatsapp.message.received\",
        \"whatsapp.message.sent\"
    ],
    \"url\": \"https:\\/\\/example.com\\/webhook\",
    \"secret_key\": \"architecto\",
    \"account_filters\": {
        \"whatsapp\": [
            1
        ]
    }
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/webhooks"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "event_types": [
        "whatsapp.message.received",
        "whatsapp.message.sent"
    ],
    "url": "https:\/\/example.com\/webhook",
    "secret_key": "architecto",
    "account_filters": {
        "whatsapp": [
            1
        ]
    }
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/webhooks';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'event_types' => [
                'whatsapp.message.received',
                'whatsapp.message.sent',
            ],
            'url' => 'https://example.com/webhook',
            'secret_key' => 'architecto',
            'account_filters' => [
                'whatsapp' => [
                    1,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/webhooks'
payload = {
    "event_types": [
        "whatsapp.message.received",
        "whatsapp.message.sent"
    ],
    "url": "https:\/\/example.com\/webhook",
    "secret_key": "architecto",
    "account_filters": {
        "whatsapp": [
            1
        ]
    }
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):


{
    "success": true,
    "message": "Webhook created successfully",
    "data": {
        "id": 1,
        "event_types": [
            "whatsapp.message.received",
            "whatsapp.message.sent"
        ],
        "account_filters": {
            "whatsapp": [
                1
            ]
        },
        "url": "https://example.com/webhook",
        "secret_key": "wh_secret_abc123...",
        "is_active": true
    }
}
 

Request      

POST api/v1/webhooks

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

event_types   string[]     

Events to subscribe to.

url   string     

Webhook URL. Example: https://example.com/webhook

secret_key   string  optional    

Optional Secret for HMAC signature. Auto-generated if not provided. Example: architecto

account_filters   object  optional    

Optional Account filters for subscribing services.

whatsapp   string[]  optional    

Optional Array of WhatsApp account IDs to filter by.

Update webhook

requires authentication

Example request:
curl --request PUT \
    "https://www.samparkpro.com/api/v1/webhooks/16" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"event_types\": [
        \"whatsapp.message.received\"
    ],
    \"url\": \"https:\\/\\/example.com\\/webhook\",
    \"account_filters\": {
        \"whatsapp\": [
            1
        ]
    },
    \"is_active\": true
}"
const url = new URL(
    "https://www.samparkpro.com/api/v1/webhooks/16"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "event_types": [
        "whatsapp.message.received"
    ],
    "url": "https:\/\/example.com\/webhook",
    "account_filters": {
        "whatsapp": [
            1
        ]
    },
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/webhooks/16';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'event_types' => [
                'whatsapp.message.received',
            ],
            'url' => 'https://example.com/webhook',
            'account_filters' => [
                'whatsapp' => [
                    1,
                ],
            ],
            'is_active' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/webhooks/16'
payload = {
    "event_types": [
        "whatsapp.message.received"
    ],
    "url": "https:\/\/example.com\/webhook",
    "account_filters": {
        "whatsapp": [
            1
        ]
    },
    "is_active": true
}
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "success": true,
    "message": "Webhook updated successfully",
    "data": {
        "id": 1,
        "event_types": [
            "whatsapp.message.received"
        ],
        "account_filters": {
            "whatsapp": [
                1
            ]
        },
        "url": "https://example.com/webhook",
        "is_active": true
    }
}
 

Request      

PUT api/v1/webhooks/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the webhook. Example: 16

Body Parameters

event_types   string[]  optional    

Optional Events to subscribe to.

url   string  optional    

Optional New webhook URL. Example: https://example.com/webhook

account_filters   object  optional    

Optional Account filters for subscribing services.

whatsapp   string[]  optional    

Optional Array of WhatsApp account IDs to filter by.

is_active   boolean  optional    

Optional Enable/disable webhook. Example: true

Delete webhook

requires authentication

Example request:
curl --request DELETE \
    "https://www.samparkpro.com/api/v1/webhooks/16" \
    --header "Authorization: Bearer YOUR_API_TOKEN" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://www.samparkpro.com/api/v1/webhooks/16"
);

const headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://www.samparkpro.com/api/v1/webhooks/16';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer YOUR_API_TOKEN',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://www.samparkpro.com/api/v1/webhooks/16'
headers = {
  'Authorization': 'Bearer YOUR_API_TOKEN',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (200):


{
    "success": true,
    "message": "Webhook deleted successfully",
    "data": null
}
 

Request      

DELETE api/v1/webhooks/{id}

Headers

Authorization        

Example: Bearer YOUR_API_TOKEN

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the webhook. Example: 16