Send notification
POST/notify
Send notification
Request
- application/json
- multipart/form-data
Bodyrequired
userIdstring
User ID of the target Connhex user.
In order to deliver the notfification, userId or target must be specified.
targetstring
Notification target: can be an email address, a phone number or a telegram account.
In order to deliver the notfification, userId or target must be specified.
Example:
admin@connhex.commediumstringrequired
Possible values: [email, telegram, sms, slack, discord, fcm, msteams]
payload objectrequired
attachments object[]
Bodyrequired
userIdstring
User ID of the target Connhex user.
In order to deliver the notfification, userId or target must be specified.
targetstring
Notification target: can be an email address, a phone number or a telegram account.
In order to deliver the notfification, userId or target must be specified.
Example:
admin@connhex.commediumstringrequired
Possible values: [email, telegram, sms, slack, discord, fcm, msteams]
payload objectrequired
attachments object[]
Responses
- 201
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://connhex.com/notify");
var content = new StringContent("{\n \"userId\": \"string\",\n \"target\": \"admin@connhex.com\",\n \"medium\": \"email\",\n \"payload\": {\n \"title\": \"string\",\n \"body\": \"string\",\n \"preview\": \"string\",\n \"incipit\": \"string\",\n \"conclusion\": \"string\",\n \"footer\": \"string\"\n },\n \"attachments\": [\n {}\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());