Send a message
curl --request POST \
--url https://api.buzzkit.dev/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"topic": "<string>",
"segment": "<string>",
"where": {
"all": [
{
"all": "<array>"
}
]
},
"ttlSeconds": 1209630,
"idempotencyKey": "<string>",
"title": "<string>",
"body": "<string>",
"subtitle": "<string>",
"badge": 1,
"sound": "<string>",
"imageUrl": "<string>",
"data": {},
"collapseId": "<string>",
"threadId": "<string>",
"category": "<string>",
"relevanceScore": 0.5,
"targetContentId": "<string>",
"deepLink": "<string>",
"policy": "ignore",
"actions": [
{
"id": "<string>",
"title": "<string>",
"destructive": true,
"foreground": true,
"input": true,
"placeholder": "<string>"
}
],
"apns": {
"payload": {}
},
"fcm": {
"android": {},
"payload": {}
}
}
'import requests
url = "https://api.buzzkit.dev/v1/messages"
payload = {
"to": "<string>",
"topic": "<string>",
"segment": "<string>",
"where": { "all": [{ "all": "<array>" }] },
"ttlSeconds": 1209630,
"idempotencyKey": "<string>",
"title": "<string>",
"body": "<string>",
"subtitle": "<string>",
"badge": 1,
"sound": "<string>",
"imageUrl": "<string>",
"data": {},
"collapseId": "<string>",
"threadId": "<string>",
"category": "<string>",
"relevanceScore": 0.5,
"targetContentId": "<string>",
"deepLink": "<string>",
"policy": "ignore",
"actions": [
{
"id": "<string>",
"title": "<string>",
"destructive": True,
"foreground": True,
"input": True,
"placeholder": "<string>"
}
],
"apns": { "payload": {} },
"fcm": {
"android": {},
"payload": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
topic: '<string>',
segment: '<string>',
where: {all: [{all: '<array>'}]},
ttlSeconds: 1209630,
idempotencyKey: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
subtitle: '<string>',
badge: 1,
sound: '<string>',
imageUrl: '<string>',
data: {},
collapseId: '<string>',
threadId: '<string>',
category: '<string>',
relevanceScore: 0.5,
targetContentId: '<string>',
deepLink: '<string>',
policy: 'ignore',
actions: [
{
id: '<string>',
title: '<string>',
destructive: true,
foreground: true,
input: true,
placeholder: '<string>'
}
],
apns: {payload: {}},
fcm: {android: {}, payload: {}}
})
};
fetch('https://api.buzzkit.dev/v1/messages', 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.buzzkit.dev/v1/messages",
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([
'to' => '<string>',
'topic' => '<string>',
'segment' => '<string>',
'where' => [
'all' => [
[
'all' => '<array>'
]
]
],
'ttlSeconds' => 1209630,
'idempotencyKey' => '<string>',
'title' => '<string>',
'body' => '<string>',
'subtitle' => '<string>',
'badge' => 1,
'sound' => '<string>',
'imageUrl' => '<string>',
'data' => [
],
'collapseId' => '<string>',
'threadId' => '<string>',
'category' => '<string>',
'relevanceScore' => 0.5,
'targetContentId' => '<string>',
'deepLink' => '<string>',
'policy' => 'ignore',
'actions' => [
[
'id' => '<string>',
'title' => '<string>',
'destructive' => true,
'foreground' => true,
'input' => true,
'placeholder' => '<string>'
]
],
'apns' => [
'payload' => [
]
],
'fcm' => [
'android' => [
],
'payload' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.buzzkit.dev/v1/messages"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"topic\": \"<string>\",\n \"segment\": \"<string>\",\n \"where\": {\n \"all\": [\n {\n \"all\": \"<array>\"\n }\n ]\n },\n \"ttlSeconds\": 1209630,\n \"idempotencyKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"badge\": 1,\n \"sound\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"data\": {},\n \"collapseId\": \"<string>\",\n \"threadId\": \"<string>\",\n \"category\": \"<string>\",\n \"relevanceScore\": 0.5,\n \"targetContentId\": \"<string>\",\n \"deepLink\": \"<string>\",\n \"policy\": \"ignore\",\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"destructive\": true,\n \"foreground\": true,\n \"input\": true,\n \"placeholder\": \"<string>\"\n }\n ],\n \"apns\": {\n \"payload\": {}\n },\n \"fcm\": {\n \"android\": {},\n \"payload\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.buzzkit.dev/v1/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"topic\": \"<string>\",\n \"segment\": \"<string>\",\n \"where\": {\n \"all\": [\n {\n \"all\": \"<array>\"\n }\n ]\n },\n \"ttlSeconds\": 1209630,\n \"idempotencyKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"badge\": 1,\n \"sound\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"data\": {},\n \"collapseId\": \"<string>\",\n \"threadId\": \"<string>\",\n \"category\": \"<string>\",\n \"relevanceScore\": 0.5,\n \"targetContentId\": \"<string>\",\n \"deepLink\": \"<string>\",\n \"policy\": \"ignore\",\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"destructive\": true,\n \"foreground\": true,\n \"input\": true,\n \"placeholder\": \"<string>\"\n }\n ],\n \"apns\": {\n \"payload\": {}\n },\n \"fcm\": {\n \"android\": {},\n \"payload\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buzzkit.dev/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"topic\": \"<string>\",\n \"segment\": \"<string>\",\n \"where\": {\n \"all\": [\n {\n \"all\": \"<array>\"\n }\n ]\n },\n \"ttlSeconds\": 1209630,\n \"idempotencyKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"badge\": 1,\n \"sound\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"data\": {},\n \"collapseId\": \"<string>\",\n \"threadId\": \"<string>\",\n \"category\": \"<string>\",\n \"relevanceScore\": 0.5,\n \"targetContentId\": \"<string>\",\n \"deepLink\": \"<string>\",\n \"policy\": \"ignore\",\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"destructive\": true,\n \"foreground\": true,\n \"input\": true,\n \"placeholder\": \"<string>\"\n }\n ],\n \"apns\": {\n \"payload\": {}\n },\n \"fcm\": {\n \"android\": {},\n \"payload\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {},
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"details": {}
},
"metadata": {
"timestamp": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Messages
Send a message
POST
/
v1
/
messages
Send a message
curl --request POST \
--url https://api.buzzkit.dev/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "<string>",
"topic": "<string>",
"segment": "<string>",
"where": {
"all": [
{
"all": "<array>"
}
]
},
"ttlSeconds": 1209630,
"idempotencyKey": "<string>",
"title": "<string>",
"body": "<string>",
"subtitle": "<string>",
"badge": 1,
"sound": "<string>",
"imageUrl": "<string>",
"data": {},
"collapseId": "<string>",
"threadId": "<string>",
"category": "<string>",
"relevanceScore": 0.5,
"targetContentId": "<string>",
"deepLink": "<string>",
"policy": "ignore",
"actions": [
{
"id": "<string>",
"title": "<string>",
"destructive": true,
"foreground": true,
"input": true,
"placeholder": "<string>"
}
],
"apns": {
"payload": {}
},
"fcm": {
"android": {},
"payload": {}
}
}
'import requests
url = "https://api.buzzkit.dev/v1/messages"
payload = {
"to": "<string>",
"topic": "<string>",
"segment": "<string>",
"where": { "all": [{ "all": "<array>" }] },
"ttlSeconds": 1209630,
"idempotencyKey": "<string>",
"title": "<string>",
"body": "<string>",
"subtitle": "<string>",
"badge": 1,
"sound": "<string>",
"imageUrl": "<string>",
"data": {},
"collapseId": "<string>",
"threadId": "<string>",
"category": "<string>",
"relevanceScore": 0.5,
"targetContentId": "<string>",
"deepLink": "<string>",
"policy": "ignore",
"actions": [
{
"id": "<string>",
"title": "<string>",
"destructive": True,
"foreground": True,
"input": True,
"placeholder": "<string>"
}
],
"apns": { "payload": {} },
"fcm": {
"android": {},
"payload": {}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '<string>',
topic: '<string>',
segment: '<string>',
where: {all: [{all: '<array>'}]},
ttlSeconds: 1209630,
idempotencyKey: '<string>',
title: '<string>',
body: JSON.stringify('<string>'),
subtitle: '<string>',
badge: 1,
sound: '<string>',
imageUrl: '<string>',
data: {},
collapseId: '<string>',
threadId: '<string>',
category: '<string>',
relevanceScore: 0.5,
targetContentId: '<string>',
deepLink: '<string>',
policy: 'ignore',
actions: [
{
id: '<string>',
title: '<string>',
destructive: true,
foreground: true,
input: true,
placeholder: '<string>'
}
],
apns: {payload: {}},
fcm: {android: {}, payload: {}}
})
};
fetch('https://api.buzzkit.dev/v1/messages', 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.buzzkit.dev/v1/messages",
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([
'to' => '<string>',
'topic' => '<string>',
'segment' => '<string>',
'where' => [
'all' => [
[
'all' => '<array>'
]
]
],
'ttlSeconds' => 1209630,
'idempotencyKey' => '<string>',
'title' => '<string>',
'body' => '<string>',
'subtitle' => '<string>',
'badge' => 1,
'sound' => '<string>',
'imageUrl' => '<string>',
'data' => [
],
'collapseId' => '<string>',
'threadId' => '<string>',
'category' => '<string>',
'relevanceScore' => 0.5,
'targetContentId' => '<string>',
'deepLink' => '<string>',
'policy' => 'ignore',
'actions' => [
[
'id' => '<string>',
'title' => '<string>',
'destructive' => true,
'foreground' => true,
'input' => true,
'placeholder' => '<string>'
]
],
'apns' => [
'payload' => [
]
],
'fcm' => [
'android' => [
],
'payload' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.buzzkit.dev/v1/messages"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"topic\": \"<string>\",\n \"segment\": \"<string>\",\n \"where\": {\n \"all\": [\n {\n \"all\": \"<array>\"\n }\n ]\n },\n \"ttlSeconds\": 1209630,\n \"idempotencyKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"badge\": 1,\n \"sound\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"data\": {},\n \"collapseId\": \"<string>\",\n \"threadId\": \"<string>\",\n \"category\": \"<string>\",\n \"relevanceScore\": 0.5,\n \"targetContentId\": \"<string>\",\n \"deepLink\": \"<string>\",\n \"policy\": \"ignore\",\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"destructive\": true,\n \"foreground\": true,\n \"input\": true,\n \"placeholder\": \"<string>\"\n }\n ],\n \"apns\": {\n \"payload\": {}\n },\n \"fcm\": {\n \"android\": {},\n \"payload\": {}\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.buzzkit.dev/v1/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"topic\": \"<string>\",\n \"segment\": \"<string>\",\n \"where\": {\n \"all\": [\n {\n \"all\": \"<array>\"\n }\n ]\n },\n \"ttlSeconds\": 1209630,\n \"idempotencyKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"badge\": 1,\n \"sound\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"data\": {},\n \"collapseId\": \"<string>\",\n \"threadId\": \"<string>\",\n \"category\": \"<string>\",\n \"relevanceScore\": 0.5,\n \"targetContentId\": \"<string>\",\n \"deepLink\": \"<string>\",\n \"policy\": \"ignore\",\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"destructive\": true,\n \"foreground\": true,\n \"input\": true,\n \"placeholder\": \"<string>\"\n }\n ],\n \"apns\": {\n \"payload\": {}\n },\n \"fcm\": {\n \"android\": {},\n \"payload\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buzzkit.dev/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"<string>\",\n \"topic\": \"<string>\",\n \"segment\": \"<string>\",\n \"where\": {\n \"all\": [\n {\n \"all\": \"<array>\"\n }\n ]\n },\n \"ttlSeconds\": 1209630,\n \"idempotencyKey\": \"<string>\",\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"subtitle\": \"<string>\",\n \"badge\": 1,\n \"sound\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"data\": {},\n \"collapseId\": \"<string>\",\n \"threadId\": \"<string>\",\n \"category\": \"<string>\",\n \"relevanceScore\": 0.5,\n \"targetContentId\": \"<string>\",\n \"deepLink\": \"<string>\",\n \"policy\": \"ignore\",\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"title\": \"<string>\",\n \"destructive\": true,\n \"foreground\": true,\n \"input\": true,\n \"placeholder\": \"<string>\"\n }\n ],\n \"apns\": {\n \"payload\": {}\n },\n \"fcm\": {\n \"android\": {},\n \"payload\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {},
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"details": {}
},
"metadata": {
"timestamp": "<string>",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"success": false,
"data": {},
"error": {
"code": "invalid_api_key",
"message": "<string>",
"param": "<string>",
"details": [
{
"param": "<string>",
"message": "<string>"
}
]
},
"metadata": {
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Authorizations
An API key from the dashboard. The scopes listed on each operation are the resource:action grants a key needs (messages:send, subscribers:read, topics:*, *); account:* scopes and key management are session-only. Workspace keys (bk_ws_) reach every tenant and pick one with the buzzkit-tenant header; tenant keys (bk_tn_) are locked to one tenant; client keys (bk_pk_) ship inside an app and only work on /v1/client/*.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Required string length:
1 - 256Required string length:
3 - 48Pattern:
^[a-z0-9]+(?:-[a-z0-9]+)*$Required string length:
3 - 48Pattern:
^[a-z0-9]+(?:-[a-z0-9]+)*$- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Available options:
push, email Required range:
60 <= x <= 2419200Show child attributes
Show child attributes
Required string length:
1 - 255Maximum string length:
500Maximum string length:
4000Maximum string length:
500Required range:
x >= 0Maximum string length:
100Maximum string length:
2048Show child attributes
Show child attributes
Maximum string length:
64Available options:
high, normal Maximum string length:
64Maximum string length:
64Available options:
passive, active, timeSensitive, critical Required range:
0 <= x <= 1Maximum string length:
64Maximum string length:
2000Show child attributes
Show child attributes
Available options:
ignore Required array length:
1 - 4 elementsShow child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes