Create a Request [Slack Automations]
Shorthand route for when using Slack Automations.
POST
/
v1
/
requests
/
slack
Create a Request directly using Slack informations
curl --request POST \
--url https://api.siit.io/v1/requests/slack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"slack_user_id": "<string>",
"description": "<string>",
"slack_message_link": "<string>",
"slack_direct_link": "<string>",
"slack_channel_id": "<string>",
"target": "<string>",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.siit.io/v1/requests/slack"
payload = {
"title": "<string>",
"slack_user_id": "<string>",
"description": "<string>",
"slack_message_link": "<string>",
"slack_direct_link": "<string>",
"slack_channel_id": "<string>",
"target": "<string>",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<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({
title: '<string>',
slack_user_id: '<string>',
description: '<string>',
slack_message_link: '<string>',
slack_direct_link: '<string>',
slack_channel_id: '<string>',
target: '<string>',
custom_form_inputs: [{label: '<string>', value: '<string>'}]
})
};
fetch('https://api.siit.io/v1/requests/slack', 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.siit.io/v1/requests/slack",
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([
'title' => '<string>',
'slack_user_id' => '<string>',
'description' => '<string>',
'slack_message_link' => '<string>',
'slack_direct_link' => '<string>',
'slack_channel_id' => '<string>',
'target' => '<string>',
'custom_form_inputs' => [
[
'label' => '<string>',
'value' => '<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://api.siit.io/v1/requests/slack"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"slack_user_id\": \"<string>\",\n \"description\": \"<string>\",\n \"slack_message_link\": \"<string>\",\n \"slack_direct_link\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"target\": \"<string>\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\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.siit.io/v1/requests/slack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"slack_user_id\": \"<string>\",\n \"description\": \"<string>\",\n \"slack_message_link\": \"<string>\",\n \"slack_direct_link\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"target\": \"<string>\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/requests/slack")
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 \"title\": \"<string>\",\n \"slack_user_id\": \"<string>\",\n \"description\": \"<string>\",\n \"slack_message_link\": \"<string>\",\n \"slack_direct_link\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"target\": \"<string>\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"admin_permalink_url": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"assignee_admin": "<string>",
"assignee_admin_uid": "<string>",
"assignee_inbox": "<string>",
"assignee_inbox_uid": "<string>",
"associated_apps": [
"<string>"
],
"associated_equipments": [
"<string>"
],
"approvals": [
"<string>"
],
"attachments": [
{
"filename": "<string>",
"url": "<string>"
}
],
"author": "<string>",
"author_uid": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"completed_by": "<string>",
"completed_by_uid": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
],
"description": "<string>",
"description_markdown": "<string>",
"follower_uids": [
"<string>"
],
"followers": [
"<string>"
],
"friendly_id": "<string>",
"requested_by": "<string>",
"requested_by_uid": "<string>",
"slack_channel_id": "<string>",
"slack_direct_link": "<string>",
"slack_thread_ts": "<string>",
"slack_ts": "<string>",
"sla_data": {
"first_replied_at": "2023-11-07T05:31:56Z",
"first_completed_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"first_reply_due_at": "2023-11-07T05:31:56Z",
"first_completion_due_at": "2023-11-07T05:31:56Z"
},
"status": "open",
"tag_uids": [
"<string>"
],
"tags": [
"<string>"
],
"target": "<string>",
"target_uid": "<string>",
"title": "<string>",
"title_markdown": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"troubleshoot": "<string>"
}{
"error": "<string>",
"troubleshoot": "<string>"
}Introduction
Use this route if you’re plugging the request submission using Slack Automation. This avoid you having to fetch the user UIDs and instead directly use Slack User IDs. A sample project interacting with this API is available here.Usage
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
the Slack User ID of the requester
please use "slack_direct_link" instead
An optional link referencing a Slack message
the Slack Channel ID (not needed if you use "slack_direct_link")
An optional array containing data attached to the request. Each item must include either "uid" (native input) or "label" (arbitrary input), plus "value".
A custom form input item for request creation. Either "label" (arbitrary input) or "uid" (native input from service configuration) must be provided.
- Arbitrary input (by label)
- Native input (by uid)
Show child attributes
Show child attributes
Response
Request created
Show child attributes
Show child attributes
⌘I
Create a Request directly using Slack informations
curl --request POST \
--url https://api.siit.io/v1/requests/slack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"slack_user_id": "<string>",
"description": "<string>",
"slack_message_link": "<string>",
"slack_direct_link": "<string>",
"slack_channel_id": "<string>",
"target": "<string>",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.siit.io/v1/requests/slack"
payload = {
"title": "<string>",
"slack_user_id": "<string>",
"description": "<string>",
"slack_message_link": "<string>",
"slack_direct_link": "<string>",
"slack_channel_id": "<string>",
"target": "<string>",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<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({
title: '<string>',
slack_user_id: '<string>',
description: '<string>',
slack_message_link: '<string>',
slack_direct_link: '<string>',
slack_channel_id: '<string>',
target: '<string>',
custom_form_inputs: [{label: '<string>', value: '<string>'}]
})
};
fetch('https://api.siit.io/v1/requests/slack', 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.siit.io/v1/requests/slack",
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([
'title' => '<string>',
'slack_user_id' => '<string>',
'description' => '<string>',
'slack_message_link' => '<string>',
'slack_direct_link' => '<string>',
'slack_channel_id' => '<string>',
'target' => '<string>',
'custom_form_inputs' => [
[
'label' => '<string>',
'value' => '<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://api.siit.io/v1/requests/slack"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"slack_user_id\": \"<string>\",\n \"description\": \"<string>\",\n \"slack_message_link\": \"<string>\",\n \"slack_direct_link\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"target\": \"<string>\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\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.siit.io/v1/requests/slack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"slack_user_id\": \"<string>\",\n \"description\": \"<string>\",\n \"slack_message_link\": \"<string>\",\n \"slack_direct_link\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"target\": \"<string>\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/requests/slack")
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 \"title\": \"<string>\",\n \"slack_user_id\": \"<string>\",\n \"description\": \"<string>\",\n \"slack_message_link\": \"<string>\",\n \"slack_direct_link\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"target\": \"<string>\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": {
"uid": "<string>",
"admin_permalink_url": "<string>",
"archived_at": "2023-11-07T05:31:56Z",
"assignee_admin": "<string>",
"assignee_admin_uid": "<string>",
"assignee_inbox": "<string>",
"assignee_inbox_uid": "<string>",
"associated_apps": [
"<string>"
],
"associated_equipments": [
"<string>"
],
"approvals": [
"<string>"
],
"attachments": [
{
"filename": "<string>",
"url": "<string>"
}
],
"author": "<string>",
"author_uid": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"completed_by": "<string>",
"completed_by_uid": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
],
"description": "<string>",
"description_markdown": "<string>",
"follower_uids": [
"<string>"
],
"followers": [
"<string>"
],
"friendly_id": "<string>",
"requested_by": "<string>",
"requested_by_uid": "<string>",
"slack_channel_id": "<string>",
"slack_direct_link": "<string>",
"slack_thread_ts": "<string>",
"slack_ts": "<string>",
"sla_data": {
"first_replied_at": "2023-11-07T05:31:56Z",
"first_completed_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"first_reply_due_at": "2023-11-07T05:31:56Z",
"first_completion_due_at": "2023-11-07T05:31:56Z"
},
"status": "open",
"tag_uids": [
"<string>"
],
"tags": [
"<string>"
],
"target": "<string>",
"target_uid": "<string>",
"title": "<string>",
"title_markdown": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"troubleshoot": "<string>"
}{
"error": "<string>",
"troubleshoot": "<string>"
}
