Providing you are a LUSID user with sufficient access control permissions, you can create an SMS notification to send to people when an event you have subscribed to occurs. For example, you could notify all the portfolio managers by SMS when the LUSID ‘portfolio created’ event occurs.
- Method 1: Using the Notification REST API
- Method 2: Using the LUSID web app
- Method 3: Using Luminesce
Using the Notification REST API
Currently, you can create one notification per API call. Note you must have already subscribed to the event you want to attach the SMS notification to.
- Obtain an API access token.
- Call the CreateNotification API for your LUSID domain, passing in your API access token and:
- The
scope
andcode
of the subscription to attach it to. - A
body
. You can use attributes of the subscribed event in mustache templates to make the text more meaningful. - A comma-separated list of phone numbers. You can specify up to 10 recipients.
PortfolioEvents
and codePortfolioCreated
:
The response is as follows. Note you can use thecurl -X POST "https://<your-domain>.lusid.com/notification/api/subscriptions/PortfolioEvents/PortfolioCreatedEvent/notifications" -H "Authorization: Bearer <your-API-access-token>" -H "Content-Type: application/json" -d '{ "notificationId": "PortfolioCreatedSmsNotification", "displayName": "SmsNotification", "notificationType": { "Type": "Sms", "Body": "A portfolio was created with code {{Body.portfolioCode}} in {{Body.portfolioScope}} at {{Header.timestamp}}.", "Recipients": [ "+447000000000" ], } }'
id
of the notification (highlighted in red) to reference it again in subsequent API calls:{ "notificationId": "PortfolioCreatedSmsNotification", "displayName": "SmsNotification", "notificationType": { "type": "Sms", "body": "A portfolio was created with code {{Body.portfolioCode}} in {{Body.portfolioScope}} at {{Header.timestamp}}.", "recipients": [ "+447000000000" ] }, "createdAt": "2023-07-14T10:20:29.1903787+00:00", "userIdCreated": "00uji4twb7X42sdse2p7", "modifiedAt": "2023-07-14T10:20:29.1903787+00:00", "userIdModified": "00uji4twb7X42sdse2p7", "href": "https://<your-domain>.lusid.com/notification/api/subscriptions/PortfolioEvents/PortfolioCreatedEvent/notifications/PortfolioCreatedSmsNotification" }
- The
Using the LUSID web app
<Coming soon>