> For the complete documentation index, see [llms.txt](https://docs.globalalerting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.globalalerting.com/web-api/mt-messages.md).

# MT Messages

## GET /V2/{tenantVarCode}/devices/{deviceId}/mtmessages

> Returns a list of mobile terminated messages for the device> \
> This endpoint returns paged results of up to 1,000 records per response, using the X-CONTINUATIONTOKEN header.> \
> When the response includes this token, it indicates that additional records are available. To retrieve the next set of results,> \
> include the X-CONTINUATIONTOKEN token from the previous response header in the header of your subsequent request.> \
> This process can be repeated until no further continuation token is provided, indicating that you have reached the end of the dataset.

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"MT Messages"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/mtmessages":{"get":{"tags":["MT Messages"],"summary":"Returns a list of mobile terminated messages for the device\r\nThis endpoint returns paged results of up to 1,000 records per response, using the X-CONTINUATIONTOKEN header.\r\nWhen the response includes this token, it indicates that additional records are available. To retrieve the next set of results,\r\ninclude the X-CONTINUATIONTOKEN token from the previous response header in the header of your subsequent request.\r\nThis process can be repeated until no further continuation token is provided, indicating that you have reached the end of the dataset.","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","description":"From Date","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"To Date","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"application/json;IEEE754Compatible=false":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"application/json;IEEE754Compatible=true":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"application/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"application/octet-stream":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"text/xml":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}},"text/csv":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MtMessage"}}}}}}}}},"components":{"schemas":{"MtMessage":{"required":["MessageType","SenderAddress"],"type":"object","properties":{"MessageId":{"type":"string","description":"A unique numeric identifier for the message (read only)","nullable":true},"Attachment":{"type":"string","description":"A Base64 encoded byte array representing the binary attachment send to the device","format":"byte","nullable":true},"Message":{"type":"string","description":"A string representing the message text","nullable":true},"MessageType":{"minLength":1,"type":"string","description":"A string representing the message type. Currently supported message types are: FreeText, PositionRequest, ChangeSettings, CheckInRequest"},"SenderAddress":{"minLength":1,"type":"string","description":"The email address of the sender"},"TimeSent":{"type":"string","description":"A date and time that the platform sent the message","format":"date-time"},"Properties":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with additional message properties","nullable":true}},"additionalProperties":false}}}}
```

## POST /V2/{tenantVarCode}/devices/{deviceId}/mtmessages

> Enqueues a new mobile terminated messages that should be delivered to the device

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"MT Messages"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/mtmessages":{"post":{"tags":["MT Messages"],"summary":"Enqueues a new mobile terminated messages that should be delivered to the device","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"MT Message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/xml":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"text/plain":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"text/json":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"text/xml":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/*+xml":{"schema":{"$ref":"#/components/schemas/MtMessage"}}}},"responses":{"200":{"description":"OK"}}}}},"components":{"schemas":{"MtMessage":{"required":["MessageType","SenderAddress"],"type":"object","properties":{"MessageId":{"type":"string","description":"A unique numeric identifier for the message (read only)","nullable":true},"Attachment":{"type":"string","description":"A Base64 encoded byte array representing the binary attachment send to the device","format":"byte","nullable":true},"Message":{"type":"string","description":"A string representing the message text","nullable":true},"MessageType":{"minLength":1,"type":"string","description":"A string representing the message type. Currently supported message types are: FreeText, PositionRequest, ChangeSettings, CheckInRequest"},"SenderAddress":{"minLength":1,"type":"string","description":"The email address of the sender"},"TimeSent":{"type":"string","description":"A date and time that the platform sent the message","format":"date-time"},"Properties":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with additional message properties","nullable":true}},"additionalProperties":false}}}}
```

## GET /V2/{tenantVarCode}/devices/{deviceId}/mtmessages/{messageId}

>

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"MT Messages"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/mtmessages/{messageId}":{"get":{"tags":["MT Messages"],"operationId":"GetMtMessage","parameters":[{"name":"tenantVarCode","in":"path","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/json;IEEE754Compatible=false":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/json;IEEE754Compatible=true":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/xml":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"text/plain":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"application/octet-stream":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"text/json":{"schema":{"$ref":"#/components/schemas/MtMessage"}},"text/xml":{"schema":{"$ref":"#/components/schemas/MtMessage"}}}}}}}},"components":{"schemas":{"MtMessage":{"required":["MessageType","SenderAddress"],"type":"object","properties":{"MessageId":{"type":"string","description":"A unique numeric identifier for the message (read only)","nullable":true},"Attachment":{"type":"string","description":"A Base64 encoded byte array representing the binary attachment send to the device","format":"byte","nullable":true},"Message":{"type":"string","description":"A string representing the message text","nullable":true},"MessageType":{"minLength":1,"type":"string","description":"A string representing the message type. Currently supported message types are: FreeText, PositionRequest, ChangeSettings, CheckInRequest"},"SenderAddress":{"minLength":1,"type":"string","description":"The email address of the sender"},"TimeSent":{"type":"string","description":"A date and time that the platform sent the message","format":"date-time"},"Properties":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"A dictionary with additional message properties","nullable":true}},"additionalProperties":false}}}}
```

## DELETE /V2/{tenantVarCode}/devices/{deviceId}/mtmessages/{messageId}

> Deletes a specific mt message

```json
{"openapi":"3.0.4","info":{"title":"GAP REST API Documentation V2","version":"v2"},"tags":[{"name":"MT Messages"}],"paths":{"/V2/{tenantVarCode}/devices/{deviceId}/mtmessages/{messageId}":{"delete":{"tags":["MT Messages"],"summary":"Deletes a specific mt message","parameters":[{"name":"tenantVarCode","in":"path","description":"Tenant Var Code","required":true,"schema":{"type":"string"}},{"name":"deviceId","in":"path","description":"Device Id","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","description":"Id of message to delete","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}}}}
```
