curl --request POST \
--url https://api.example.com/history/commands/add-item \
--header 'Content-Type: application/json' \
--data '
{
"paymentId": "<string>",
"nickname": "<string>",
"recipientId": "<string>",
"message": "<string>",
"authorizationTimestamp": "2023-11-07T05:31:56Z",
"system": "<string>",
"externalId": "<string>",
"attachments": [
{
"id": "<string>"
}
],
"links": [
"<string>"
],
"goals": [
{
"goalId": "<string>",
"goalTitle": "<string>"
}
],
"reelResults": [
{
"title": "<string>"
}
],
"actions": [
{
"id": "<string>",
"actionId": "<string>",
"name": "<string>",
"amount": 123,
"payload": {}
}
],
"alertMedia": {
"url": "<string>"
},
"vote": {
"id": "<string>",
"name": "<string>",
"isNew": true
},
"event": "<string>",
"count": 123,
"level": 123,
"levelName": "<string>",
"triggerAlert": true,
"triggerReel": true,
"triggerDonaton": true,
"addToGoal": true,
"addToTop": true
}
'import requests
url = "https://api.example.com/history/commands/add-item"
payload = {
"paymentId": "<string>",
"nickname": "<string>",
"recipientId": "<string>",
"message": "<string>",
"authorizationTimestamp": "2023-11-07T05:31:56Z",
"system": "<string>",
"externalId": "<string>",
"attachments": [{ "id": "<string>" }],
"links": ["<string>"],
"goals": [
{
"goalId": "<string>",
"goalTitle": "<string>"
}
],
"reelResults": [{ "title": "<string>" }],
"actions": [
{
"id": "<string>",
"actionId": "<string>",
"name": "<string>",
"amount": 123,
"payload": {}
}
],
"alertMedia": { "url": "<string>" },
"vote": {
"id": "<string>",
"name": "<string>",
"isNew": True
},
"event": "<string>",
"count": 123,
"level": 123,
"levelName": "<string>",
"triggerAlert": True,
"triggerReel": True,
"triggerDonaton": True,
"addToGoal": True,
"addToTop": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
paymentId: '<string>',
nickname: '<string>',
recipientId: '<string>',
message: '<string>',
authorizationTimestamp: '2023-11-07T05:31:56Z',
system: '<string>',
externalId: '<string>',
attachments: [{id: '<string>'}],
links: ['<string>'],
goals: [{goalId: '<string>', goalTitle: '<string>'}],
reelResults: [{title: '<string>'}],
actions: [
{
id: '<string>',
actionId: '<string>',
name: '<string>',
amount: 123,
payload: {}
}
],
alertMedia: {url: '<string>'},
vote: {id: '<string>', name: '<string>', isNew: true},
event: '<string>',
count: 123,
level: 123,
levelName: '<string>',
triggerAlert: true,
triggerReel: true,
triggerDonaton: true,
addToGoal: true,
addToTop: true
})
};
fetch('https://api.example.com/history/commands/add-item', 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.example.com/history/commands/add-item",
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([
'paymentId' => '<string>',
'nickname' => '<string>',
'recipientId' => '<string>',
'message' => '<string>',
'authorizationTimestamp' => '2023-11-07T05:31:56Z',
'system' => '<string>',
'externalId' => '<string>',
'attachments' => [
[
'id' => '<string>'
]
],
'links' => [
'<string>'
],
'goals' => [
[
'goalId' => '<string>',
'goalTitle' => '<string>'
]
],
'reelResults' => [
[
'title' => '<string>'
]
],
'actions' => [
[
'id' => '<string>',
'actionId' => '<string>',
'name' => '<string>',
'amount' => 123,
'payload' => [
]
]
],
'alertMedia' => [
'url' => '<string>'
],
'vote' => [
'id' => '<string>',
'name' => '<string>',
'isNew' => true
],
'event' => '<string>',
'count' => 123,
'level' => 123,
'levelName' => '<string>',
'triggerAlert' => true,
'triggerReel' => true,
'triggerDonaton' => true,
'addToGoal' => true,
'addToTop' => true
]),
CURLOPT_HTTPHEADER => [
"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.example.com/history/commands/add-item"
payload := strings.NewReader("{\n \"paymentId\": \"<string>\",\n \"nickname\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"message\": \"<string>\",\n \"authorizationTimestamp\": \"2023-11-07T05:31:56Z\",\n \"system\": \"<string>\",\n \"externalId\": \"<string>\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"links\": [\n \"<string>\"\n ],\n \"goals\": [\n {\n \"goalId\": \"<string>\",\n \"goalTitle\": \"<string>\"\n }\n ],\n \"reelResults\": [\n {\n \"title\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"actionId\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"payload\": {}\n }\n ],\n \"alertMedia\": {\n \"url\": \"<string>\"\n },\n \"vote\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isNew\": true\n },\n \"event\": \"<string>\",\n \"count\": 123,\n \"level\": 123,\n \"levelName\": \"<string>\",\n \"triggerAlert\": true,\n \"triggerReel\": true,\n \"triggerDonaton\": true,\n \"addToGoal\": true,\n \"addToTop\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/history/commands/add-item")
.header("Content-Type", "application/json")
.body("{\n \"paymentId\": \"<string>\",\n \"nickname\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"message\": \"<string>\",\n \"authorizationTimestamp\": \"2023-11-07T05:31:56Z\",\n \"system\": \"<string>\",\n \"externalId\": \"<string>\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"links\": [\n \"<string>\"\n ],\n \"goals\": [\n {\n \"goalId\": \"<string>\",\n \"goalTitle\": \"<string>\"\n }\n ],\n \"reelResults\": [\n {\n \"title\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"actionId\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"payload\": {}\n }\n ],\n \"alertMedia\": {\n \"url\": \"<string>\"\n },\n \"vote\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isNew\": true\n },\n \"event\": \"<string>\",\n \"count\": 123,\n \"level\": 123,\n \"levelName\": \"<string>\",\n \"triggerAlert\": true,\n \"triggerReel\": true,\n \"triggerDonaton\": true,\n \"addToGoal\": true,\n \"addToTop\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/history/commands/add-item")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentId\": \"<string>\",\n \"nickname\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"message\": \"<string>\",\n \"authorizationTimestamp\": \"2023-11-07T05:31:56Z\",\n \"system\": \"<string>\",\n \"externalId\": \"<string>\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"links\": [\n \"<string>\"\n ],\n \"goals\": [\n {\n \"goalId\": \"<string>\",\n \"goalTitle\": \"<string>\"\n }\n ],\n \"reelResults\": [\n {\n \"title\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"actionId\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"payload\": {}\n }\n ],\n \"alertMedia\": {\n \"url\": \"<string>\"\n },\n \"vote\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isNew\": true\n },\n \"event\": \"<string>\",\n \"count\": 123,\n \"level\": 123,\n \"levelName\": \"<string>\",\n \"triggerAlert\": true,\n \"triggerReel\": true,\n \"triggerDonaton\": true,\n \"addToGoal\": true,\n \"addToTop\": true\n}"
response = http.request(request)
puts response.read_bodyAdd a new history item
Creates a new donation history item for the authenticated user
curl --request POST \
--url https://api.example.com/history/commands/add-item \
--header 'Content-Type: application/json' \
--data '
{
"paymentId": "<string>",
"nickname": "<string>",
"recipientId": "<string>",
"message": "<string>",
"authorizationTimestamp": "2023-11-07T05:31:56Z",
"system": "<string>",
"externalId": "<string>",
"attachments": [
{
"id": "<string>"
}
],
"links": [
"<string>"
],
"goals": [
{
"goalId": "<string>",
"goalTitle": "<string>"
}
],
"reelResults": [
{
"title": "<string>"
}
],
"actions": [
{
"id": "<string>",
"actionId": "<string>",
"name": "<string>",
"amount": 123,
"payload": {}
}
],
"alertMedia": {
"url": "<string>"
},
"vote": {
"id": "<string>",
"name": "<string>",
"isNew": true
},
"event": "<string>",
"count": 123,
"level": 123,
"levelName": "<string>",
"triggerAlert": true,
"triggerReel": true,
"triggerDonaton": true,
"addToGoal": true,
"addToTop": true
}
'import requests
url = "https://api.example.com/history/commands/add-item"
payload = {
"paymentId": "<string>",
"nickname": "<string>",
"recipientId": "<string>",
"message": "<string>",
"authorizationTimestamp": "2023-11-07T05:31:56Z",
"system": "<string>",
"externalId": "<string>",
"attachments": [{ "id": "<string>" }],
"links": ["<string>"],
"goals": [
{
"goalId": "<string>",
"goalTitle": "<string>"
}
],
"reelResults": [{ "title": "<string>" }],
"actions": [
{
"id": "<string>",
"actionId": "<string>",
"name": "<string>",
"amount": 123,
"payload": {}
}
],
"alertMedia": { "url": "<string>" },
"vote": {
"id": "<string>",
"name": "<string>",
"isNew": True
},
"event": "<string>",
"count": 123,
"level": 123,
"levelName": "<string>",
"triggerAlert": True,
"triggerReel": True,
"triggerDonaton": True,
"addToGoal": True,
"addToTop": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
paymentId: '<string>',
nickname: '<string>',
recipientId: '<string>',
message: '<string>',
authorizationTimestamp: '2023-11-07T05:31:56Z',
system: '<string>',
externalId: '<string>',
attachments: [{id: '<string>'}],
links: ['<string>'],
goals: [{goalId: '<string>', goalTitle: '<string>'}],
reelResults: [{title: '<string>'}],
actions: [
{
id: '<string>',
actionId: '<string>',
name: '<string>',
amount: 123,
payload: {}
}
],
alertMedia: {url: '<string>'},
vote: {id: '<string>', name: '<string>', isNew: true},
event: '<string>',
count: 123,
level: 123,
levelName: '<string>',
triggerAlert: true,
triggerReel: true,
triggerDonaton: true,
addToGoal: true,
addToTop: true
})
};
fetch('https://api.example.com/history/commands/add-item', 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.example.com/history/commands/add-item",
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([
'paymentId' => '<string>',
'nickname' => '<string>',
'recipientId' => '<string>',
'message' => '<string>',
'authorizationTimestamp' => '2023-11-07T05:31:56Z',
'system' => '<string>',
'externalId' => '<string>',
'attachments' => [
[
'id' => '<string>'
]
],
'links' => [
'<string>'
],
'goals' => [
[
'goalId' => '<string>',
'goalTitle' => '<string>'
]
],
'reelResults' => [
[
'title' => '<string>'
]
],
'actions' => [
[
'id' => '<string>',
'actionId' => '<string>',
'name' => '<string>',
'amount' => 123,
'payload' => [
]
]
],
'alertMedia' => [
'url' => '<string>'
],
'vote' => [
'id' => '<string>',
'name' => '<string>',
'isNew' => true
],
'event' => '<string>',
'count' => 123,
'level' => 123,
'levelName' => '<string>',
'triggerAlert' => true,
'triggerReel' => true,
'triggerDonaton' => true,
'addToGoal' => true,
'addToTop' => true
]),
CURLOPT_HTTPHEADER => [
"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.example.com/history/commands/add-item"
payload := strings.NewReader("{\n \"paymentId\": \"<string>\",\n \"nickname\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"message\": \"<string>\",\n \"authorizationTimestamp\": \"2023-11-07T05:31:56Z\",\n \"system\": \"<string>\",\n \"externalId\": \"<string>\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"links\": [\n \"<string>\"\n ],\n \"goals\": [\n {\n \"goalId\": \"<string>\",\n \"goalTitle\": \"<string>\"\n }\n ],\n \"reelResults\": [\n {\n \"title\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"actionId\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"payload\": {}\n }\n ],\n \"alertMedia\": {\n \"url\": \"<string>\"\n },\n \"vote\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isNew\": true\n },\n \"event\": \"<string>\",\n \"count\": 123,\n \"level\": 123,\n \"levelName\": \"<string>\",\n \"triggerAlert\": true,\n \"triggerReel\": true,\n \"triggerDonaton\": true,\n \"addToGoal\": true,\n \"addToTop\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/history/commands/add-item")
.header("Content-Type", "application/json")
.body("{\n \"paymentId\": \"<string>\",\n \"nickname\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"message\": \"<string>\",\n \"authorizationTimestamp\": \"2023-11-07T05:31:56Z\",\n \"system\": \"<string>\",\n \"externalId\": \"<string>\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"links\": [\n \"<string>\"\n ],\n \"goals\": [\n {\n \"goalId\": \"<string>\",\n \"goalTitle\": \"<string>\"\n }\n ],\n \"reelResults\": [\n {\n \"title\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"actionId\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"payload\": {}\n }\n ],\n \"alertMedia\": {\n \"url\": \"<string>\"\n },\n \"vote\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isNew\": true\n },\n \"event\": \"<string>\",\n \"count\": 123,\n \"level\": 123,\n \"levelName\": \"<string>\",\n \"triggerAlert\": true,\n \"triggerReel\": true,\n \"triggerDonaton\": true,\n \"addToGoal\": true,\n \"addToTop\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/history/commands/add-item")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paymentId\": \"<string>\",\n \"nickname\": \"<string>\",\n \"recipientId\": \"<string>\",\n \"message\": \"<string>\",\n \"authorizationTimestamp\": \"2023-11-07T05:31:56Z\",\n \"system\": \"<string>\",\n \"externalId\": \"<string>\",\n \"attachments\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"links\": [\n \"<string>\"\n ],\n \"goals\": [\n {\n \"goalId\": \"<string>\",\n \"goalTitle\": \"<string>\"\n }\n ],\n \"reelResults\": [\n {\n \"title\": \"<string>\"\n }\n ],\n \"actions\": [\n {\n \"id\": \"<string>\",\n \"actionId\": \"<string>\",\n \"name\": \"<string>\",\n \"amount\": 123,\n \"payload\": {}\n }\n ],\n \"alertMedia\": {\n \"url\": \"<string>\"\n },\n \"vote\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"isNew\": true\n },\n \"event\": \"<string>\",\n \"count\": 123,\n \"level\": 123,\n \"levelName\": \"<string>\",\n \"triggerAlert\": true,\n \"triggerReel\": true,\n \"triggerDonaton\": true,\n \"addToGoal\": true,\n \"addToTop\": true\n}"
response = http.request(request)
puts response.read_bodyBody
Command to add a new history item
Payment ID from the source system
Donor's nickname
Recipient ID (streamer/creator)
Donation amount
Show child attributes
Show child attributes
Message from the donor
Authorization timestamp
Source system name
External ID from the source system
Attached media files
Show child attributes
Show child attributes
Attached media links
Target goals
Show child attributes
Show child attributes
Reel results from social media
Show child attributes
Show child attributes
Action requests triggered by the donation
Show child attributes
Show child attributes
Alert media URL
Show child attributes
Show child attributes
Vote information
Show child attributes
Show child attributes
Event type
Related item count
Boosty subscription level
Boosty subscription level name
Whether to trigger an alert
Whether to trigger a reel
Whether to trigger donation processing
Whether to add to goal
Whether to add to top
Response
Successfully created the history item
Was this page helpful?