ממשקי API
CRM API Documentation
These endpoints let your own systems read and update customers in your MindCRM:
| Endpoint | Method | What it does |
|---|---|---|
get_data.php |
GET | Read customer fields, last status, last call and last note. |
set_data.php |
GET or POST | Update customer fields, and optionally the status. |
set_status.php |
GET or POST | Set or clear a customer's status. |
clear_status.php |
GET or POST | Clear a customer's status (same as set_status.php with status_id=0).
|
Base address: https://<your-crm>.mindc.co/api/ (replace <your-crm> with your CRM's address, for example yourcompany).
Every response is JSON with the same shape: code (0 = success), status (success / fail) and message.
Authentication (API keys)
Every request must include your key in the authkey parameter.
- Each CRM has its own keys. A key of one CRM does not work on any other CRM.
- There is one key per endpoint, plus one master key that works on all of them:
| Key | Works on |
|---|---|
| get_data key | get_data.php
|
| set_data key | set_data.php, set_status.php, clear_status.php
|
| set_status key | set_status.php, clear_status.php
|
| master key | all of the above |
- To get your keys, contact MindCRM support.
- Keep the keys secret, like a password. Give each system only the key it needs, and the master key only to systems you fully trust. If a key may have leaked, contact support.
- The old shared key that appeared on this page is being retired. If your systems still use it, switch them to your CRM's own keys.
In the examples below, <YOUR_GET_DATA_KEY>, <YOUR_SET_DATA_KEY> and <YOUR_SET_STATUS_KEY> stand for your keys.
Finding the customer
All endpoints need to know which customer to work on. Send one of these:
Option A: by repository assign ID
| Parameter | Type | Description |
|---|---|---|
repository_assign_id |
integer | The customer's assignment ID. In get_data.php you can send several, comma-separated (102,103).
|
Option B: by phone number
| Parameter | Type | Required | Description |
|---|---|---|---|
phone |
string | ✅ | The customer's phone, exactly as it is saved in the CRM: Israeli format, digits only, with the leading 0 (0501234567). +972501234567 or 501234567 will not be found.
|
did |
string | ✅* | The DID (line number) the call came in on. Limits the search to that line's project. |
project_id |
integer | ✅* | Project ID. |
worker_id |
integer | ✅* | Worker ID. Limits the search to that worker's projects. |
group_id |
integer | ❌ | Optional extra filter. |
repository_id |
integer | ❌ | Optional extra filter. |
site_id |
integer | ❌ | Optional extra filter. |
✅* Send phone and at least one of did, project_id, worker_id.
If the phone matches several customers, get_data.php returns all of them; set_data.php and set_status.php update the first match only. When you know the repository_assign_id, prefer Option A.
Errors when finding the customer (all endpoints)
| Code | Message | Meaning |
|---|---|---|
| 3 | Missing phone_number parameter | No repository_assign_id and no phone.
|
| 4 | Missing project_id or worker_id or did input parameters | phone was sent without did, project_id or worker_id.
|
| 5 | Worker not found | The worker_id does not exist.
|
| 6 | No matching customer found | No customer with this phone in the given context. |
| 6 | The did does not exist or there are no phone fields in a project | The did is unknown, or the project has no phone fields.
|
get_data.php: read customer data
Method: GET
Parameters
| Parameter | Required | Description |
|---|---|---|
authkey |
✅ | Your get_data key (or the master key). |
out |
✅ | Comma-separated list of the fields to return, for example out=first_name,last_status,last_call.
|
repository_assign_id or phone + context |
✅ | See Finding the customer. |
Fields you can ask for in out
- Any customer field, by its field name in the CRM (for example
first_name,email). Unknown names are ignored. - And these special fields:
| Field | Description |
|---|---|
last_status |
Name of the customer's current status. |
last_call |
Date and time of the most recent call. |
last_notes |
Text of the most recent note. |
repository_id |
ID of the repository (list) the customer is in. |
repository_name |
Name of that repository. |
repository_assign_id |
The customer's assignment ID. |
uid (the customer ID) is always returned.
Examples
By repository assign ID
GET https://<your-crm>.mindc.co/api/get_data.php?authkey=<YOUR_GET_DATA_KEY>&out=first_name,last_status,last_call&repository_assign_id=102,103
{
"code": 0,
"status": "success",
"message": [
{ "uid": 5001, "first_name": "John", "last_status": "Interested", "last_call": "2026-10-15 14:30:00" },
{ "uid": 5002, "first_name": "Jane", "last_status": "Callback", "last_call": "2026-10-16 09:15:00" }
]
}
By phone and project
GET https://<your-crm>.mindc.co/api/get_data.php?authkey=<YOUR_GET_DATA_KEY>&out=email,repository_name,last_notes&phone=0501234567&project_id=5
{
"code": 0,
"status": "success",
"message": [
{ "uid": 5003, "email": "customer@example.com", "repository_name": "Main Leads", "last_notes": "Asked to call back tomorrow." }
]
}
A failed request
{ "code": 1, "status": "fail", "message": "Missing authkey or invalid value" }
Error codes
| Code | Message |
|---|---|
| 1 | Missing authkey or invalid value |
| 2 | Missing out parameter |
| 3 - 6 | See Errors when finding the customer |
| 7 | Database error (the message has the details) |
set_data.php: update customer fields
Method: GET or POST (application/x-www-form-urlencoded).
Parameters
| Parameter | Required | Description |
|---|---|---|
authkey |
✅ | Your set_data key (or the master key). |
repository_assign_id or phone + context |
✅ | See Finding the customer. |
| any customer field | ⚠️ | The field's name in the CRM and its new value, for example first_name=Jane. Underscores also match spaces (last_contacted = last contacted).
|
status_id |
⚠️ | Also set this status (same as set_status.php).
|
worker_id |
❌ | The worker to record as the one who made the change. |
⚠️ Send at least one customer field or status_id.
Date and time keywords
Instead of a value, a field can get one of these keywords. The server replaces it with the current date and time when the request runs (the keyword itself is never saved; not case-sensitive, spaces around it are ignored):
| Keyword | Becomes | Example |
|---|---|---|
now() |
YYYY-MM-DD HH:MM:SS |
2026-08-11 14:32:07
|
today() |
YYYY-MM-DD |
2026-08-11
|
time() |
HH:MM:SS |
14:32:07
|
- All keywords in one request get the same moment, so a date field set to
today()and a time field set totime()match. - They work only on customer fields, not on
phone,did,project_id,worker_id,group_id,site_idorstatus_id. - There is no way to save the literal text
now(),today()ortime().
Examples
Update fields by repository assign ID (POST)
POST https://<your-crm>.mindc.co/api/set_data.php Content-Type: application/x-www-form-urlencoded authkey=<YOUR_SET_DATA_KEY>&repository_assign_id=555&first_name=Jane&email=jane@example.com&last_contacted=now()
{ "code": 0, "status": "success", "message": "first_name was updated to 'Jane', email was updated to 'jane@example.com', last_contacted was updated to '2026-10-11 14:32:07'" }
Status only, by phone and DID
GET https://<your-crm>.mindc.co/api/set_data.php?authkey=<YOUR_SET_DATA_KEY>&phone=0501234567&did=035551234&status_id=10
{ "code": 0, "status": "success", "message": "status was updated to '10'" }
Fields and status together, recorded as a worker
POST https://<your-crm>.mindc.co/api/set_data.php authkey=<YOUR_SET_DATA_KEY>&repository_assign_id=555&city=Haifa&status_id=2&worker_id=99
Fields saved but the status failed (still code 0; check errors):
{ "code": 0, "status": "success", "message": "city was updated to 'Haifa'", "errors": { "status": "Failed to set status" } }
Error codes
| Code | Message |
|---|---|
| 1 | Missing auth key or invalid value |
| 2 | No fields found for update in the request |
| 3 - 6 | See Errors when finding the customer |
| 7 | Incorrect repository_assign_id |
| 8 | Could not find customer fields for requested fields (none of the field names exist) |
| 9 | The given value already exists in other customer (a unique field, such as a phone, is taken) |
| 10 | Error on update, or the status could not be set (when only status_id was sent)
|
set_status.php and clear_status.php: set or clear a status
Method: GET or POST.
Parameters
| Parameter | Required | Description |
|---|---|---|
authkey |
✅ | Your set_status key, your set_data key, or the master key. |
repository_assign_id or phone + context |
✅ | See Finding the customer. |
status_id |
✅ | The status to set. 0 clears the status. Not needed in clear_status.php.
|
reason |
❌ | When clearing: the reason to record. |
worker_id |
❌ | The worker to record as the one who made the change. |
The status is set with the status's rules, the same as when a worker sets it in the CRM.
Examples
Set a status
GET https://<your-crm>.mindc.co/api/set_status.php?authkey=<YOUR_SET_STATUS_KEY>&repository_assign_id=555&status_id=10
Clear a status
POST https://<your-crm>.mindc.co/api/clear_status.php authkey=<YOUR_SET_STATUS_KEY>&repository_assign_id=555&reason=Handled by phone
Success
{ "code": 0, "status": "success", "message": "Status set successfully" }
Error codes
| Code | Message |
|---|---|
| 1 | Missing auth key or invalid value |
| 3 - 6 | See Errors when finding the customer |
| 7 | Incorrect repository_assign_id |
| 8 | Missing status_id parameter |
| 9 | The status could not be set (the message gives the reason, for example a status rule that blocked it) |