# Messages

Send and retrieve WhatsApp messages and conversation history.

## send wa message

> Send a free-form WhatsApp message to a contact. Only available within the 24-hour customer service window.

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Messages","description":"Send and retrieve WhatsApp messages and conversation history."}],"servers":[{"url":"https://api.cekat.ai","description":"Production server"},{"url":"http://localhost:3000","description":"Local development server"}],"security":[{"CekatApiKey":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"Your Cekat API key. Obtain this by calling `POST /register` or from your Cekat dashboard under Settings → API."}}},"paths":{"/messages/whatsapp":{"post":{"summary":"send wa message","tags":["Messages"],"operationId":"Messages_send_wa_message","description":"Send a free-form WhatsApp message to a contact. Only available within the 24-hour customer service window.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"conversation_id":{"type":"string","description":"UUID of the conversation to retrieve messages from."},"receiver":{"type":"string","description":"The receiver value."},"message":{"type":"string","description":"Message content to send."},"media_type":{"type":"string","description":"The media type value."},"location":{"type":"object","properties":{"latitude":{"type":"string"},"longitude":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"}},"description":"The location value."},"header":{"type":"object","properties":{},"description":"The header value."},"action":{"type":"object","properties":{"name":{"type":"string"},"parameters":{"type":"object","properties":{"display_text":{"type":"string"},"url":{"type":"string"}}}},"description":"The action value."}}}}}},"responses":{"200":{"description":"Successful response"},"400":{"description":"Bad request — check required fields and formats."},"401":{"description":"Unauthorized — API key is missing or invalid."},"404":{"description":"Resource not found."}}}}}}
```

## get messages

> Retrieve all messages in a specific conversation.

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Messages","description":"Send and retrieve WhatsApp messages and conversation history."}],"servers":[{"url":"https://api.cekat.ai","description":"Production server"},{"url":"http://localhost:3000","description":"Local development server"}],"security":[{"CekatApiKey":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"Your Cekat API key. Obtain this by calling `POST /register` or from your Cekat dashboard under Settings → API."}}},"paths":{"/messages":{"get":{"summary":"get messages","tags":["Messages"],"operationId":"Messages_get_messages","description":"Retrieve all messages in a specific conversation.","parameters":[{"name":"conversation_id","in":"query","required":false,"description":"UUID of the conversation to retrieve messages from.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"},"400":{"description":"Bad request — check required fields and formats."},"401":{"description":"Unauthorized — API key is missing or invalid."},"404":{"description":"Resource not found."}}}}}}
```
