Import past Requests
POST
/
v1
/
requests
/
batch_import
Import past Requests
curl --request POST \
--url https://api.siit.io/v1/requests/batch_import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"title": "<string>",
"requested_by": "<string>",
"description": "<string>",
"target_uid": "<string>",
"assignee_admin": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
],
"messages": [
{
"body_text": "<string>",
"sent_by": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
]
}
'import requests
url = "https://api.siit.io/v1/requests/batch_import"
payload = { "items": [
{
"title": "<string>",
"requested_by": "<string>",
"description": "<string>",
"target_uid": "<string>",
"assignee_admin": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
],
"messages": [
{
"body_text": "<string>",
"sent_by": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
] }
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({
items: [
{
title: '<string>',
requested_by: '<string>',
description: '<string>',
target_uid: '<string>',
assignee_admin: '<string>',
completed_at: '2023-11-07T05:31:56Z',
created_at: '2023-11-07T05:31:56Z',
custom_form_inputs: [{label: '<string>', value: '<string>'}],
messages: [
{body_text: '<string>', sent_by: '<string>', created_at: '2023-11-07T05:31:56Z'}
]
}
]
})
};
fetch('https://api.siit.io/v1/requests/batch_import', 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/batch_import",
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([
'items' => [
[
'title' => '<string>',
'requested_by' => '<string>',
'description' => '<string>',
'target_uid' => '<string>',
'assignee_admin' => '<string>',
'completed_at' => '2023-11-07T05:31:56Z',
'created_at' => '2023-11-07T05:31:56Z',
'custom_form_inputs' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'messages' => [
[
'body_text' => '<string>',
'sent_by' => '<string>',
'created_at' => '2023-11-07T05:31:56Z'
]
]
]
]
]),
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/batch_import"
payload := strings.NewReader("{\n \"items\": [\n {\n \"title\": \"<string>\",\n \"requested_by\": \"<string>\",\n \"description\": \"<string>\",\n \"target_uid\": \"<string>\",\n \"assignee_admin\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"sent_by\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\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/batch_import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"title\": \"<string>\",\n \"requested_by\": \"<string>\",\n \"description\": \"<string>\",\n \"target_uid\": \"<string>\",\n \"assignee_admin\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"sent_by\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/requests/batch_import")
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 \"items\": [\n {\n \"title\": \"<string>\",\n \"requested_by\": \"<string>\",\n \"description\": \"<string>\",\n \"target_uid\": \"<string>\",\n \"assignee_admin\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"sent_by\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"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>"
}Introduction
This endpoint allows you to import previous requests (e.g., from another ticketing system). Please note that:- These requests will be imported with a
resolvedstatus. - You can override the
created_atfield. - You can import up to 200 requests at once.
- Any row that fails to import will abort the whole process.
- Workflows won’t be triggered and Notifications won’t be sent out. Even if you re-open said requests.
- Imported records will appear as if they were created from the Admin Dashboard by the current user identified by the API key.
- Specifically on this endpoint you can reference users by email instead of UID, but note that this will create the users
Example payload
{
"items": [
{
"title": "Request created via Import: lorem ipsum",
"description": "Note that workflows don't run and notifications arent fired",
"requested_by": "u_4h72qjma",
"assignee_admin": "bipbip@acme.com",
"messages": [
{
"body_text": "Hello this is a message",
"kind": "message",
"sent_by": "u_4h72qjma",
"created_at": "2026-02-27 20:55"
},
{
"body_text": "This is a note",
"kind": "note",
"sent_by": "dimitri@siit.io",
"created_at": "2026-02-27 21:00"
},
{
"body_text": "I can also create a user via this call",
"kind": "message",
"sent_by": "createme@siit.io",
"created_at": "2026-02-27 22:00"
}
],
"completed_at": "2026-02-27 23:42",
"created_at": "2026-02-27 20:50",
"custom_form_inputs": [
{
"label": "This is an arbitrary label",
"value": "This is the value"
},
{
"label": "Old System Request ID",
"value": 42
}
]
}
]
}
Usage
⌘I
Import past Requests
curl --request POST \
--url https://api.siit.io/v1/requests/batch_import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"title": "<string>",
"requested_by": "<string>",
"description": "<string>",
"target_uid": "<string>",
"assignee_admin": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
],
"messages": [
{
"body_text": "<string>",
"sent_by": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
]
}
'import requests
url = "https://api.siit.io/v1/requests/batch_import"
payload = { "items": [
{
"title": "<string>",
"requested_by": "<string>",
"description": "<string>",
"target_uid": "<string>",
"assignee_admin": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"custom_form_inputs": [
{
"label": "<string>",
"value": "<string>"
}
],
"messages": [
{
"body_text": "<string>",
"sent_by": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
] }
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({
items: [
{
title: '<string>',
requested_by: '<string>',
description: '<string>',
target_uid: '<string>',
assignee_admin: '<string>',
completed_at: '2023-11-07T05:31:56Z',
created_at: '2023-11-07T05:31:56Z',
custom_form_inputs: [{label: '<string>', value: '<string>'}],
messages: [
{body_text: '<string>', sent_by: '<string>', created_at: '2023-11-07T05:31:56Z'}
]
}
]
})
};
fetch('https://api.siit.io/v1/requests/batch_import', 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/batch_import",
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([
'items' => [
[
'title' => '<string>',
'requested_by' => '<string>',
'description' => '<string>',
'target_uid' => '<string>',
'assignee_admin' => '<string>',
'completed_at' => '2023-11-07T05:31:56Z',
'created_at' => '2023-11-07T05:31:56Z',
'custom_form_inputs' => [
[
'label' => '<string>',
'value' => '<string>'
]
],
'messages' => [
[
'body_text' => '<string>',
'sent_by' => '<string>',
'created_at' => '2023-11-07T05:31:56Z'
]
]
]
]
]),
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/batch_import"
payload := strings.NewReader("{\n \"items\": [\n {\n \"title\": \"<string>\",\n \"requested_by\": \"<string>\",\n \"description\": \"<string>\",\n \"target_uid\": \"<string>\",\n \"assignee_admin\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"sent_by\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\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/batch_import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"title\": \"<string>\",\n \"requested_by\": \"<string>\",\n \"description\": \"<string>\",\n \"target_uid\": \"<string>\",\n \"assignee_admin\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"sent_by\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.siit.io/v1/requests/batch_import")
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 \"items\": [\n {\n \"title\": \"<string>\",\n \"requested_by\": \"<string>\",\n \"description\": \"<string>\",\n \"target_uid\": \"<string>\",\n \"assignee_admin\": \"<string>\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"custom_form_inputs\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"sent_by\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"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>"
}
