Messages
2 endpoints in this family.
Get the layout of a received email
GET/api/v1/inbox/messages/{id}/html
Returns the cleaned HTML of an email, kept apart from the thread so listing messages stays light. A message with no kept layout returns 404.
Path parameters
idstringThe message id.
Response
`{ html }`, sanitised.
data.htmlstringSanitised HTML, without scripts.
curl https://coplace.io/api/v1/inbox/messages/<id>/html \ -H "Authorization: Bearer $COPLACE_KEY"{ "data": { "html": "…" }}Download the file attached to a message
GET/api/v1/inbox/messages/{id}/media
Returns the file itself. A WhatsApp file is read from the gateway that keeps it; once the gateway no longer has it, the route answers 410 media_expired.
Path parameters
idstringThe message id.
Query parameters
pieceintegerFor an email with attachments, which one (0-based).
Response
The file, with its content type.
curl https://coplace.io/api/v1/inbox/messages/<id>/media \ -H "Authorization: Bearer $COPLACE_KEY"Returns the file itself, not wrapped: its type is in Content-Type.