Saltar al contenido principal
GET
/
v1
/
messages
/
{messageId}
curl -X GET "https://api.contactship.ai/v1/messages/msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "x-api-key: your-api-key"
{
  "id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "role": "human",
  "type": "text",
  "content": "Hello! How can I help you today?",
  "media": null,
  "from": "+12025551234",
  "source": "webapp",
  "status": "sent",
  "sender_id": null,
  "created_at": "2026-04-06T15:00:00Z"
}
Returns the details of a specific message in a conversation thread.

Headers

x-api-key
string
requerido
Your API key for authentication.

Path Parameters

messageId
string
requerido
The UUID of the message to retrieve.

Response

id
string
Unique identifier of the message (UUID).
thread_id
string
UUID of the thread this message belongs to.
role
string
Sender role: human (sent by a user or agent) or assistant (sent by AI).
type
string
Message type: text, image, video, audio, document, template, location.
content
string
Text content of the message.
media
object
Media attachment details, present for non-text message types.
from
string
The sender’s identifier (phone number or display value).
source
string
How the message was sent: webapp, ai_agent, or whatsapp (inbound).
status
string
Delivery status: pending, sent, delivered, read, failed.
sender_id
string
UUID of the user who sent the message. null for AI-generated or API key messages.
created_at
string
Timestamp when the message was created (ISO 8601).

Error Codes

  • 401 Unauthorized — Invalid or missing API key
  • 404 Not Found — Message not found or does not belong to your organization
  • 500 Internal Server Error — Server-side error

Code Examples

curl -X GET "https://api.contactship.ai/v1/messages/msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "x-api-key: your-api-key"
{
  "id": "msg-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "thread_id": "thr-b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "role": "human",
  "type": "text",
  "content": "Hello! How can I help you today?",
  "media": null,
  "from": "+12025551234",
  "source": "webapp",
  "status": "sent",
  "sender_id": null,
  "created_at": "2026-04-06T15:00:00Z"
}