curl --request POST \
--url https://api.dairo.app/v1/slack/apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"configToken": "<string>",
"appId": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"signingSecret": "<string>"
}
'import requests
url = "https://api.dairo.app/v1/slack/apps"
payload = {
"name": "<string>",
"configToken": "<string>",
"appId": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"signingSecret": "<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({
name: '<string>',
configToken: '<string>',
appId: '<string>',
clientId: '<string>',
clientSecret: '<string>',
signingSecret: '<string>'
})
};
fetch('https://api.dairo.app/v1/slack/apps', 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.dairo.app/v1/slack/apps",
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' => '<string>',
'configToken' => '<string>',
'appId' => '<string>',
'clientId' => '<string>',
'clientSecret' => '<string>',
'signingSecret' => '<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.dairo.app/v1/slack/apps"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"configToken\": \"<string>\",\n \"appId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"signingSecret\": \"<string>\"\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.dairo.app/v1/slack/apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"configToken\": \"<string>\",\n \"appId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"signingSecret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dairo.app/v1/slack/apps")
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 \"name\": \"<string>\",\n \"configToken\": \"<string>\",\n \"appId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"signingSecret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"appId": "<string>",
"clientId": "<string>",
"origin": "managed",
"contextMode": "mentions",
"name": "<string>",
"ambientMode": "off",
"status": "<string>",
"createdAt": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}Create a Slack app
Create a Slack app (managed or BYO)
curl --request POST \
--url https://api.dairo.app/v1/slack/apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"configToken": "<string>",
"appId": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"signingSecret": "<string>"
}
'import requests
url = "https://api.dairo.app/v1/slack/apps"
payload = {
"name": "<string>",
"configToken": "<string>",
"appId": "<string>",
"clientId": "<string>",
"clientSecret": "<string>",
"signingSecret": "<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({
name: '<string>',
configToken: '<string>',
appId: '<string>',
clientId: '<string>',
clientSecret: '<string>',
signingSecret: '<string>'
})
};
fetch('https://api.dairo.app/v1/slack/apps', 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.dairo.app/v1/slack/apps",
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' => '<string>',
'configToken' => '<string>',
'appId' => '<string>',
'clientId' => '<string>',
'clientSecret' => '<string>',
'signingSecret' => '<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.dairo.app/v1/slack/apps"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"configToken\": \"<string>\",\n \"appId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"signingSecret\": \"<string>\"\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.dairo.app/v1/slack/apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"configToken\": \"<string>\",\n \"appId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"signingSecret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dairo.app/v1/slack/apps")
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 \"name\": \"<string>\",\n \"configToken\": \"<string>\",\n \"appId\": \"<string>\",\n \"clientId\": \"<string>\",\n \"clientSecret\": \"<string>\",\n \"signingSecret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"appId": "<string>",
"clientId": "<string>",
"origin": "managed",
"contextMode": "mentions",
"name": "<string>",
"ambientMode": "off",
"status": "<string>",
"createdAt": "<string>"
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"type": "<string>",
"param": "<string>"
}
}Authorizations
Dairo API key, e.g. dairo_test_... or dairo_live_...
Body
Create a managed or BYO Slack app. Provide origin='managed' with a configToken, or origin='byo' with the four credential fields.
managed, byo Default 'mentions'. 'ambient' also subscribes the app to channel message events.
mentions, ambient managed: display name for the app/bot (optional).
managed only: your Slack app-configuration access token (xoxe...). Used once to mint the app, then dropped - never stored.
byo only: the existing Slack app id.
byo only: the OAuth client id.
byo only: the OAuth client secret (sealed at rest).
byo only: the signing secret (sealed at rest).
Response
Success
A tenant Slack app (managed or BYO). Secret-free - the sealed OAuth client/signing secrets are never returned.
Dairo record id.
The Slack app id (e.g. A012ABCD0A0).
The OAuth client id (public; it appears in the install URL).
'managed' (Dairo minted it via the App Manifest APIs) or 'byo' (imported credentials).
managed, byo 'mentions' (@mentions + DMs only) or 'ambient' (also channel message events).
mentions, ambient Display name the app was created with (null for a BYO import).
'off' (drop ambient chatter) or 'store' (persist it silently, no message.received). Present on list reads; absent on the create response.
off, store 'active' | 'deleted'. Present on list reads; absent on the create response.
ISO 8601 creation timestamp. Present on list reads; absent on the create response.