Getting Started
Authentication
How to create an API key and use it for API access
All CRM API requests require authentication via API key. The key identifies your agency and determines which data you can access.
Create an API Key
- Log in to rentix.md (or staging.rentix.md for testing)
- Open User Menu → [Agency Name] → API Keys
- Click Create Key
- Copy the key — it's shown only once
Keep your key secure. Anyone with the key can manage your agency's listings. Don't commit keys to git and don't share with third parties.
Use the Key in Requests
Pass the key in the Authorization header of every request.
const response = await fetch('https://crm.rentix.md/api/v1/agency', {
headers: {
'Authorization': 'ApiKey YOUR_API_KEY'
}
});
const agency = await response.json();
console.log(agency.name); // "Your Agency"
curl https://crm.rentix.md/api/v1/agency \
-H "Authorization: ApiKey YOUR_API_KEY"
$ch = curl_init('https://crm.rentix.md/api/v1/agency');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: ApiKey YOUR_API_KEY'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$agency = json_decode($response, true);
echo $agency['name']; // "Your Agency"
Alternative Header
Instead of Authorization, you can use X-API-Key:
curl https://crm.rentix.md/api/v1/agency \
-H "X-API-Key: YOUR_API_KEY"
Verify Connection
A request to /agency is a simple way to confirm your key works.
Successful Response
{
"id": 1,
"name": "Your Agency",
"status": "active",
"isCrmEnabled": true,
"limits": {
"monthlyListings": { "used": 5, "limit": 1000 }
}
}
Authentication Errors
| Code | Error | Solution |
|---|---|---|
| 400 | Multiple authentication methods provided | Use either Authorization or X-API-Key, not both |
| 401 | API key is required | Add Authorization: ApiKey YOUR_KEY header |
| 401 | Invalid API key | Check that the API key is correct and has not been revoked |
| 403 | Agency is suspended | Contact support — your agency account is suspended |
| 403 | CRM is not enabled for this agency | Contact support to enable CRM access |
Next Step
Key is ready — create your first listing.