> For the complete documentation index, see [llms.txt](https://docs.justpush.io/introduction/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.justpush.io/introduction/dev-tools/api-reference/messages.md).

# Messages

### Create a message

> Create a message to the queue, ready to be processed

```json
{"openapi":"3.0.2","info":{"title":"JustPush","version":"1.0.0"},"servers":[{"url":"https://api.justpush.io"}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"Token"}},"schemas":{"Message":{"type":"object","properties":{"topic":{"description":"The topic title. Slugified, and created on the fly if it does not exist yet.","type":"string"},"topic_token":{"description":"The topic api_token. Takes precedence over `topic` when both are supplied.","type":"string"},"title":{"type":"string","maxLength":255},"message":{"type":"string"},"sound":{"description":"Case-insensitive: \"SIREN\" and \"siren\" are equivalent.","enum":["none","default","bike","bugle","cashregister","classical","cosmic","falling","gamelan","incoming","intermission","magic","mechanical","pianobar","siren","spacealarm","tugboat","alien","climb","persistent","echo","updown","vibrate"],"type":"string"},"priority":{"enum":[2,1,0,-1,-2],"type":"integer"},"expiry_ttl":{"type":"integer","maximum":2147483647,"minimum":0},"requires_acknowledgement":{"type":"boolean"},"acknowledgement":{"type":"object","properties":{"requires_retry":{"type":"boolean"},"max_retries":{"type":"integer","maximum":255,"minimum":0},"interval":{"type":"integer","maximum":65535,"minimum":10},"callback":{"type":"object","properties":{"required":{"type":"boolean"},"url":{"type":"string"},"params":{"description":"JSON Formatted Params","type":"string"}}}}},"buttons":{"type":"array","items":{"type":"object","properties":{"cta":{"type":"string","maxLength":25},"url":{"type":"string"},"action_required":{"type":"boolean"}}},"maxItems":10},"button_groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":150},"cta":{"type":"string","maxLength":25},"action_required":{"type":"boolean"},"buttons":{"type":"array","items":{"type":"object","properties":{"cta":{"type":"string","maxLength":25},"url":{"type":"string"}}},"maxItems":10}}},"maxItems":4},"images":{"type":"array","items":{"type":"object","properties":{"caption":{"default":"A simple Caption","type":"string","maxLength":255},"url":{"default":"https://picsum.photos/200/300","type":"string"},"body":{"description":"A base64 representation of the image","type":"string"}}},"maxItems":10}}},"MessageCreateError":{"type":"object","properties":{"status":{"format":"boolean","type":"boolean"},"message":{"format":"string","type":"string"}}}}},"paths":{"/messages":{"post":{"tags":["Messages"],"summary":"Create a message","description":"Create a message to the queue, ready to be processed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"responses":{"default":{"description":"Message Create Body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreateError"}}}}},"security":[{"BearerToken":[]}]}}}}
```

### Get a message

> Get a message based on the Key provided when the message got created

```json
{"openapi":"3.0.2","info":{"title":"JustPush","version":"1.0.0"},"servers":[{"url":"https://api.justpush.io"}],"security":[{"BearerToken":[]}],"components":{"securitySchemes":{"BearerToken":{"type":"http","scheme":"bearer","bearerFormat":"Token"}},"schemas":{"Message":{"type":"object","properties":{"topic":{"description":"The topic title. Slugified, and created on the fly if it does not exist yet.","type":"string"},"topic_token":{"description":"The topic api_token. Takes precedence over `topic` when both are supplied.","type":"string"},"title":{"type":"string","maxLength":255},"message":{"type":"string"},"sound":{"description":"Case-insensitive: \"SIREN\" and \"siren\" are equivalent.","enum":["none","default","bike","bugle","cashregister","classical","cosmic","falling","gamelan","incoming","intermission","magic","mechanical","pianobar","siren","spacealarm","tugboat","alien","climb","persistent","echo","updown","vibrate"],"type":"string"},"priority":{"enum":[2,1,0,-1,-2],"type":"integer"},"expiry_ttl":{"type":"integer","maximum":2147483647,"minimum":0},"requires_acknowledgement":{"type":"boolean"},"acknowledgement":{"type":"object","properties":{"requires_retry":{"type":"boolean"},"max_retries":{"type":"integer","maximum":255,"minimum":0},"interval":{"type":"integer","maximum":65535,"minimum":10},"callback":{"type":"object","properties":{"required":{"type":"boolean"},"url":{"type":"string"},"params":{"description":"JSON Formatted Params","type":"string"}}}}},"buttons":{"type":"array","items":{"type":"object","properties":{"cta":{"type":"string","maxLength":25},"url":{"type":"string"},"action_required":{"type":"boolean"}}},"maxItems":10},"button_groups":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":150},"cta":{"type":"string","maxLength":25},"action_required":{"type":"boolean"},"buttons":{"type":"array","items":{"type":"object","properties":{"cta":{"type":"string","maxLength":25},"url":{"type":"string"}}},"maxItems":10}}},"maxItems":4},"images":{"type":"array","items":{"type":"object","properties":{"caption":{"default":"A simple Caption","type":"string","maxLength":255},"url":{"default":"https://picsum.photos/200/300","type":"string"},"body":{"description":"A base64 representation of the image","type":"string"}}},"maxItems":10}}}}},"paths":{"/messages/{messageKey}":{"get":{"tags":["Messages"],"summary":"Get a message","description":"Get a message based on the Key provided when the message got created.","parameters":[{"name":"messageKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"Message Get Body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}},"security":[{"BearerToken":[]}]}}}}
```

***

## Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.justpush.io/introduction/dev-tools/api-reference/messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
