Create Workspace
curl --request POST \
--url https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create \
--header 'Content-Type: application/json' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--data '
{
"name": "My Workspace",
"enterprise_id": 12345,
"auth_scope": 1,
"description": "This is a workspace for invoice processing"
}
'import requests
url = "https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create"
payload = {
"name": "My Workspace",
"enterprise_id": 12345,
"auth_scope": 1,
"description": "This is a workspace for invoice processing"
}
headers = {
"x-ti-app-id": "<api-key>",
"x-ti-secret-code": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-ti-app-id': '<api-key>',
'x-ti-secret-code': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Workspace',
enterprise_id: 12345,
auth_scope: 1,
description: 'This is a workspace for invoice processing'
})
};
fetch('https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create', 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://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create",
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([
'name' => 'My Workspace',
'enterprise_id' => 12345,
'auth_scope' => 1,
'description' => 'This is a workspace for invoice processing'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ti-app-id: <api-key>",
"x-ti-secret-code: <api-key>"
],
]);
$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://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create"
payload := strings.NewReader("{\n \"name\": \"My Workspace\",\n \"enterprise_id\": 12345,\n \"auth_scope\": 1,\n \"description\": \"This is a workspace for invoice processing\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ti-app-id", "<api-key>")
req.Header.Add("x-ti-secret-code", "<api-key>")
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://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create")
.header("x-ti-app-id", "<api-key>")
.header("x-ti-secret-code", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Workspace\",\n \"enterprise_id\": 12345,\n \"auth_scope\": 1,\n \"description\": \"This is a workspace for invoice processing\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ti-app-id"] = '<api-key>'
request["x-ti-secret-code"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Workspace\",\n \"enterprise_id\": 12345,\n \"auth_scope\": 1,\n \"description\": \"This is a workspace for invoice processing\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "<string>",
"result": {
"workspace_id": "1234567890"
}
}Workspace Management
Create Workspace
Create a new workspace
POST
/
api
/
app-api
/
sip
/
platform
/
v2
/
workspace
/
create
Create Workspace
curl --request POST \
--url https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create \
--header 'Content-Type: application/json' \
--header 'x-ti-app-id: <api-key>' \
--header 'x-ti-secret-code: <api-key>' \
--data '
{
"name": "My Workspace",
"enterprise_id": 12345,
"auth_scope": 1,
"description": "This is a workspace for invoice processing"
}
'import requests
url = "https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create"
payload = {
"name": "My Workspace",
"enterprise_id": 12345,
"auth_scope": 1,
"description": "This is a workspace for invoice processing"
}
headers = {
"x-ti-app-id": "<api-key>",
"x-ti-secret-code": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-ti-app-id': '<api-key>',
'x-ti-secret-code': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'My Workspace',
enterprise_id: 12345,
auth_scope: 1,
description: 'This is a workspace for invoice processing'
})
};
fetch('https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create', 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://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create",
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([
'name' => 'My Workspace',
'enterprise_id' => 12345,
'auth_scope' => 1,
'description' => 'This is a workspace for invoice processing'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-ti-app-id: <api-key>",
"x-ti-secret-code: <api-key>"
],
]);
$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://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create"
payload := strings.NewReader("{\n \"name\": \"My Workspace\",\n \"enterprise_id\": 12345,\n \"auth_scope\": 1,\n \"description\": \"This is a workspace for invoice processing\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ti-app-id", "<api-key>")
req.Header.Add("x-ti-secret-code", "<api-key>")
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://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create")
.header("x-ti-app-id", "<api-key>")
.header("x-ti-secret-code", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Workspace\",\n \"enterprise_id\": 12345,\n \"auth_scope\": 1,\n \"description\": \"This is a workspace for invoice processing\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://docflow.textin.ai/api/app-api/sip/platform/v2/workspace/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ti-app-id"] = '<api-key>'
request["x-ti-secret-code"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"My Workspace\",\n \"enterprise_id\": 12345,\n \"auth_scope\": 1,\n \"description\": \"This is a workspace for invoice processing\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "<string>",
"result": {
"workspace_id": "1234567890"
}
}Body
application/json
Workspace name
Maximum string length:
50Example:
"My Workspace"
Enterprise organization ID
Example:
12345
Collaboration scope 0: Visible only to self 1: Visible to enterprise members
Available options:
0, 1 Example:
1
Workspace description
Maximum string length:
200Example:
"This is a workspace for invoice processing"
⌘I

