Quick Start Guide
Follow these steps to make your first API call.
Get Your API Token
Log in to your HomaCRM portal as Main Admin. Go to Settings > API Token and click Generate Token. Copy and save your token securely.
Test Your Connection
Make a request to verify your token is working:
curl -X GET "https://www.HomaCRM.com/api/v1/external/auth/verify" \
-H "Authorization: a1B2c3D4e5F6g7H8-i9J0k1L2m3N4o5P6-q7R8s9T0u1V2w3X4" \
-H "Accept: application/json"
Send Your First Message
Send an SMS message to test the messaging API:
curl -X POST "https://www.HomaCRM.com/api/v1/external/messaging/send" \
-H "Authorization: a1B2c3D4e5F6g7H8-i9J0k1L2m3N4o5P6-q7R8s9T0u1V2w3X4" \
-H "Content-Type: application/json" \
-d '{
"recipient": "09123456789",
"message": "سلام، سفارش شما ثبت شد. کد پیگیری: 987654",
"senderId": 42,
"serverType": 1
}'
Check the Response
A successful response looks like this:
{
"success": true,
"data": {
"messageId": 184920315,
"recipient": "09123456789",
"status": "queued",
"deliveryCode": 0,
"creditUsed": 1
},
"meta": {
"requestId": "req_abc123xyz"
}
}