Install an app
curl --request POST \
--url https://apps-studio.thena.ai/apps/install \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"teamIds": [
"TGCA9557W4",
"TGCA9557W5"
],
"appId": "9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85",
"appConfiguration": {
"required_settings": [
"check the app manifest for required_settings schema"
],
"optional_settings": [
"check the app manifest for optional_settings schema"
]
}
}
'import requests
url = "https://apps-studio.thena.ai/apps/install"
payload = {
"teamIds": ["TGCA9557W4", "TGCA9557W5"],
"appId": "9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85",
"appConfiguration": {
"required_settings": ["check the app manifest for required_settings schema"],
"optional_settings": ["check the app manifest for optional_settings schema"]
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
teamIds: ['TGCA9557W4', 'TGCA9557W5'],
appId: '9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85',
appConfiguration: {
required_settings: ['check the app manifest for required_settings schema'],
optional_settings: ['check the app manifest for optional_settings schema']
}
})
};
fetch('https://apps-studio.thena.ai/apps/install', 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://apps-studio.thena.ai/apps/install",
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([
'teamIds' => [
'TGCA9557W4',
'TGCA9557W5'
],
'appId' => '9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85',
'appConfiguration' => [
'required_settings' => [
'check the app manifest for required_settings schema'
],
'optional_settings' => [
'check the app manifest for optional_settings schema'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://apps-studio.thena.ai/apps/install"
payload := strings.NewReader("{\n \"teamIds\": [\n \"TGCA9557W4\",\n \"TGCA9557W5\"\n ],\n \"appId\": \"9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85\",\n \"appConfiguration\": {\n \"required_settings\": [\n \"check the app manifest for required_settings schema\"\n ],\n \"optional_settings\": [\n \"check the app manifest for optional_settings schema\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://apps-studio.thena.ai/apps/install")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"teamIds\": [\n \"TGCA9557W4\",\n \"TGCA9557W5\"\n ],\n \"appId\": \"9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85\",\n \"appConfiguration\": {\n \"required_settings\": [\n \"check the app manifest for required_settings schema\"\n ],\n \"optional_settings\": [\n \"check the app manifest for optional_settings schema\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apps-studio.thena.ai/apps/install")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamIds\": [\n \"TGCA9557W4\",\n \"TGCA9557W5\"\n ],\n \"appId\": \"9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85\",\n \"appConfiguration\": {\n \"required_settings\": [\n \"check the app manifest for required_settings schema\"\n ],\n \"optional_settings\": [\n \"check the app manifest for optional_settings schema\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"appName": "Thena.ai",
"botSub": "OGGA0557MV",
"botTokenKey": "pk_live_*******_*******",
"botToken": "pk_live_*******_*******",
"installedBySub": "UGGA0557MV",
"installedByEmail": "john.doe@example.com",
"appInstalledForTeams": [
"TGGA0557MV",
"TGGA0557MV"
],
"appIdentifier": "thena-ai",
"installedByOrgId": "OGGA0557MV",
"metadata": {
"app_identifier": "thena-ai",
"app_name": "Thena.ai",
"app_description": "Thena.ai is a platform for creating and managing AI agents.",
"app_version": "1.0.0",
"app_author": "Thena.ai",
"app_author_email": "contact@thena.ai",
"app_author_url": "https://thena.ai"
}
}{
"statusCode": 422,
"message": "Bot Installation Failed: Unable to create bot user",
"name": "BotInstallationException"
}App installation
Install an app
Installs an app for the given teams.
POST
/
apps
/
install
Install an app
curl --request POST \
--url https://apps-studio.thena.ai/apps/install \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"teamIds": [
"TGCA9557W4",
"TGCA9557W5"
],
"appId": "9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85",
"appConfiguration": {
"required_settings": [
"check the app manifest for required_settings schema"
],
"optional_settings": [
"check the app manifest for optional_settings schema"
]
}
}
'import requests
url = "https://apps-studio.thena.ai/apps/install"
payload = {
"teamIds": ["TGCA9557W4", "TGCA9557W5"],
"appId": "9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85",
"appConfiguration": {
"required_settings": ["check the app manifest for required_settings schema"],
"optional_settings": ["check the app manifest for optional_settings schema"]
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
teamIds: ['TGCA9557W4', 'TGCA9557W5'],
appId: '9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85',
appConfiguration: {
required_settings: ['check the app manifest for required_settings schema'],
optional_settings: ['check the app manifest for optional_settings schema']
}
})
};
fetch('https://apps-studio.thena.ai/apps/install', 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://apps-studio.thena.ai/apps/install",
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([
'teamIds' => [
'TGCA9557W4',
'TGCA9557W5'
],
'appId' => '9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85',
'appConfiguration' => [
'required_settings' => [
'check the app manifest for required_settings schema'
],
'optional_settings' => [
'check the app manifest for optional_settings schema'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://apps-studio.thena.ai/apps/install"
payload := strings.NewReader("{\n \"teamIds\": [\n \"TGCA9557W4\",\n \"TGCA9557W5\"\n ],\n \"appId\": \"9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85\",\n \"appConfiguration\": {\n \"required_settings\": [\n \"check the app manifest for required_settings schema\"\n ],\n \"optional_settings\": [\n \"check the app manifest for optional_settings schema\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://apps-studio.thena.ai/apps/install")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"teamIds\": [\n \"TGCA9557W4\",\n \"TGCA9557W5\"\n ],\n \"appId\": \"9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85\",\n \"appConfiguration\": {\n \"required_settings\": [\n \"check the app manifest for required_settings schema\"\n ],\n \"optional_settings\": [\n \"check the app manifest for optional_settings schema\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apps-studio.thena.ai/apps/install")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"teamIds\": [\n \"TGCA9557W4\",\n \"TGCA9557W5\"\n ],\n \"appId\": \"9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85\",\n \"appConfiguration\": {\n \"required_settings\": [\n \"check the app manifest for required_settings schema\"\n ],\n \"optional_settings\": [\n \"check the app manifest for optional_settings schema\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"appName": "Thena.ai",
"botSub": "OGGA0557MV",
"botTokenKey": "pk_live_*******_*******",
"botToken": "pk_live_*******_*******",
"installedBySub": "UGGA0557MV",
"installedByEmail": "john.doe@example.com",
"appInstalledForTeams": [
"TGGA0557MV",
"TGGA0557MV"
],
"appIdentifier": "thena-ai",
"installedByOrgId": "OGGA0557MV",
"metadata": {
"app_identifier": "thena-ai",
"app_name": "Thena.ai",
"app_description": "Thena.ai is a platform for creating and managing AI agents.",
"app_version": "1.0.0",
"app_author": "Thena.ai",
"app_author_email": "contact@thena.ai",
"app_author_url": "https://thena.ai"
}
}{
"statusCode": 422,
"message": "Bot Installation Failed: Unable to create bot user",
"name": "BotInstallationException"
}Authorizations
Body
application/json
Array of team IDs where the app will be installed
Example:
["TGCA9557W4", "TGCA9557W5"]
Unique identifier of the app to be installed
Example:
"9FKHF3KJ10JQTR2YJ6QW1QZTHBZ85"
Configuration settings for the app installation
Show child attributes
Show child attributes
Response
App installed successfully
Name of the installed app
Example:
"Thena.ai"
Bot subscriber ID
Example:
"OGGA0557MV"
Bot token key for authentication
Example:
"pk_live_*******_*******"
Bot token for authentication
Example:
"pk_live_*******_*******"
Subscriber ID of the user who installed the app
Example:
"UGGA0557MV"
Email of the user who installed the app
Example:
"john.doe@example.com"
List of team IDs where the app is installed
Example:
["TGGA0557MV", "TGGA0557MV"]
Identifier of the app
Example:
"thena-ai"
Organization ID of the user who installed the app
Example:
"OGGA0557MV"
Metadata of the app
Example:
{
"app_identifier": "thena-ai",
"app_name": "Thena.ai",
"app_description": "Thena.ai is a platform for creating and managing AI agents.",
"app_version": "1.0.0",
"app_author": "Thena.ai",
"app_author_email": "contact@thena.ai",
"app_author_url": "https://thena.ai"
}
⌘I