Save a Slack template
curl --request POST \
--url https://app.sideshift.app/api/oauth/v1/integrations/slack/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": {
"id": "<string>",
"name": "<string>",
"workflows": [
{
"id": "<string>",
"name": "<string>",
"threshold": 123,
"repeatInterval": 123,
"filters": {
"programs": [
"<string>"
],
"creators": [
"<string>"
],
"platforms": [
"<string>"
]
},
"messageTemplate": "<string>",
"isActive": true,
"webhookId": "<string>",
"topCount": 123,
"embed": {
"color": "<string>",
"showThumbnail": true,
"showPlatform": true,
"showProgram": true,
"showTotalViews": true,
"showPostLink": true,
"showCreatorButton": true,
"showProgramButton": true,
"postButtonText": "<string>"
},
"notifyCreatorDM": true,
"notifyCreatorChannel": true,
"creatorNotificationUserId": "<string>",
"brandSpaceChannelId": "<string>",
"creatorMessageTemplate": "<string>",
"creatorIncludePostLink": true,
"notifyCustomWebhook": true,
"customWebhookUrl": "<string>"
}
],
"webhooks": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"channel": "<string>",
"isActive": true
}
],
"timeZone": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
'import requests
url = "https://app.sideshift.app/api/oauth/v1/integrations/slack/templates"
payload = { "template": {
"id": "<string>",
"name": "<string>",
"workflows": [
{
"id": "<string>",
"name": "<string>",
"threshold": 123,
"repeatInterval": 123,
"filters": {
"programs": ["<string>"],
"creators": ["<string>"],
"platforms": ["<string>"]
},
"messageTemplate": "<string>",
"isActive": True,
"webhookId": "<string>",
"topCount": 123,
"embed": {
"color": "<string>",
"showThumbnail": True,
"showPlatform": True,
"showProgram": True,
"showTotalViews": True,
"showPostLink": True,
"showCreatorButton": True,
"showProgramButton": True,
"postButtonText": "<string>"
},
"notifyCreatorDM": True,
"notifyCreatorChannel": True,
"creatorNotificationUserId": "<string>",
"brandSpaceChannelId": "<string>",
"creatorMessageTemplate": "<string>",
"creatorIncludePostLink": True,
"notifyCustomWebhook": True,
"customWebhookUrl": "<string>"
}
],
"webhooks": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"channel": "<string>",
"isActive": True
}
],
"timeZone": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
} }
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({
template: {
id: '<string>',
name: '<string>',
workflows: [
{
id: '<string>',
name: '<string>',
threshold: 123,
repeatInterval: 123,
filters: {programs: ['<string>'], creators: ['<string>'], platforms: ['<string>']},
messageTemplate: '<string>',
isActive: true,
webhookId: '<string>',
topCount: 123,
embed: {
color: '<string>',
showThumbnail: true,
showPlatform: true,
showProgram: true,
showTotalViews: true,
showPostLink: true,
showCreatorButton: true,
showProgramButton: true,
postButtonText: '<string>'
},
notifyCreatorDM: true,
notifyCreatorChannel: true,
creatorNotificationUserId: '<string>',
brandSpaceChannelId: '<string>',
creatorMessageTemplate: '<string>',
creatorIncludePostLink: true,
notifyCustomWebhook: true,
customWebhookUrl: '<string>'
}
],
webhooks: [
{
id: '<string>',
name: '<string>',
url: '<string>',
channel: '<string>',
isActive: true
}
],
timeZone: '<string>',
createdAt: '<string>',
updatedAt: '<string>'
}
})
};
fetch('https://app.sideshift.app/api/oauth/v1/integrations/slack/templates', 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://app.sideshift.app/api/oauth/v1/integrations/slack/templates",
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([
'template' => [
'id' => '<string>',
'name' => '<string>',
'workflows' => [
[
'id' => '<string>',
'name' => '<string>',
'threshold' => 123,
'repeatInterval' => 123,
'filters' => [
'programs' => [
'<string>'
],
'creators' => [
'<string>'
],
'platforms' => [
'<string>'
]
],
'messageTemplate' => '<string>',
'isActive' => true,
'webhookId' => '<string>',
'topCount' => 123,
'embed' => [
'color' => '<string>',
'showThumbnail' => true,
'showPlatform' => true,
'showProgram' => true,
'showTotalViews' => true,
'showPostLink' => true,
'showCreatorButton' => true,
'showProgramButton' => true,
'postButtonText' => '<string>'
],
'notifyCreatorDM' => true,
'notifyCreatorChannel' => true,
'creatorNotificationUserId' => '<string>',
'brandSpaceChannelId' => '<string>',
'creatorMessageTemplate' => '<string>',
'creatorIncludePostLink' => true,
'notifyCustomWebhook' => true,
'customWebhookUrl' => '<string>'
]
],
'webhooks' => [
[
'id' => '<string>',
'name' => '<string>',
'url' => '<string>',
'channel' => '<string>',
'isActive' => true
]
],
'timeZone' => '<string>',
'createdAt' => '<string>',
'updatedAt' => '<string>'
]
]),
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://app.sideshift.app/api/oauth/v1/integrations/slack/templates"
payload := strings.NewReader("{\n \"template\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"workflows\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"repeatInterval\": 123,\n \"filters\": {\n \"programs\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"platforms\": [\n \"<string>\"\n ]\n },\n \"messageTemplate\": \"<string>\",\n \"isActive\": true,\n \"webhookId\": \"<string>\",\n \"topCount\": 123,\n \"embed\": {\n \"color\": \"<string>\",\n \"showThumbnail\": true,\n \"showPlatform\": true,\n \"showProgram\": true,\n \"showTotalViews\": true,\n \"showPostLink\": true,\n \"showCreatorButton\": true,\n \"showProgramButton\": true,\n \"postButtonText\": \"<string>\"\n },\n \"notifyCreatorDM\": true,\n \"notifyCreatorChannel\": true,\n \"creatorNotificationUserId\": \"<string>\",\n \"brandSpaceChannelId\": \"<string>\",\n \"creatorMessageTemplate\": \"<string>\",\n \"creatorIncludePostLink\": true,\n \"notifyCustomWebhook\": true,\n \"customWebhookUrl\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"channel\": \"<string>\",\n \"isActive\": true\n }\n ],\n \"timeZone\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"updatedAt\": \"<string>\"\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://app.sideshift.app/api/oauth/v1/integrations/slack/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"workflows\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"repeatInterval\": 123,\n \"filters\": {\n \"programs\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"platforms\": [\n \"<string>\"\n ]\n },\n \"messageTemplate\": \"<string>\",\n \"isActive\": true,\n \"webhookId\": \"<string>\",\n \"topCount\": 123,\n \"embed\": {\n \"color\": \"<string>\",\n \"showThumbnail\": true,\n \"showPlatform\": true,\n \"showProgram\": true,\n \"showTotalViews\": true,\n \"showPostLink\": true,\n \"showCreatorButton\": true,\n \"showProgramButton\": true,\n \"postButtonText\": \"<string>\"\n },\n \"notifyCreatorDM\": true,\n \"notifyCreatorChannel\": true,\n \"creatorNotificationUserId\": \"<string>\",\n \"brandSpaceChannelId\": \"<string>\",\n \"creatorMessageTemplate\": \"<string>\",\n \"creatorIncludePostLink\": true,\n \"notifyCustomWebhook\": true,\n \"customWebhookUrl\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"channel\": \"<string>\",\n \"isActive\": true\n }\n ],\n \"timeZone\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"updatedAt\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/oauth/v1/integrations/slack/templates")
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 \"template\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"workflows\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"repeatInterval\": 123,\n \"filters\": {\n \"programs\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"platforms\": [\n \"<string>\"\n ]\n },\n \"messageTemplate\": \"<string>\",\n \"isActive\": true,\n \"webhookId\": \"<string>\",\n \"topCount\": 123,\n \"embed\": {\n \"color\": \"<string>\",\n \"showThumbnail\": true,\n \"showPlatform\": true,\n \"showProgram\": true,\n \"showTotalViews\": true,\n \"showPostLink\": true,\n \"showCreatorButton\": true,\n \"showProgramButton\": true,\n \"postButtonText\": \"<string>\"\n },\n \"notifyCreatorDM\": true,\n \"notifyCreatorChannel\": true,\n \"creatorNotificationUserId\": \"<string>\",\n \"brandSpaceChannelId\": \"<string>\",\n \"creatorMessageTemplate\": \"<string>\",\n \"creatorIncludePostLink\": true,\n \"notifyCustomWebhook\": true,\n \"customWebhookUrl\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"channel\": \"<string>\",\n \"isActive\": true\n }\n ],\n \"timeZone\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"updatedAt\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"success": true,
"message": "<string>",
"template": {
"id": "<string>",
"name": "<string>",
"workflows": [
{
"id": "<string>",
"name": "<string>",
"threshold": 123,
"repeatInterval": 123,
"filters": {
"programs": [
"<string>"
],
"creators": [
"<string>"
],
"platforms": [
"<string>"
]
},
"messageTemplate": "<string>",
"isActive": true,
"webhookId": "<string>",
"topCount": 123,
"embed": {
"color": "<string>",
"showThumbnail": true,
"showPlatform": true,
"showProgram": true,
"showTotalViews": true,
"showPostLink": true,
"showCreatorButton": true,
"showProgramButton": true,
"postButtonText": "<string>"
},
"notifyCreatorDM": true,
"notifyCreatorChannel": true,
"creatorNotificationUserId": "<string>",
"brandSpaceChannelId": "<string>",
"creatorMessageTemplate": "<string>",
"creatorIncludePostLink": true,
"notifyCustomWebhook": true,
"customWebhookUrl": "<string>"
}
],
"webhooks": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"channel": "<string>",
"isActive": true
}
],
"timeZone": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer access token",
"requestId": "req_..."
}
}{
"error": {
"code": "insufficient_scope",
"message": "Requires scope 'campaigns:write'",
"requestId": "req_..."
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"requestId": "req_..."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded",
"requestId": "req_..."
}
}Save a Slack template
Save a Slack workflow template for a company. Requires the integrations:write scope.
POST
/
integrations
/
slack
/
templates
Save a Slack template
curl --request POST \
--url https://app.sideshift.app/api/oauth/v1/integrations/slack/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"template": {
"id": "<string>",
"name": "<string>",
"workflows": [
{
"id": "<string>",
"name": "<string>",
"threshold": 123,
"repeatInterval": 123,
"filters": {
"programs": [
"<string>"
],
"creators": [
"<string>"
],
"platforms": [
"<string>"
]
},
"messageTemplate": "<string>",
"isActive": true,
"webhookId": "<string>",
"topCount": 123,
"embed": {
"color": "<string>",
"showThumbnail": true,
"showPlatform": true,
"showProgram": true,
"showTotalViews": true,
"showPostLink": true,
"showCreatorButton": true,
"showProgramButton": true,
"postButtonText": "<string>"
},
"notifyCreatorDM": true,
"notifyCreatorChannel": true,
"creatorNotificationUserId": "<string>",
"brandSpaceChannelId": "<string>",
"creatorMessageTemplate": "<string>",
"creatorIncludePostLink": true,
"notifyCustomWebhook": true,
"customWebhookUrl": "<string>"
}
],
"webhooks": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"channel": "<string>",
"isActive": true
}
],
"timeZone": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
'import requests
url = "https://app.sideshift.app/api/oauth/v1/integrations/slack/templates"
payload = { "template": {
"id": "<string>",
"name": "<string>",
"workflows": [
{
"id": "<string>",
"name": "<string>",
"threshold": 123,
"repeatInterval": 123,
"filters": {
"programs": ["<string>"],
"creators": ["<string>"],
"platforms": ["<string>"]
},
"messageTemplate": "<string>",
"isActive": True,
"webhookId": "<string>",
"topCount": 123,
"embed": {
"color": "<string>",
"showThumbnail": True,
"showPlatform": True,
"showProgram": True,
"showTotalViews": True,
"showPostLink": True,
"showCreatorButton": True,
"showProgramButton": True,
"postButtonText": "<string>"
},
"notifyCreatorDM": True,
"notifyCreatorChannel": True,
"creatorNotificationUserId": "<string>",
"brandSpaceChannelId": "<string>",
"creatorMessageTemplate": "<string>",
"creatorIncludePostLink": True,
"notifyCustomWebhook": True,
"customWebhookUrl": "<string>"
}
],
"webhooks": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"channel": "<string>",
"isActive": True
}
],
"timeZone": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
} }
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({
template: {
id: '<string>',
name: '<string>',
workflows: [
{
id: '<string>',
name: '<string>',
threshold: 123,
repeatInterval: 123,
filters: {programs: ['<string>'], creators: ['<string>'], platforms: ['<string>']},
messageTemplate: '<string>',
isActive: true,
webhookId: '<string>',
topCount: 123,
embed: {
color: '<string>',
showThumbnail: true,
showPlatform: true,
showProgram: true,
showTotalViews: true,
showPostLink: true,
showCreatorButton: true,
showProgramButton: true,
postButtonText: '<string>'
},
notifyCreatorDM: true,
notifyCreatorChannel: true,
creatorNotificationUserId: '<string>',
brandSpaceChannelId: '<string>',
creatorMessageTemplate: '<string>',
creatorIncludePostLink: true,
notifyCustomWebhook: true,
customWebhookUrl: '<string>'
}
],
webhooks: [
{
id: '<string>',
name: '<string>',
url: '<string>',
channel: '<string>',
isActive: true
}
],
timeZone: '<string>',
createdAt: '<string>',
updatedAt: '<string>'
}
})
};
fetch('https://app.sideshift.app/api/oauth/v1/integrations/slack/templates', 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://app.sideshift.app/api/oauth/v1/integrations/slack/templates",
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([
'template' => [
'id' => '<string>',
'name' => '<string>',
'workflows' => [
[
'id' => '<string>',
'name' => '<string>',
'threshold' => 123,
'repeatInterval' => 123,
'filters' => [
'programs' => [
'<string>'
],
'creators' => [
'<string>'
],
'platforms' => [
'<string>'
]
],
'messageTemplate' => '<string>',
'isActive' => true,
'webhookId' => '<string>',
'topCount' => 123,
'embed' => [
'color' => '<string>',
'showThumbnail' => true,
'showPlatform' => true,
'showProgram' => true,
'showTotalViews' => true,
'showPostLink' => true,
'showCreatorButton' => true,
'showProgramButton' => true,
'postButtonText' => '<string>'
],
'notifyCreatorDM' => true,
'notifyCreatorChannel' => true,
'creatorNotificationUserId' => '<string>',
'brandSpaceChannelId' => '<string>',
'creatorMessageTemplate' => '<string>',
'creatorIncludePostLink' => true,
'notifyCustomWebhook' => true,
'customWebhookUrl' => '<string>'
]
],
'webhooks' => [
[
'id' => '<string>',
'name' => '<string>',
'url' => '<string>',
'channel' => '<string>',
'isActive' => true
]
],
'timeZone' => '<string>',
'createdAt' => '<string>',
'updatedAt' => '<string>'
]
]),
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://app.sideshift.app/api/oauth/v1/integrations/slack/templates"
payload := strings.NewReader("{\n \"template\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"workflows\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"repeatInterval\": 123,\n \"filters\": {\n \"programs\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"platforms\": [\n \"<string>\"\n ]\n },\n \"messageTemplate\": \"<string>\",\n \"isActive\": true,\n \"webhookId\": \"<string>\",\n \"topCount\": 123,\n \"embed\": {\n \"color\": \"<string>\",\n \"showThumbnail\": true,\n \"showPlatform\": true,\n \"showProgram\": true,\n \"showTotalViews\": true,\n \"showPostLink\": true,\n \"showCreatorButton\": true,\n \"showProgramButton\": true,\n \"postButtonText\": \"<string>\"\n },\n \"notifyCreatorDM\": true,\n \"notifyCreatorChannel\": true,\n \"creatorNotificationUserId\": \"<string>\",\n \"brandSpaceChannelId\": \"<string>\",\n \"creatorMessageTemplate\": \"<string>\",\n \"creatorIncludePostLink\": true,\n \"notifyCustomWebhook\": true,\n \"customWebhookUrl\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"channel\": \"<string>\",\n \"isActive\": true\n }\n ],\n \"timeZone\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"updatedAt\": \"<string>\"\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://app.sideshift.app/api/oauth/v1/integrations/slack/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"workflows\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"repeatInterval\": 123,\n \"filters\": {\n \"programs\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"platforms\": [\n \"<string>\"\n ]\n },\n \"messageTemplate\": \"<string>\",\n \"isActive\": true,\n \"webhookId\": \"<string>\",\n \"topCount\": 123,\n \"embed\": {\n \"color\": \"<string>\",\n \"showThumbnail\": true,\n \"showPlatform\": true,\n \"showProgram\": true,\n \"showTotalViews\": true,\n \"showPostLink\": true,\n \"showCreatorButton\": true,\n \"showProgramButton\": true,\n \"postButtonText\": \"<string>\"\n },\n \"notifyCreatorDM\": true,\n \"notifyCreatorChannel\": true,\n \"creatorNotificationUserId\": \"<string>\",\n \"brandSpaceChannelId\": \"<string>\",\n \"creatorMessageTemplate\": \"<string>\",\n \"creatorIncludePostLink\": true,\n \"notifyCustomWebhook\": true,\n \"customWebhookUrl\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"channel\": \"<string>\",\n \"isActive\": true\n }\n ],\n \"timeZone\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"updatedAt\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sideshift.app/api/oauth/v1/integrations/slack/templates")
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 \"template\": {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"workflows\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"threshold\": 123,\n \"repeatInterval\": 123,\n \"filters\": {\n \"programs\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"platforms\": [\n \"<string>\"\n ]\n },\n \"messageTemplate\": \"<string>\",\n \"isActive\": true,\n \"webhookId\": \"<string>\",\n \"topCount\": 123,\n \"embed\": {\n \"color\": \"<string>\",\n \"showThumbnail\": true,\n \"showPlatform\": true,\n \"showProgram\": true,\n \"showTotalViews\": true,\n \"showPostLink\": true,\n \"showCreatorButton\": true,\n \"showProgramButton\": true,\n \"postButtonText\": \"<string>\"\n },\n \"notifyCreatorDM\": true,\n \"notifyCreatorChannel\": true,\n \"creatorNotificationUserId\": \"<string>\",\n \"brandSpaceChannelId\": \"<string>\",\n \"creatorMessageTemplate\": \"<string>\",\n \"creatorIncludePostLink\": true,\n \"notifyCustomWebhook\": true,\n \"customWebhookUrl\": \"<string>\"\n }\n ],\n \"webhooks\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"channel\": \"<string>\",\n \"isActive\": true\n }\n ],\n \"timeZone\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"updatedAt\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"success": true,
"message": "<string>",
"template": {
"id": "<string>",
"name": "<string>",
"workflows": [
{
"id": "<string>",
"name": "<string>",
"threshold": 123,
"repeatInterval": 123,
"filters": {
"programs": [
"<string>"
],
"creators": [
"<string>"
],
"platforms": [
"<string>"
]
},
"messageTemplate": "<string>",
"isActive": true,
"webhookId": "<string>",
"topCount": 123,
"embed": {
"color": "<string>",
"showThumbnail": true,
"showPlatform": true,
"showProgram": true,
"showTotalViews": true,
"showPostLink": true,
"showCreatorButton": true,
"showProgramButton": true,
"postButtonText": "<string>"
},
"notifyCreatorDM": true,
"notifyCreatorChannel": true,
"creatorNotificationUserId": "<string>",
"brandSpaceChannelId": "<string>",
"creatorMessageTemplate": "<string>",
"creatorIncludePostLink": true,
"notifyCustomWebhook": true,
"customWebhookUrl": "<string>"
}
],
"webhooks": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"channel": "<string>",
"isActive": true
}
],
"timeZone": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}{
"error": {
"code": "unauthorized",
"message": "Missing bearer access token",
"requestId": "req_..."
}
}{
"error": {
"code": "insufficient_scope",
"message": "Requires scope 'campaigns:write'",
"requestId": "req_..."
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"requestId": "req_..."
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded",
"requestId": "req_..."
}
}Authorizations
OAuth 2.1 authorization code + PKCE (S256). Tokens are tenant-bound (company_id) and scoped. Discover endpoints via /.well-known/oauth-authorization-server.
Body
application/json
Save a new Slack workflow template. companyId is injected from the token.
A saved Slack workflow template (stored as supplied; the use-case persists the template object verbatim).
Show child attributes
Show child attributes
Response
Template saved.
Show child attributes
Show child attributes
⌘I