Skip to main content

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

ParameterTypeRequiredDescription
idIntegerYesUnique ID of the contact to retrieve

Example Requests

1import requests
2response = requests.get('http://www.example.com/api/contacts/1', headers={
3  'Authorization': 'Token <your_api_key>'
4})
5
6print(response.json())

Response Fields

FieldTypeDescription
idIntegerUnique ID of the contact.
first_nameStringThe first name of the contact (nullable).
last_nameStringThe last name of the contact (nullable).
emailStringThe email address of the contact (nullable).
mobile_numberStringMobile number associated with the contact (nullable, valid iranian mobile number).
subjectStringThe subject of the contact.
messageStringThe message content of the contact (nullable).
viewedBooleanWhether the contact has been viewed.
viewed_atString (ISO 8601)Timestamp when the contact was viewed(nullable).
created_atString (ISO 8601)Timestamp when the contact was created.
updated_atString (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"
}