curl --request POST \
--url https://api.openworklabs.com/v1/notifications \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"message": "<string>",
"title": "<string>",
"link": "<string>",
"via": "auto",
"key": "<string>"
}
'import requests
url = "https://api.openworklabs.com/v1/notifications"
payload = {
"message": "<string>",
"title": "<string>",
"link": "<string>",
"via": "auto",
"key": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
title: '<string>',
link: '<string>',
via: 'auto',
key: '<string>'
})
};
fetch('https://api.openworklabs.com/v1/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'title' => '<string>',
'link' => '<string>',
'via' => 'auto',
'key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/notifications"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"title\": \"<string>\",\n \"link\": \"<string>\",\n \"via\": \"auto\",\n \"key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/notifications")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"title\": \"<string>\",\n \"link\": \"<string>\",\n \"via\": \"auto\",\n \"key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"title\": \"<string>\",\n \"link\": \"<string>\",\n \"via\": \"auto\",\n \"key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": "delivered",
"notification": {
"id": "<string>",
"title": "<string>",
"message": "<string>",
"link": "<string>",
"level": "interrupt",
"source": "tool",
"deliveries": [
{
"destination": "desktop",
"status": "sent",
"reason": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": "unauthorized"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"retryAfterSeconds": 123
}Notify you
Send the person this run is for a short message. It always lands in their OpenWork notification list. Use it when they asked to be told, or when something needs them: a result they are waiting for, a decision, a failure. Staying quiet is the normal outcome; don’t notify for routine progress. level interrupt also shows a desktop banner, or a Slack DM or email when no desktop is online. level inbox (the default) only adds it to the list. via names destinations (desktop, slack, email) when the person asked for them, such as “notify me on Slack”; they are used right away. Each delivery says sent, queued (the desktop shows it when it next checks) or skipped with a reason, such as slack_app_not_installed or member_not_linked; tell the person instead of retrying. Only the caller can be notified. Limits: 10 a minute, 200 a day, 30 interrupts a day; the same message or key is sent once a day.
curl --request POST \
--url https://api.openworklabs.com/v1/notifications \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"message": "<string>",
"title": "<string>",
"link": "<string>",
"via": "auto",
"key": "<string>"
}
'import requests
url = "https://api.openworklabs.com/v1/notifications"
payload = {
"message": "<string>",
"title": "<string>",
"link": "<string>",
"via": "auto",
"key": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
message: '<string>',
title: '<string>',
link: '<string>',
via: 'auto',
key: '<string>'
})
};
fetch('https://api.openworklabs.com/v1/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openworklabs.com/v1/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>',
'title' => '<string>',
'link' => '<string>',
'via' => 'auto',
'key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/notifications"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"title\": \"<string>\",\n \"link\": \"<string>\",\n \"via\": \"auto\",\n \"key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.openworklabs.com/v1/notifications")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"title\": \"<string>\",\n \"link\": \"<string>\",\n \"via\": \"auto\",\n \"key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"title\": \"<string>\",\n \"link\": \"<string>\",\n \"via\": \"auto\",\n \"key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": "delivered",
"notification": {
"id": "<string>",
"title": "<string>",
"message": "<string>",
"link": "<string>",
"level": "interrupt",
"source": "tool",
"deliveries": [
{
"destination": "desktop",
"status": "sent",
"reason": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": "unauthorized"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>",
"retryAfterSeconds": 123
}Authorizations
Body
Was this page helpful?