Updates the current organization's usage budgets. Null removes a budget.
curl --request PUT \
--url https://api.leadping.ai/wallets/me/spend-limits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dailyLimit": 123,
"monthlyLimit": 123
}
'import requests
url = "https://api.leadping.ai/wallets/me/spend-limits"
payload = {
"dailyLimit": 123,
"monthlyLimit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/wallets/me/spend-limits");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"dailyLimit\": 123,\n \"monthlyLimit\": 123\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.leadping.ai/wallets/me/spend-limits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dailyLimit\": 123,\n \"monthlyLimit\": 123\n}")
.asString();const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({dailyLimit: 123, monthlyLimit: 123})
};
fetch('https://api.leadping.ai/wallets/me/spend-limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/wallets/me/spend-limits"
payload := strings.NewReader("{\n \"dailyLimit\": 123,\n \"monthlyLimit\": 123\n}")
req, _ := http.NewRequest("PUT", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/wallets/me/spend-limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'dailyLimit' => 123,
'monthlyLimit' => 123
]),
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;
}{
"dailyLimit": 123,
"monthlyLimit": 123,
"dailySpent": 123,
"monthlySpent": 123,
"reserved": 123,
"dailyResetsAt": "2023-11-07T05:31:56Z",
"monthlyResetsAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Wallets
Updates the current organization's usage budgets. Null removes a budget.
Sets the current organization’s daily and monthly usage limits in USD and returns the updated limits and UTC progress. A null limit removes that budget; a zero limit stops new paid usage.
PUT
/
wallets
/
me
/
spend-limits
Updates the current organization's usage budgets. Null removes a budget.
curl --request PUT \
--url https://api.leadping.ai/wallets/me/spend-limits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dailyLimit": 123,
"monthlyLimit": 123
}
'import requests
url = "https://api.leadping.ai/wallets/me/spend-limits"
payload = {
"dailyLimit": 123,
"monthlyLimit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.leadping.ai/wallets/me/spend-limits");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"dailyLimit\": 123,\n \"monthlyLimit\": 123\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.leadping.ai/wallets/me/spend-limits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dailyLimit\": 123,\n \"monthlyLimit\": 123\n}")
.asString();const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({dailyLimit: 123, monthlyLimit: 123})
};
fetch('https://api.leadping.ai/wallets/me/spend-limits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.leadping.ai/wallets/me/spend-limits"
payload := strings.NewReader("{\n \"dailyLimit\": 123,\n \"monthlyLimit\": 123\n}")
req, _ := http.NewRequest("PUT", 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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leadping.ai/wallets/me/spend-limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'dailyLimit' => 123,
'monthlyLimit' => 123
]),
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;
}{
"dailyLimit": 123,
"monthlyLimit": 123,
"dailySpent": 123,
"monthlySpent": 123,
"reserved": 123,
"dailyResetsAt": "2023-11-07T05:31:56Z",
"monthlyResetsAt": "2023-11-07T05:31:56Z"
}{
"type": "about:blank",
"title": "Unauthorized",
"status": 401,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "The request could not be completed."
}{
"type": "about:blank",
"title": "Too Many Requests",
"status": 429,
"detail": "The request could not be completed."
}Authorizations
Authorization header using the Bearer scheme. Accepted values are Leadping user JWT access tokens and WorkOS organization API keys beginning with sk_.
Body
application/jsontext/jsonapplication/*+json
The daily and monthly usage limits to apply.
Response
Returns the updated usage limits and progress.

