{"openapi":"3.0.4","info":{"title":"Add a Notification to a Subscription.","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/notification"}],"paths":{"/api/subscriptions/{scope}/{code}/notifications":{"post":{"tags":["Notifications"],"summary":"Add a Notification to a Subscription.","operationId":"CreateNotification","parameters":[{"name":"scope","in":"path","description":"The scope that identifies a subscription","required":true,"schema":{"maxLength":100,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}},{"name":"code","in":"path","description":"The code that identifies a subscription","required":true,"schema":{"maxLength":100,"minLength":1,"pattern":"^[a-zA-Z0-9\\-_]+$","type":"string"}}],"requestBody":{"description":"The data to create a notification","content":{"application/json-patch+json":{"schema":{"$ref":"/docs/api/notification/schemas.json#/components/schemas/CreateNotificationRequest"},"examples":{"Create Email Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Email","subject":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","plainTextBody":"Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}","htmlBody":"<p>Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}</p>","emailAddressTo":["recipient@finbourne.com"],"emailAddressCc":["recipientcc@finbourne.com"],"emailAddressBcc":["recipientbcc@finbourne.com"]}}},"Create SMS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Sms","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","recipients":["+447000000000"]}}},"Create Webhook Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Webhook","httpMethod":"Post","url":"https://example.com/api/{{jsonMessage.jsonField1}}/path?examplequery={{jsonMessage.jsonField2}}","authenticationType":"BearerToken","authenticationConfigurationItemPaths":{"BearerToken":"config://personal/myUserId/WebhookConfigurations/ExampleService/BearerToken"},"contentType":"Json","Content":{"Key":"Value Example","MessageKey":"{{header.EventType}}"}}}},"Create AWS SQS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqs","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","apiKeyRef":"config://shared/official/system-a-config/apiKey","apiSecretRef":"config://shared/official/system-a-config/apiSecret","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create AWS SQS Notification with Principal Authentication":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqsPrincipalAuth","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create Azure Service Bus Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AzureServiceBus","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","namespace":"config://shared/official/system-a-config/namespace","queueName":"config://shared/official/system-a-config/queueName","tenantId":"config://shared/official/system-a-config/tenantId","clientId":"config://shared/official/system-a-config/clientId","clientSecret":"config://shared/official/system-a-config/clientSecret"}}}}},"application/json":{"schema":{"$ref":"/docs/api/notification/schemas.json#/components/schemas/CreateNotificationRequest"},"examples":{"Create Email Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Email","subject":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","plainTextBody":"Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}","htmlBody":"<p>Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}</p>","emailAddressTo":["recipient@finbourne.com"],"emailAddressCc":["recipientcc@finbourne.com"],"emailAddressBcc":["recipientbcc@finbourne.com"]}}},"Create SMS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Sms","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","recipients":["+447000000000"]}}},"Create Webhook Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Webhook","httpMethod":"Post","url":"https://example.com/api/{{jsonMessage.jsonField1}}/path?examplequery={{jsonMessage.jsonField2}}","authenticationType":"BearerToken","authenticationConfigurationItemPaths":{"BearerToken":"config://personal/myUserId/WebhookConfigurations/ExampleService/BearerToken"},"contentType":"Json","Content":{"Key":"Value Example","MessageKey":"{{header.EventType}}"}}}},"Create AWS SQS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqs","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","apiKeyRef":"config://shared/official/system-a-config/apiKey","apiSecretRef":"config://shared/official/system-a-config/apiSecret","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create AWS SQS Notification with Principal Authentication":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqsPrincipalAuth","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create Azure Service Bus Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AzureServiceBus","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","namespace":"config://shared/official/system-a-config/namespace","queueName":"config://shared/official/system-a-config/queueName","tenantId":"config://shared/official/system-a-config/tenantId","clientId":"config://shared/official/system-a-config/clientId","clientSecret":"config://shared/official/system-a-config/clientSecret"}}}}},"text/json":{"schema":{"$ref":"/docs/api/notification/schemas.json#/components/schemas/CreateNotificationRequest"},"examples":{"Create Email Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Email","subject":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","plainTextBody":"Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}","htmlBody":"<p>Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}</p>","emailAddressTo":["recipient@finbourne.com"],"emailAddressCc":["recipientcc@finbourne.com"],"emailAddressBcc":["recipientbcc@finbourne.com"]}}},"Create SMS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Sms","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","recipients":["+447000000000"]}}},"Create Webhook Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Webhook","httpMethod":"Post","url":"https://example.com/api/{{jsonMessage.jsonField1}}/path?examplequery={{jsonMessage.jsonField2}}","authenticationType":"BearerToken","authenticationConfigurationItemPaths":{"BearerToken":"config://personal/myUserId/WebhookConfigurations/ExampleService/BearerToken"},"contentType":"Json","Content":{"Key":"Value Example","MessageKey":"{{header.EventType}}"}}}},"Create AWS SQS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqs","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","apiKeyRef":"config://shared/official/system-a-config/apiKey","apiSecretRef":"config://shared/official/system-a-config/apiSecret","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create AWS SQS Notification with Principal Authentication":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqsPrincipalAuth","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create Azure Service Bus Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AzureServiceBus","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","namespace":"config://shared/official/system-a-config/namespace","queueName":"config://shared/official/system-a-config/queueName","tenantId":"config://shared/official/system-a-config/tenantId","clientId":"config://shared/official/system-a-config/clientId","clientSecret":"config://shared/official/system-a-config/clientSecret"}}}}},"application/*+json":{"schema":{"$ref":"/docs/api/notification/schemas.json#/components/schemas/CreateNotificationRequest"},"examples":{"Create Email Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Email","subject":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","plainTextBody":"Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}","htmlBody":"<p>Event of type '{{header.eventType}}' was triggered at timestamp {{header.timestamp}}</p>","emailAddressTo":["recipient@finbourne.com"],"emailAddressCc":["recipientcc@finbourne.com"],"emailAddressBcc":["recipientbcc@finbourne.com"]}}},"Create SMS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Sms","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","recipients":["+447000000000"]}}},"Create Webhook Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"TestDescription","notificationType":{"type":"Webhook","httpMethod":"Post","url":"https://example.com/api/{{jsonMessage.jsonField1}}/path?examplequery={{jsonMessage.jsonField2}}","authenticationType":"BearerToken","authenticationConfigurationItemPaths":{"BearerToken":"config://personal/myUserId/WebhookConfigurations/ExampleService/BearerToken"},"contentType":"Json","Content":{"Key":"Value Example","MessageKey":"{{header.EventType}}"}}}},"Create AWS SQS Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqs","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","apiKeyRef":"config://shared/official/system-a-config/apiKey","apiSecretRef":"config://shared/official/system-a-config/apiSecret","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create AWS SQS Notification with Principal Authentication":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AmazonSqsPrincipalAuth","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","queueUrlRef":"config://shared/official/system-a-config/queueUrl"}}},"Create Azure Service Bus Notification":{"value":{"notificationId":"TestId","displayName":"TestDisplayName","description":"Example description","notificationType":{"type":"AzureServiceBus","body":"LUSID Notification: Event of type '{{header.eventType}}' was triggered","namespace":"config://shared/official/system-a-config/namespace","queueName":"config://shared/official/system-a-config/queueName","tenantId":"config://shared/official/system-a-config/tenantId","clientId":"config://shared/official/system-a-config/clientId","clientSecret":"config://shared/official/system-a-config/clientSecret"}}}}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"/docs/api/notification/schemas.json#/components/schemas/Notification"},"examples":{"Email Notification":{"value":{"notificationId":"ExampleId","displayName":"Example name","description":"Example description","notificationType":{"type":"Email","subject":"Event with message of {{body.message}}","plainTextBody":"Event with message {{body.message}} and subject {{body.subject}}","htmlBody":"<p>Event with message {{body.message}} and subject {{body.subject}}</p>","emailAddressTo":["recipient@finbourne.com"],"emailAddressCc":["recipientcc@finbourne.com"],"emailAddressBcc":["recipientbcc@finbourne.com"]},"createdAt":"2020-06-15T12:00:00.0000000+00:00","userIdCreated":"Example user","modifiedAt":"2020-06-20T12:00:00.0000000+00:00","userIdModified":"Example user","href":"http://fbn-test/api/subscriptions/testScope/testCode/notifications/ExampleId"}},"SMS Notification":{"value":{"notificationId":"ExampleId","displayName":"Example name","description":"Example description","notificationType":{"type":"Sms","body":"Event with message {{body.message}} and subject {{body.subject}}","recipients":["+447000000000"]},"createdAt":"2020-06-15T12:00:00.0000000+00:00","userIdCreated":"Example user","modifiedAt":"2020-06-20T12:00:00.0000000+00:00","userIdModified":"Example user","href":"http://fbn-test/api/subscriptions/testScope/testCode/notifications/ExampleId"}},"Webhook Notification":{"value":{"notificationId":"ExampleId","displayName":"Example name","description":"Example description","notificationType":{"content":{"Key":"Value Example","MessageKey":"{{body.message}}"},"type":"Webhook","httpMethod":"Post","url":"https://example.com/api/{{jsonMessage.jsonField1}}/path?examplequery={{jsonMessage.jsonField2}}","authenticationType":"BearerToken","contentType":"Json","authenticationConfigurationItemPaths":{"BearerToken":"config://personal/myUserId/WebhookConfigurations/ExampleService/BearerToken"}},"createdAt":"2020-06-15T12:00:00.0000000+00:00","userIdCreated":"Example user","modifiedAt":"2020-06-20T12:00:00.0000000+00:00","userIdModified":"Example user","href":"http://fbn-test/api/subscriptions/testScope/testCode/notifications/ExampleId"}},"AWS SQS Notification":{"value":{"notificationId":"ExampleId","displayName":"Example name","description":"Example description","notificationType":{"type":"AmazonSqs","body":"Event with message {{body.message}}","apiKeyRef":"config://shared/official/system-a-config/apiKey","apiSecretRef":"config://shared/official/system-a-config/apiSecretRef","queueUrlRef":"config://shared/official/system-a-config/queueUrl"},"createdAt":"2020-06-15T12:00:00.0000000+00:00","userIdCreated":"Example user","modifiedAt":"2020-06-20T12:00:00.0000000+00:00","userIdModified":"Example user","href":"http://fbn-test/api/subscriptions/testScope/testCode/notifications/ExampleId"}},"AWS SQS Principal Authentication Notification":{"value":{"notificationId":"ExampleId","displayName":"Example name","description":"Example description","notificationType":{"type":"AmazonSqsPrincipalAuth","body":"Event with message {{body.message}}","queueUrlRef":"config://shared/official/system-a-config/queueUrl"},"createdAt":"2020-06-15T12:00:00.0000000+00:00","userIdCreated":"Example user","modifiedAt":"2020-06-20T12:00:00.0000000+00:00","userIdModified":"Example user","href":"http://fbn-test/api/subscriptions/testScope/testCode/notifications/ExampleId"}},"Azure Service Bus Notification":{"value":{"notificationId":"ExampleId","displayName":"Example name","description":"Example description","notificationType":{"type":"AzureServiceBus","body":"Event with message {{body.message}}","namespaceRef":"config://shared/official/system-a-config/namespace","queueNameRef":"config://shared/official/system-a-config/queueName","tenantIdRef":"config://shared/official/system-a-config/tenantId","clientIdRef":"config://shared/official/system-a-config/clientId","clientSecretRef":"config://shared/official/system-a-config/clientSecret"},"createdAt":"2020-06-15T12:00:00.0000000+00:00","userIdCreated":"Example user","modifiedAt":"2020-06-20T12:00:00.0000000+00:00","userIdModified":"Example user","href":"http://fbn-test/api/subscriptions/testScope/testCode/notifications/ExampleId"}}}}}},"400":{"description":"The details of the input related failure","content":{"application/json":{"schema":{"$ref":"/docs/api/notification/schemas.json#/components/schemas/LusidValidationProblemDetails"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"/docs/api/notification/schemas.json#/components/schemas/LusidProblemDetails"}}}}},"security":[{"BearerAuth":[]}],"x-fbn-apistatus":"Stable"}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}