Skip to main content

Send notification

POST 

/notify

Send notification

Request

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.com
    mediumstringrequired

    Possible values: [email, telegram, sms, slack, discord, fcm, msteams]

    payload objectrequired
    titlestringrequired
    bodystringrequired
    previewstring
    incipitstring
    conclusionstring
    footerstring
    attachments object[]
  • Array [
  • object
  • ]

Responses

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());
Request Collapse all
Body required
{
  "userId": "string",
  "target": "admin@connhex.com",
  "medium": "email",
  "payload": {
    "title": "string",
    "body": "string",
    "preview": "string",
    "incipit": "string",
    "conclusion": "string",
    "footer": "string"
  },
  "attachments": [
    {}
  ]
}