API Method DirectMessageSend
From Updox API
An outbound direct message method which Sends a direct message (with optional attachments) from the authenticated user to one or more recipients.
Contents |
Fields
Please refer to the Interactive API for a list of the fields for this method.
Sample Request and Response
Request
{ "to": [ "test@direct.updoxqa.com" ], "subject": "Test subject", "textMessage": "Test message body", "attachments": [ { "content": "CgoKCgoKCgoKCgoKCgoKCgoKCgoKVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRF U1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lT QVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJ U0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRF U1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lT QVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJ U0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRF U1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lT QVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJ U0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg", "mimeType": "text/plain", "fileName": "test.txt" } ], "auth": { "applicationId": "updox", "applicationPassword": "1234567890", "accountId": "account", "userId": "user" } }
Response
{ "successful": true, "responseMessage": "OK", "responseCode": 2000, "messages": [ { "recipient": "contact:227161", "name": "test@direct.updoxqa.com", "directAddress": "test@direct.updoxqa.com", "messageId": 249597, "success": true, "reason": null } ], "invalidAddresses": [] }
Error Codes
In addition to the General Error Set, this method may return:
- 4640: direct address error: invalid direct address
- 4641: direct address error: no direct address found for this user
- 4650: direct error: send failed
- 4651: direct error: send failed and/or invalid direct address
Note that when a 4650 error code is returned, the "reason" field will contain a text description of the reason the message failed to send.