# Deeplinks

* Create Deeplink [#post-deeplinks](#post-deeplinks "mention")
* Create iMessage Deeplink [#post-deeplinks-imessage](#post-deeplinks-imessage "mention")

## Create Deeplink

> \*\*This feature is currently in closed beta\*\*. Please contact your MTA account rep or MTA support for more information.\
> \
> \### Request Body\
> \
> \- \`androidURI\`: The deeplink URI for Android.\
> \
> \- \`iosURI\`: The deeplink URI for iOS.\
> \
> \- \`macURI\`: The deeplink URI for Mac.\
> \
> \- \`windowsURI\`: The deeplink URI for Windows.\
> \
> \- \`defaultURI\`: The default deeplink URI.\
> \
> \
> \### Response\
> \
> Upon successful creation, the response will include the \`deeplinkUrl\`\
> \
> \#### Example\
> \
> Request:\
> \
> \`\`\` json\
> {\
> &#x20; "androidURI": "sms:+15555555555?body=Example",\
> &#x20; "iosURI": "imessage://imessage\@example.com?body=Example",\
> &#x20; "macURI": "<https://mobile-text-alerts.com/example",\\>
> &#x20; "windowsURI": "<https://mobile-text-alerts.com/example",\\>
> &#x20; "defaultURI": "<https://mobile-text-alerts.com/example"\\>
> }\
> \
> &#x20;\`\`\`\
> \
> Response:\
> \
> \`\`\` json\
> {\
> &#x20; "deeplinkUrl": "<https://platform.mobile-text-alerts.com/deeplinks/abc"\\>
> }\
> \
> &#x20;\`\`\`\
> \
> \
> undefined

````json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateDeeplink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"deeplinkUrl":{"type":"string"}},"required":["deeplinkUrl"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateDeeplink.Request":{"type":"object","properties":{"androidURI":{"type":"string"},"iosURI":{"type":"string"},"macURI":{"type":"string"},"windowsURI":{"type":"string"},"defaultURI":{"type":"string"}},"required":["androidURI","iosURI","macURI","windowsURI","defaultURI"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/deeplinks":{"post":{"tags":["Deeplinks"],"summary":"Create Deeplink","operationId":"deeplinks_create_deeplink","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeeplink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeeplink.Request"}}},"required":true},"description":"**This feature is currently in closed beta**. Please contact your MTA account rep or MTA support for more information.\n\n### Request Body\n\n- `androidURI`: The deeplink URI for Android.\n\n- `iosURI`: The deeplink URI for iOS.\n\n- `macURI`: The deeplink URI for Mac.\n\n- `windowsURI`: The deeplink URI for Windows.\n\n- `defaultURI`: The default deeplink URI.\n\n\n### Response\n\nUpon successful creation, the response will include the `deeplinkUrl`\n\n#### Example\n\nRequest:\n\n``` json\n{\n  \"androidURI\": \"sms:+15555555555?body=Example\",\n  \"iosURI\": \"imessage://imessage@example.com?body=Example\",\n  \"macURI\": \"https://mobile-text-alerts.com/example\",\n  \"windowsURI\": \"https://mobile-text-alerts.com/example\",\n  \"defaultURI\": \"https://mobile-text-alerts.com/example\"\n}\n\n ```\n\nResponse:\n\n``` json\n{\n  \"deeplinkUrl\": \"https://platform.mobile-text-alerts.com/deeplinks/abc\"\n}\n\n ```\n\n\nundefined"}}}}
````

## Create IMessage Deeplink

> \*\*This feature is currently in closed beta\*\*. Please contact your MTA account rep or MTA support for more information.\
> \
> \### Request Body\
> \
> \- \`longcodeId\`: The id of the longcode.\
> \
> \- \`optInMessage\`: The opt-in message used to populate the deeplink urls.\
> \
> \- \`senderName\`: The sender name used to pre-populate the "To:" field for iMessage\
> &#x20;   \- If this field is empty, the sender name associated with the longcode will be used as the default.\
> \
> \
> \### Response\
> \
> Upon successful creation, the response will include the \`deeplinkUrl\`\
> \
> \#### Example\
> \
> Request:\
> \
> \`\`\` json\
> {\
> &#x20; "longcodeId": 1337,\
> &#x20; "optInMessage": "Example",\
> &#x20; "senderName": "<example@i-msg.co>"\
> }\
> \
> &#x20;\`\`\`\
> \
> Response:\
> \
> \`\`\` json\
> {\
> &#x20; "deeplinkUrl": "<https://platform.mobile-text-alerts.com/deeplinks/abc"\\>
> }\
> \
> &#x20;\`\`\`\
> \
> \
> undefined

````json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateIMessageDeeplink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"deeplinkUrl":{"type":"string"}},"required":["deeplinkUrl"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateIMessageDeeplink.Request":{"type":"object","properties":{"longcodeId":{"type":"number"},"optInMessage":{"type":"string"},"senderName":{"type":"string"}},"required":["optInMessage"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/deeplinks/imessage":{"post":{"tags":["Deeplinks"],"summary":"Create IMessage Deeplink","operationId":"deeplinks_create_i_message_deeplink","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIMessageDeeplink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIMessageDeeplink.Request"}}},"required":true},"description":"**This feature is currently in closed beta**. Please contact your MTA account rep or MTA support for more information.\n\n### Request Body\n\n- `longcodeId`: The id of the longcode.\n\n- `optInMessage`: The opt-in message used to populate the deeplink urls.\n\n- `senderName`: The sender name used to pre-populate the \"To:\" field for iMessage\n    - If this field is empty, the sender name associated with the longcode will be used as the default.\n\n\n### Response\n\nUpon successful creation, the response will include the `deeplinkUrl`\n\n#### Example\n\nRequest:\n\n``` json\n{\n  \"longcodeId\": 1337,\n  \"optInMessage\": \"Example\",\n  \"senderName\": \"example@i-msg.co\"\n}\n\n ```\n\nResponse:\n\n``` json\n{\n  \"deeplinkUrl\": \"https://platform.mobile-text-alerts.com/deeplinks/abc\"\n}\n\n ```\n\n\nundefined"}}}}
````


---

# 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://developers.mobile-text-alerts.com/api-reference/deeplinks.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.
