Connections
Set your OAuth connection daily send limits
Own owner/admin session only, outside impersonation. Null inherits workspace limits. Zero blocks new sends. UTC counters survive token refresh and limit changes. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.
PATCH
/
connections
/
{id}
/
limits
Set your OAuth connection daily send limits
curl --request PATCH \
--url https://www.papers.bot/v1/connections/{id}/limits \
--header 'Content-Type: application/json' \
--cookie __Secure-better-auth.session_token= \
--data '
{
"dailyEmailLimit": 5000,
"dailySmsLimit": 5000,
"dailyInboxLimit": 5000,
"dailyNumberLimit": 5000
}
'import requests
url = "https://www.papers.bot/v1/connections/{id}/limits"
payload = {
"dailyEmailLimit": 5000,
"dailySmsLimit": 5000,
"dailyInboxLimit": 5000,
"dailyNumberLimit": 5000
}
headers = {
"cookie": "__Secure-better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
cookie: '__Secure-better-auth.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
dailyEmailLimit: 5000,
dailySmsLimit: 5000,
dailyInboxLimit: 5000,
dailyNumberLimit: 5000
})
};
fetch('https://www.papers.bot/v1/connections/{id}/limits', 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://www.papers.bot/v1/connections/{id}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dailyEmailLimit' => 5000,
'dailySmsLimit' => 5000,
'dailyInboxLimit' => 5000,
'dailyNumberLimit' => 5000
]),
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"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://www.papers.bot/v1/connections/{id}/limits"
payload := strings.NewReader("{\n \"dailyEmailLimit\": 5000,\n \"dailySmsLimit\": 5000,\n \"dailyInboxLimit\": 5000,\n \"dailyNumberLimit\": 5000\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "__Secure-better-auth.session_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.patch("https://www.papers.bot/v1/connections/{id}/limits")
.header("cookie", "__Secure-better-auth.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"dailyEmailLimit\": 5000,\n \"dailySmsLimit\": 5000,\n \"dailyInboxLimit\": 5000,\n \"dailyNumberLimit\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.papers.bot/v1/connections/{id}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"dailyEmailLimit\": 5000,\n \"dailySmsLimit\": 5000,\n \"dailyInboxLimit\": 5000,\n \"dailyNumberLimit\": 5000\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"retryable": true,
"details": {
"approvalId": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"retryable": true,
"details": {
"approvalId": "<string>"
}
}
}Authorizations
Better Auth session with selected organization. Mutations also require the trusted Origin header.
Path Parameters
Body
application/json
Response
Successful JSON response
The response is of type object.
⌘I
Set your OAuth connection daily send limits
curl --request PATCH \
--url https://www.papers.bot/v1/connections/{id}/limits \
--header 'Content-Type: application/json' \
--cookie __Secure-better-auth.session_token= \
--data '
{
"dailyEmailLimit": 5000,
"dailySmsLimit": 5000,
"dailyInboxLimit": 5000,
"dailyNumberLimit": 5000
}
'import requests
url = "https://www.papers.bot/v1/connections/{id}/limits"
payload = {
"dailyEmailLimit": 5000,
"dailySmsLimit": 5000,
"dailyInboxLimit": 5000,
"dailyNumberLimit": 5000
}
headers = {
"cookie": "__Secure-better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
cookie: '__Secure-better-auth.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({
dailyEmailLimit: 5000,
dailySmsLimit: 5000,
dailyInboxLimit: 5000,
dailyNumberLimit: 5000
})
};
fetch('https://www.papers.bot/v1/connections/{id}/limits', 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://www.papers.bot/v1/connections/{id}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'dailyEmailLimit' => 5000,
'dailySmsLimit' => 5000,
'dailyInboxLimit' => 5000,
'dailyNumberLimit' => 5000
]),
CURLOPT_COOKIE => "__Secure-better-auth.session_token=",
CURLOPT_HTTPHEADER => [
"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://www.papers.bot/v1/connections/{id}/limits"
payload := strings.NewReader("{\n \"dailyEmailLimit\": 5000,\n \"dailySmsLimit\": 5000,\n \"dailyInboxLimit\": 5000,\n \"dailyNumberLimit\": 5000\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "__Secure-better-auth.session_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.patch("https://www.papers.bot/v1/connections/{id}/limits")
.header("cookie", "__Secure-better-auth.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"dailyEmailLimit\": 5000,\n \"dailySmsLimit\": 5000,\n \"dailyInboxLimit\": 5000,\n \"dailyNumberLimit\": 5000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.papers.bot/v1/connections/{id}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = '__Secure-better-auth.session_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"dailyEmailLimit\": 5000,\n \"dailySmsLimit\": 5000,\n \"dailyInboxLimit\": 5000,\n \"dailyNumberLimit\": 5000\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"retryable": true,
"details": {
"approvalId": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"retryable": true,
"details": {
"approvalId": "<string>"
}
}
}