# Get the spending cap - Checkly Docs

> The overage spending cap of the account, and its overage so far in the current billing period.

Source: https://www.checklyhq.com/docs/api-reference/billing/get-the-spending-cap/

---

Get the spending cap

```
curl --request GET \
--url https://api.checklyhq.com/v1/billing/spending-cap \
--header 'Authorization: Bearer '
```

```
import requests

url = "https://api.checklyhq.com/v1/billing/spending-cap"

headers = {"Authorization": "Bearer "}

response = requests.get(url, headers=headers)

print(response.text)
```

```
const options = {method: 'GET', headers: {Authorization: 'Bearer '}};

fetch('https://api.checklyhq.com/v1/billing/spending-cap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
```

```
"https://api.checklyhq.com/v1/billing/spending-cap",
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 "
],
]);

$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.checklyhq.com/v1/billing/spending-cap"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer ")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
```

```
HttpResponse response = Unirest.get("https://api.checklyhq.com/v1/billing/spending-cap")
.header("Authorization", "Bearer ")
.asString();
```

```
require 'uri'
require 'net/http'

url = URI("https://api.checklyhq.com/v1/billing/spending-cap")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer '

response = http.request(request)
puts response.read_body
```

```
{
"spendingCapCents": 500000,
"standing": {
"measuredAt": " ",
"pools": {
"API": {
"used": 123,
"included": 123,
"overageRuns": 123,
"overageCents": 123
},
"BROWSER": {
"used": 123,
"included": 123,
"overageRuns": 123,
"overageCents": 123
}
},
"overageCents": 123,
"limit": {
"capCents": 123,
"state": "UNDER",
"closeAtCents": 123
}
}
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

Billing

# Get the spending cap

The overage spending cap of the account, and its overage so far in the current billing period.

GET

/

v1

/

billing

/

spending-cap

Get the spending cap

```
curl --request GET \
--url https://api.checklyhq.com/v1/billing/spending-cap \
--header 'Authorization: Bearer '
```

```
import requests

url = "https://api.checklyhq.com/v1/billing/spending-cap"

headers = {"Authorization": "Bearer "}

response = requests.get(url, headers=headers)

print(response.text)
```

```
const options = {method: 'GET', headers: {Authorization: 'Bearer '}};

fetch('https://api.checklyhq.com/v1/billing/spending-cap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
```

```
"https://api.checklyhq.com/v1/billing/spending-cap",
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 "
],
]);

$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.checklyhq.com/v1/billing/spending-cap"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer ")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
```

```
HttpResponse response = Unirest.get("https://api.checklyhq.com/v1/billing/spending-cap")
.header("Authorization", "Bearer ")
.asString();
```

```
require 'uri'
require 'net/http'

url = URI("https://api.checklyhq.com/v1/billing/spending-cap")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer '

response = http.request(request)
puts response.read_body
```

```
{
"spendingCapCents": 500000,
"standing": {
"measuredAt": " ",
"pools": {
"API": {
"used": 123,
"included": 123,
"overageRuns": 123,
"overageCents": 123
},
"BROWSER": {
"used": 123,
"included": 123,
"overageRuns": 123,
"overageCents": 123
}
},
"overageCents": 123,
"limit": {
"capCents": 123,
"state": "UNDER",
"closeAtCents": 123
}
}
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

#### Authorizations

Authorization

string

header

required

The Checkly Public API uses API keys to authenticate requests. You can get the API Key [here](https://app.checklyhq.com/settings/user/api-keys).
Your API key is like a password:
keep it secure!

Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.

For example, set Authorization header while using cURL: `curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"`

#### Headers

x-checkly-account

string<uuid>

Your Checkly account ID, you can find it at [https://app.checklyhq.com/settings/account/general](https://app.checklyhq.com/settings/account/general)

#### Response

Successful

spendingCapCents

integer | null

required

The overage spending cap in cents, at most 1000000 (10,000 dollars). Null is no cap. 0 allows no overage: checks stop once the included runs are used. It applies to the STARTER and TEAM plans.

Required range: `0 standing

object | null

required

Where a STARTER or TEAM account stands in its billing period: its runs, overage and spending cap. Null when nothing is judged, which is not $0 of overage: for other plans, after a renewal before the new period's runs are measured, and past the period end while the renewal is not paid.

Show child attributes

Was this page helpful?

[Suggest edits](https://github.com/checkly/docs/edit/main/api-reference/billing/get-the-spending-cap.mdx)[Raise issue](https://github.com/checkly/docs/issues/new?title=Issue%20on%20docs&body=Path:%20/api-reference/billing/get-the-spending-cap)

[Lists readable configuration values that look like inline credentials. Previous](https://www.checklyhq.com/docs/api-reference/secret-scans/lists-readable-configuration-values-that-look-like-inline-credentials)[Set the spending cap Next](https://www.checklyhq.com/docs/api-reference/billing/set-the-spending-cap)

[x](https://x.com/checklyhq)[github](https://github.com/checkly)[linkedin](https://linkedin.com/company/checkly)

[Powered by This documentation is built and hosted on Mintlify, a developer documentation platform](https://www.mintlify.com/?utm_campaign=poweredBy&utm_medium=referral&utm_source=checkly-422f444a)
