- Publish a message to one's own channel
- Send a message to one's own application users
- Send a message to a specific user
- Retrieve messages of a specific user
- Retrieve messages of a specific application
- Retrieve scheduled messages which are active
For detailed information on each parameter in the request body, refer NTM Message Definition
Sample Requests:
POST: /message
A Message ID will be generated after making a POST request. The following sample cURL is a message cURL destined to two users "abc@slb.com" and "def@slb.com"
| Sample cUrl | Sample Output |
|---|---|
| curl -X POST \ 'https://api.delfi.slb.com/ntm/v1/message' \ -H 'Authorization: Bearer <your-ccg-token>' \ -H 'AppKey: <your-appkey>'\ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{ "sourceUserId": "", "sourceAppTag": "", "messageMediaType": "", "messageTitle": "New Contract", "messageText": "NTM created a new contract", "messageSendAt": "", "messageExpiresAt": "", "destinationUserId": [ "abc@slb.com", "def@slb.com" ], "context": { "account": "Account A", "contract": "Contract C", "department": "Department D" } }' | { "Message": "493dad1c-6082-4bb5-8e3a-2611cd847754" } |
GET: /message/application
| Sample cUrl | Sample Output |
|---|---|
| curl -X GET \ 'https://api.delfi.slb.com/ntm/v2/message/application' \ -H 'Authorization: Bearer <your-ccg-token>' \ -H 'AppKey: <your-appkey>'\ -H 'Cache-Control: no-cache' \ | [ { "contextAccount": "Account A", "contextContract": "Contract C", "contextDepartment": "Department D", "destinationUserId": "", "destinationAppId": "ntm-master-svc-ntm.slbservice.com", "messageId": "15601d8d-74f2-4750-b998-56cf6108c75c", "messageText": "", "messageTimestamp": "2018-08-13 17:08:30.417052351 +0000 UTC", "messageTitle": "New Contract", "sourceAppId": "ntm-master-svc-ntm.slbservice.com" } ] |
GET: /message/user
The following sample cURL is a message cURL destined to a single user "def@slb.com"
| Sample cUrl | Sample Output |
|---|---|
| curl -X GET \ 'https://api.delfi.slb.com/ntm/v2/message/user' \ -H 'Authorization: Bearer <your-user-exchange-token>' \ -H 'AppKey: <your-appkey>' \ -H 'Cache-Control: no-cache' \ -H 'Postman-Token: 645076e9-2132-49e0-ac4f-71138ba219e6' | [ { "contextAccount": "Account A", "contextContract": "Contract C", "contextDepartment": "Department D", "destinationUserId": "def@slb.com", "destinationAppId": "ntm-master-svc-ntm.slbservice.com", "messageId": "15601d8d-74f2-4750-b998-56cf6108c75c", "messageText": "", "messageTimestamp": "2018-08-13 17:08:30.417052351 +0000 UTC", "messageTitle": "New Contract", "sourceAppId": "ntm-master-svc-ntm.slbservice.com" } ] |
GET: /message/schedule
The following sample cURL is used to retrieve scheduled messages by active status.
| Sample cUrl | Sample Output |
|---|---|
| curl -X GET \ 'https://api.delfi.slb.com/ntm/v1/message/schedule' \ -H 'Authorization: Bearer <your-CCG-token>' \ -H 'AppKey: <your-appkey>' \ -H 'Cache-Control: no-cache' \ -H 'Postman-Token: 645076e9-2132-49e0-ac4f-71138ba219e6' | {"pageCursor": "eyJMaW1pdCI6NTAsIlBhZ2UiOjIsIk9yZGVyQnkiOiItQ3JlYXRlZEF0In0", "scheduledMessages" : "[ { “contextAccount”: “Account A”, “contextContract”: “Contract C”, “contextDepartment”: “Department D”, “originMessageId”: “2ebc852b-dca3-4910-9374-a2ee83a1c670”, “messageText”: “”, “messageTimestamp”: “2018-08-13 17:08:30.417052351 +0000 UTC”, “messageTitle”: “New Contract”, “messageSendAt”: "2024-04-09 00:00:00 +0000 UTC" } ]"} |