Retrieve Contact
Retrieve a specific contact by its unique ID.
HTTP Request
GET/api/contacts/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff with ContactPermission or Admin
- Permission Code: 4002
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | Integer | Yes | Unique ID of the contact to retrieve |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2response = requests.get('http://www.example.com/api/contacts/1', headers={
3 'Authorization': 'Token <your_api_key>'
4})
5
6print(response.json())1curl -X GET "http://www.example.com/api/contacts/1" -H "Authorization: Token <your_api_key>"Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique ID of the contact. |
| first_name | String | The first name of the contact (nullable). |
| last_name | String | The last name of the contact (nullable). |
| String | The email address of the contact (nullable). | |
| mobile_number | String | Mobile number associated with the contact (nullable, valid iranian mobile number). |
| subject | String | The subject of the contact. |
| message | String | The message content of the contact (nullable). |
| viewed | Boolean | Whether the contact has been viewed. |
| viewed_at | String (ISO 8601) | Timestamp when the contact was viewed(nullable). |
| created_at | String (ISO 8601) | Timestamp when the contact was created. |
| updated_at | String (ISO 8601) | Timestamp when the contact was last updated. |
Example Response
{
"id": 17,
"first_name": "تورج",
"last_name": "دانشور",
"email": "Tyree82@hotmail.com",
"mobile_number": "09232362073",
"subject": "Internal",
"message": "Sed ex quae quas occaecati porro. Pariatur doloremque quia assumenda et sunt autem aut fugiat consectetur. Aspernatur quasi sit. Voluptas sunt asperiores.",
"viewed": true,
"viewed_at": "2025-12-28T13:48:53.666969Z",
"created_at": "2025-12-28T13:47:13.666977Z",
"updated_at": "2025-12-28T13:47:13.666983Z"
}