Get Contact Messages

This endpoint retrieves a list of messages associated with a specific contact.

Required Parameter:

  • contactId: The unique identifier of the contact whose messages you want to retrieve (sent in the URL path).
  • apiKey: Your unique API key for authentication.


Response:

Upon successful execution, the endpoint returns a JSON response containing:

  • success: A boolean indicating the success of the operation.
    • true: Messages retrieved successfully.
    • false: An error occurred while retrieving messages.
  • data: (Optional: present only on success) An array of objects representing the retrieved messages. The structure of these objects depends on your specific implementation, but they may contain properties like sender, recipient, timestamp, message content, etc. (refer to your API documentation for details).

Error Handling:

The endpoint will return appropriate error responses in the following cases:

  • Missing Parameter: If the contactId parameter is missing, a 400 Bad Request error is returned.
  • Invalid API Key: If the provided API key is invalid, a 401 Unauthorized error is returned.
  • Contact Not Found: If the specified contactId does not match an existing contact, a 404 Not Found error is returned.
  • Internal Server Error: If an error occurs during message retrieval, a 500 Internal Server Error is returned.

Language
Credentials
Query
Click Try It! to start a request and see the response here!