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 or Admin
  • 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())

Status Codes

CodeDescription
200Contact retrieved successfully
400Bad request — invalid parameters
401Unauthorized — authentication required
404Not found — contact does not exist
403Forbidden — insufficient permissions
500Internal server error

Response Fields

FieldTypeDescription
idIntegerUnique ID of the contact.
subjectStringThe subject of the contact.
messageStringThe message content of the contact.
first_nameStringThe first name of the contact.
last_nameStringThe last name of the contact.
emailStringThe email address of the contact.
mobile_numberStringMobile number associated with the contact.
viewedBooleanWhether the contact has been viewed.
viewed_atString (ISO 8601)Timestamp when the contact was viewed.
created_atString (ISO 8601)Timestamp when the contact was created.
updated_atString (ISO 8601)Timestamp when the contact was last updated.