cURL
curl --request POST \
--url https://app-api.aide.app/v1/sla-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"appliesTo": [
{
"field": "channel"
}
],
"targets": {
"firstResponseMinutes": 64800,
"nextResponseMinutes": 64800,
"resolutionMinutes": 64800
},
"scheduleId": "<string>",
"pauseOn": [],
"imminentThresholdPct": 50,
"onImminent": [
{
"type": "assign_team",
"teamId": "<string>"
}
],
"onBreach": [
{
"type": "assign_team",
"teamId": "<string>"
}
]
}
'import requests
url = "https://app-api.aide.app/v1/sla-policies"
payload = {
"name": "<string>",
"appliesTo": [{ "field": "channel" }],
"targets": {
"firstResponseMinutes": 64800,
"nextResponseMinutes": 64800,
"resolutionMinutes": 64800
},
"scheduleId": "<string>",
"pauseOn": [],
"imminentThresholdPct": 50,
"onImminent": [
{
"type": "assign_team",
"teamId": "<string>"
}
],
"onBreach": [
{
"type": "assign_team",
"teamId": "<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>',
appliesTo: [{field: 'channel'}],
targets: {
firstResponseMinutes: 64800,
nextResponseMinutes: 64800,
resolutionMinutes: 64800
},
scheduleId: '<string>',
pauseOn: [],
imminentThresholdPct: 50,
onImminent: [{type: 'assign_team', teamId: '<string>'}],
onBreach: [{type: 'assign_team', teamId: '<string>'}]
})
};
fetch('https://app-api.aide.app/v1/sla-policies', 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://app-api.aide.app/v1/sla-policies",
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>',
'appliesTo' => [
[
'field' => 'channel'
]
],
'targets' => [
'firstResponseMinutes' => 64800,
'nextResponseMinutes' => 64800,
'resolutionMinutes' => 64800
],
'scheduleId' => '<string>',
'pauseOn' => [
],
'imminentThresholdPct' => 50,
'onImminent' => [
[
'type' => 'assign_team',
'teamId' => '<string>'
]
],
'onBreach' => [
[
'type' => 'assign_team',
'teamId' => '<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://app-api.aide.app/v1/sla-policies"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"appliesTo\": [\n {\n \"field\": \"channel\"\n }\n ],\n \"targets\": {\n \"firstResponseMinutes\": 64800,\n \"nextResponseMinutes\": 64800,\n \"resolutionMinutes\": 64800\n },\n \"scheduleId\": \"<string>\",\n \"pauseOn\": [],\n \"imminentThresholdPct\": 50,\n \"onImminent\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ],\n \"onBreach\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<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://app-api.aide.app/v1/sla-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"appliesTo\": [\n {\n \"field\": \"channel\"\n }\n ],\n \"targets\": {\n \"firstResponseMinutes\": 64800,\n \"nextResponseMinutes\": 64800,\n \"resolutionMinutes\": 64800\n },\n \"scheduleId\": \"<string>\",\n \"pauseOn\": [],\n \"imminentThresholdPct\": 50,\n \"onImminent\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ],\n \"onBreach\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app-api.aide.app/v1/sla-policies")
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 \"appliesTo\": [\n {\n \"field\": \"channel\"\n }\n ],\n \"targets\": {\n \"firstResponseMinutes\": 64800,\n \"nextResponseMinutes\": 64800,\n \"resolutionMinutes\": 64800\n },\n \"scheduleId\": \"<string>\",\n \"pauseOn\": [],\n \"imminentThresholdPct\": 50,\n \"onImminent\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ],\n \"onBreach\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"object": "sla_policy",
"name": "<string>",
"createdAt": "<string>",
"id": "<string>",
"updatedAt": "<string>",
"position": 123,
"scheduleId": "<string>",
"enabled": true,
"targets": {
"firstResponseMinutes": 123,
"nextResponseMinutes": 123,
"resolutionMinutes": 123
},
"aideReplyCountsAsFirstResponse": true,
"appliesTo": [
{
"value": "<string>",
"op": "inside",
"field": "business_hours"
}
],
"businessHoursOnly": true,
"imminentThresholdPct": 123,
"onBreach": [
{
"id": "<string>",
"channel": "email",
"type": "notify",
"target": "member"
}
],
"onImminent": [
{
"id": "<string>",
"channel": "email",
"type": "notify",
"target": "member"
}
],
"pauseOn": [
"on_hold"
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}SlaPolicy
Post v1sla policies
POST
/
v1
/
sla-policies
cURL
curl --request POST \
--url https://app-api.aide.app/v1/sla-policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"appliesTo": [
{
"field": "channel"
}
],
"targets": {
"firstResponseMinutes": 64800,
"nextResponseMinutes": 64800,
"resolutionMinutes": 64800
},
"scheduleId": "<string>",
"pauseOn": [],
"imminentThresholdPct": 50,
"onImminent": [
{
"type": "assign_team",
"teamId": "<string>"
}
],
"onBreach": [
{
"type": "assign_team",
"teamId": "<string>"
}
]
}
'import requests
url = "https://app-api.aide.app/v1/sla-policies"
payload = {
"name": "<string>",
"appliesTo": [{ "field": "channel" }],
"targets": {
"firstResponseMinutes": 64800,
"nextResponseMinutes": 64800,
"resolutionMinutes": 64800
},
"scheduleId": "<string>",
"pauseOn": [],
"imminentThresholdPct": 50,
"onImminent": [
{
"type": "assign_team",
"teamId": "<string>"
}
],
"onBreach": [
{
"type": "assign_team",
"teamId": "<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>',
appliesTo: [{field: 'channel'}],
targets: {
firstResponseMinutes: 64800,
nextResponseMinutes: 64800,
resolutionMinutes: 64800
},
scheduleId: '<string>',
pauseOn: [],
imminentThresholdPct: 50,
onImminent: [{type: 'assign_team', teamId: '<string>'}],
onBreach: [{type: 'assign_team', teamId: '<string>'}]
})
};
fetch('https://app-api.aide.app/v1/sla-policies', 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://app-api.aide.app/v1/sla-policies",
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>',
'appliesTo' => [
[
'field' => 'channel'
]
],
'targets' => [
'firstResponseMinutes' => 64800,
'nextResponseMinutes' => 64800,
'resolutionMinutes' => 64800
],
'scheduleId' => '<string>',
'pauseOn' => [
],
'imminentThresholdPct' => 50,
'onImminent' => [
[
'type' => 'assign_team',
'teamId' => '<string>'
]
],
'onBreach' => [
[
'type' => 'assign_team',
'teamId' => '<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://app-api.aide.app/v1/sla-policies"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"appliesTo\": [\n {\n \"field\": \"channel\"\n }\n ],\n \"targets\": {\n \"firstResponseMinutes\": 64800,\n \"nextResponseMinutes\": 64800,\n \"resolutionMinutes\": 64800\n },\n \"scheduleId\": \"<string>\",\n \"pauseOn\": [],\n \"imminentThresholdPct\": 50,\n \"onImminent\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ],\n \"onBreach\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<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://app-api.aide.app/v1/sla-policies")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"appliesTo\": [\n {\n \"field\": \"channel\"\n }\n ],\n \"targets\": {\n \"firstResponseMinutes\": 64800,\n \"nextResponseMinutes\": 64800,\n \"resolutionMinutes\": 64800\n },\n \"scheduleId\": \"<string>\",\n \"pauseOn\": [],\n \"imminentThresholdPct\": 50,\n \"onImminent\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ],\n \"onBreach\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app-api.aide.app/v1/sla-policies")
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 \"appliesTo\": [\n {\n \"field\": \"channel\"\n }\n ],\n \"targets\": {\n \"firstResponseMinutes\": 64800,\n \"nextResponseMinutes\": 64800,\n \"resolutionMinutes\": 64800\n },\n \"scheduleId\": \"<string>\",\n \"pauseOn\": [],\n \"imminentThresholdPct\": 50,\n \"onImminent\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ],\n \"onBreach\": [\n {\n \"type\": \"assign_team\",\n \"teamId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"object": "sla_policy",
"name": "<string>",
"createdAt": "<string>",
"id": "<string>",
"updatedAt": "<string>",
"position": 123,
"scheduleId": "<string>",
"enabled": true,
"targets": {
"firstResponseMinutes": 123,
"nextResponseMinutes": 123,
"resolutionMinutes": 123
},
"aideReplyCountsAsFirstResponse": true,
"appliesTo": [
{
"value": "<string>",
"op": "inside",
"field": "business_hours"
}
],
"businessHoursOnly": true,
"imminentThresholdPct": 123,
"onBreach": [
{
"id": "<string>",
"channel": "email",
"type": "notify",
"target": "member"
}
],
"onImminent": [
{
"id": "<string>",
"channel": "email",
"type": "notify",
"target": "member"
}
],
"pauseOn": [
"on_hold"
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"type": "api_error",
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"fields": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}
}Authorizations
An access token, bound to one account.
Body
application/json
Required string length:
1 - 120Available options:
1, 1, true, true, on, 0, 0, false, false Maximum array length:
30- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
1, 1, true, true, on, 0, 0, false, false Required string length:
1 - 64Available options:
1, 1, true, true, on, 0, 0, false, false Maximum array length:
3Available options:
waiting_on_customer, on_hold, snoozed Required range:
1 <= x <= 99Maximum array length:
30- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Maximum array length:
30- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes