Description
This endpoint authenticates the user and returns a token for authorizing API requests.
Endpoint
POST https://yourdomain.pharmahrm.com/crm-api/login
Request
Headers
None required
Body parameters
{
"username": "crm_api_user",
"password": "123pass123"
}
| Parameter | Type | Description |
|---|---|---|
| username | string | Always use the value “crm_api_user” |
| password | string | Provided by technical support |
Response
Success: 200 OK
{
"token": "64ba27622c7fea8b3c1b45b2950e907ae562fb65f8d1ac6be4",
"expires_at": "2025-08-06T10:05:24+00:00"
}| Field | Type | Description |
|---|---|---|
| token | string | Authentication token for subsequent API requests |
| expires_at | string | Token expiration timestamp (valid for 1 day) |
Use the token in the Authorization header for all authenticated endpoints.
Error: 4xx or 5xx
{
"message": "string"
}| Field | Type | Description |
|---|---|---|
| message | string | Error message describing the issue |