curl --request GET \
--url https://api.isnap.ai/v1/lines/{id}/config \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.isnap.ai/v1/lines/{id}/config"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.isnap.ai/v1/lines/{id}/config', 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.isnap.ai/v1/lines/{id}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.isnap.ai/v1/lines/{id}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.isnap.ai/v1/lines/{id}/config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.isnap.ai/v1/lines/{id}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"line_id": "<string>",
"config": {
"default_use_typing_indicator": true,
"quota_overflow_behavior": "queue",
"daily_new_contact_limit": 1,
"daily_known_contact_limit": 1,
"daily_total_message_limit": 1,
"hourly_message_limit": 1,
"minute_message_limit": 1,
"min_inter_message_seconds": 1,
"min_inter_new_contact_seconds": 1,
"max_queue_depth": 1,
"reply_window_hours": 1,
"reply_max_per_inbound": 1,
"daily_reply_limit": 1,
"timezone": "<string>",
"activity_curve": [
{
"hour": 11,
"weight": 1
}
]
},
"overridden_keys": [
"<string>"
],
"knobs": {
"daily_new_contact_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"daily_known_contact_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"daily_total_message_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"hourly_message_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"minute_message_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"reply_window_hours": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"reply_max_per_inbound": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"daily_reply_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
}
},
"default_activity_curve": [
{
"hour": 11,
"weight": 1
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}Get the configuration of a line
Returns the send configuration in force on a line, the keys that are overridden, and the default and bounds of eight of its limits.
curl --request GET \
--url https://api.isnap.ai/v1/lines/{id}/config \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.isnap.ai/v1/lines/{id}/config"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.isnap.ai/v1/lines/{id}/config', 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.isnap.ai/v1/lines/{id}/config",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.isnap.ai/v1/lines/{id}/config"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.isnap.ai/v1/lines/{id}/config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.isnap.ai/v1/lines/{id}/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"line_id": "<string>",
"config": {
"default_use_typing_indicator": true,
"quota_overflow_behavior": "queue",
"daily_new_contact_limit": 1,
"daily_known_contact_limit": 1,
"daily_total_message_limit": 1,
"hourly_message_limit": 1,
"minute_message_limit": 1,
"min_inter_message_seconds": 1,
"min_inter_new_contact_seconds": 1,
"max_queue_depth": 1,
"reply_window_hours": 1,
"reply_max_per_inbound": 1,
"daily_reply_limit": 1,
"timezone": "<string>",
"activity_curve": [
{
"hour": 11,
"weight": 1
}
]
},
"overridden_keys": [
"<string>"
],
"knobs": {
"daily_new_contact_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"daily_known_contact_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"daily_total_message_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"hourly_message_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"minute_message_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"reply_window_hours": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"reply_max_per_inbound": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
},
"daily_reply_limit": {
"current": 1,
"default": 1,
"min": 1,
"max": 1
}
},
"default_activity_curve": [
{
"hour": 11,
"weight": 1
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}{
"success": false,
"data": "<unknown>",
"error": {
"status": 123,
"code": "<string>",
"message": "<string>",
"retry_after": 123,
"retry_at": "<string>",
"issues": [
{
"path": [
"<string>"
],
"message": "<string>",
"code": "<string>",
"min": 123,
"max": 123
}
]
},
"trace_id": "<string>",
"request_id": "<string>"
}- Credential: an API key of the owner of the line. The operation works on any line you own. See Configuration.
- Line-scoped keys: a line-scoped key gets
403 forbiddenunless the line is in its list. - Events: none.
- Defaults: read them from
knobs, fromdefault_activity_curveand fromconfig. They depend on the line, and iSnap can change them. What each setting does is in Sending limits. - Sending hours:
config.activity_curveis the curve of the line, never empty: its override, ordefault_activity_curve. On a shared line, the curve of the number that serves the contact applies to the sends instead: see Quiet hours. - Bounds: of the eight limits in
knobs, only the five message limits of a BYOD line accept a value abovedefault, up toknobs.<key>.max. For the three reply limits, and for the five message limits of a line that is not a BYOD line,PATCH /v1/lines/{id}/configreturns403 cannot_increase_limitfor a value abovedefaultand up tomax. For each key, a value outsidemintomaxis refused before that check, on every line: with422 limit_out_of_boundsor400 validation_failed. The two spacing settings can only be raised: a value belowdefaultreturns403 cannot_decrease_delay.
Errors
| Status | error.code | When |
|---|---|---|
| 403 | forbidden | The request uses a line-scoped key, and the line is not in its list. |
| 404 | not_found | No line has this id, or you do not own the line. |
Authorizations
An API key created in the iSnap dashboard, or a trial key, sent as Authorization: Bearer <key>. An API key starts with isnap_live_ or isnap_test_; both act on the same account, lines and billing. A trial key acts on its trial only.
Path Parameters
Id of a line: line_ followed by 25 letters or digits.
^line_[0-9A-Za-z]{25}$Response
The configuration of the line.
Always true on a success response.
true The sending configuration of a line.
Show child attributes
Show child attributes
Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap.
Id of the request that produced this response: req_ followed by 25 letters or digits.