Get a test account by signing up for a free trial for "cloud fax and notifications developer plans" at Plans | Developer | OpenText
How to submit a request to send a fax?
Here is the curl sample to submit a request to send a fax with a text file with basic authentication (user name and password).
curl -H "Content-Type: application/json" \
-u "<userid:password>" \
--data-binary "{
\"destinations\": [
{
\"fax\": \"9999999999\"
}
],
\"documents\": [
{
\"name\": \"temp.txt\",
\"type\": \"text\",
\"data\": \"SGkgVGhlcmUsIFRoaXMgaXMgYSB0ZXN0IERvY3VtZW50Lg==\"
}
]
}" \
https://t2api.us.cloudmessaging.opentext.com/mra/v1/outbound/faxes
Successful submission of requests will result in HTTP 200 response code along with a job id. Here is a sample response:
{
"job_id": "xsi-1111111111"
}
How to check the status of a submitted fax request.?
Status can be checked either by status API or webhook. With Webhook, OpenText will be able to push fax status to your web receiver. However, a receiver needs to be written using this schema to process the message. Note that the fax status schema is the same for both webhook and API. Webhook is highly recommended as it avoids polling for status. We will provide a curl sample for checking status via status API.
curl -u "<userid:password>" \
'https://t2api.us.cloudmessaging.opentext.com/mra/v1/outbound/faxes/status?job_id=xsi-1111111111'
Successful submission of status API call will result in HTTP 200 response code along with a detailed JSON status as below. Job state and delivery attempt state confirm that the fax is indeed sent successfully to the destination.
{
"job_id": "xsi-1111111111",
"entry_time": "2020-05-08T03:35:05.000Z",
"job_state": [
"Complete",
"Posted"
],
"deliveries": [
{
"fax": "1234567890",
"delivery_attempts": [
{
"state": "Sent",
"first_attempt": "2020-05-08T03:35:07.000Z",
"delivery_time": "2020-05-08T03:35:34.000Z",
"delivery_sec": 8,
"pages_delivered": 1,
"baud_rate": 31200,
"rcsid": "011919164813456"
}
]
}
]
}
How to submit a request to send SMS notification using SMS REST API?
Here is an example of curl command to submit a request to send SMS Notification.
curl -H "Content-Type: application/json" \
-u "<userid:password>" \
--data-binary "{
\"destinations\": [
{
\"sms\": \"recipient sms address\"
}
],
\"sms_text\": \"Hi There, This is a Test SMS from OpenText\"
}" \
https://t2api.us.cloudmessaging.opentext.com/mra/v1/outbound/sms
Successful submission of requests will result in HTTP 200 response code along with a job id similar to the above fax sample.
How to check the status of submitted SMS request?
It is similar to obtaining fax status as described above except that SMS status URL needs to be used as in the following sample code.
curl -u "<userid:password>" \
'https://t2api.us.cloudmessaging.opentext.com/mra/v1/outbound/sms/status?job_id=xsi-2222222222'
Here is a sample SMS status response
{
"job_id": "xsi-2222222222",
"entry_time": "2022-01-19T13:57:20.000Z",
"job_state": [
"Complete",
"Posted"
],
"deliveries": [
{
"sms": "9999999999",
"delivery_attempts": [
{
"state": "Sent",
"first_attempt": "2022-01-20T14: 27: 11.000Z"
}
],
"events": {
"sms_delivery_events": [
{
"event_time": "2022-01-20T14: 27: 00.000Z",
"status": "Confirmed"
}
]
}
}
]
}
How to submit a request to send Email Notification using Email REST API?
Following is an example of curl command to submit a request to send Email Notification.
curl -H "Content-Type: application/json" \
-u "<userid:password>" \
--data-binary "{
\"destinations\": [
{
\"email\": \"recipient email address\"
}
],
\"body\": [
{
\"name\": \"temp.txt\",
\"type\": \"text\",
\"charset\": \"UTF-8\",
\"data\": \"SGkgVGhlcmUsIFRoaXMgaXMgYSB0ZXN0IERvY3VtZW50Lg==\"
}
]
}" \
https://t2api.us.cloudmessaging.opentext.com/mra/v1/outbound/emails
Successful submission of requests will result in HTTP 200 response code along with a job id similar to the above fax sample.
How to check the status of submitted Email notification request?
It is similar to obtaining fax status as described above except that Email status URL needs to be used as in the following sample code
curl -u "<userid:password>" \
'https://t2api.us.cloudmessaging.opentext.com/mra/v1/outbound/emails/status?job_id=xsi-3333333333'
Here is a sample Email status response
{
"job_id": "xsi-3333333333",
"entry_time": "2022-01-19T14:04:14.000Z",
"job_state": [
"Complete",
"Posted"
],
"deliveries": [
{
"ref_base64": "SU5URVJORVQ=",
"email": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b3c6c0d6c1f3c0dcded6d7dcded2dadd9dd0dcde">[email protected]</a>",
"delivery_attempts": [
{
"state": "Sent",
"first_attempt": "2022-01-19T14:15:42.000Z"
}
],
"events": {
"email_delivery_events": [
{
"dsn": {
"event_time": "2022-01-19T14:05:00.000Z",
"value": "2.0.0",
"message": "\"%20smtp;250%202.0.0%20OK\""
}
}
]
}
}
]
}
Refer to API documentation for schema details.