curl --request POST \
--url https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>"
}
'import requests
url = "https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral"
payload = {
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<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({idempotencyKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: '<string>'})
};
fetch('https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral', 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-sandbox.circle.com/v1/borrow/loans/{id}/collateral",
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([
'idempotencyKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => '<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://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral"
payload := strings.NewReader("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\"\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://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral")
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 \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "f6a7b8c9-d012-3456-efab-456789012345",
"jobType": "add_collateral",
"status": "received",
"amount": "0.01",
"asset": "CIRBTC",
"collateralAmount": "0.01",
"collateralAsset": "CIRBTC",
"toAddress": "0x33333aea097c193e66081E930c33020272b33333",
"loanId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"oraclePrice": "67234.51",
"createDate": "2026-06-25T10:15:00.000Z",
"updateDate": "2026-06-25T10:15:00.000Z"
}
}{
"code": 400,
"message": "Bad request."
}{
"code": 401,
"message": "Malformed authorization."
}{
"code": 3,
"message": "Forbidden"
}{
"code": 404,
"message": "Not found."
}{
"code": 409,
"message": "Conflicts with another request."
}Add collateral
Adds collateral to an existing loan, typically in response to a margin call. Asynchronous. Circle builds, signs, and submits the UserOperation for you.
curl --request POST \
--url https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<string>"
}
'import requests
url = "https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral"
payload = {
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": "<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({idempotencyKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount: '<string>'})
};
fetch('https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral', 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-sandbox.circle.com/v1/borrow/loans/{id}/collateral",
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([
'idempotencyKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => '<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://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral"
payload := strings.NewReader("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\"\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://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.circle.com/v1/borrow/loans/{id}/collateral")
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 \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "f6a7b8c9-d012-3456-efab-456789012345",
"jobType": "add_collateral",
"status": "received",
"amount": "0.01",
"asset": "CIRBTC",
"collateralAmount": "0.01",
"collateralAsset": "CIRBTC",
"toAddress": "0x33333aea097c193e66081E930c33020272b33333",
"loanId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"oraclePrice": "67234.51",
"createDate": "2026-06-25T10:15:00.000Z",
"updateDate": "2026-06-25T10:15:00.000Z"
}
}{
"code": 400,
"message": "Bad request."
}{
"code": 401,
"message": "Malformed authorization."
}{
"code": 3,
"message": "Forbidden"
}{
"code": 404,
"message": "Not found."
}{
"code": 409,
"message": "Conflicts with another request."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Universally unique identifier (UUID v4) of a resource.
"b3d9d2d5-4c12-4946-a09d-953e82fae2b0"
Body
Request to add collateral to an existing loan position.
Idempotency key
(UUID v4) for this request. Reusing it with a different body returns
409 Conflict.
Amount of collateral to add, in raw onchain uint256 base units (for
example, "1500000" for 1.5 USDC). Decimal-integer string. Must be positive.
Response
Request to add collateral accepted. Poll the returned job to track its status.
An async onchain operation. Each job represents one of: borrow, repay,
add collateral, wallet setup, owner change, or residual withdraw. Poll
this resource until the job reaches a terminal status (completed,
failed, or approval_rejected). Fields that do not apply to the current
status or job type are omitted rather than returned as null.
Show child attributes
Show child attributes
{
"id": "b3d9d2d5-4c12-4946-a09d-953e82fae2b0",
"jobType": "borrow",
"status": "completed",
"amount": "1000.00",
"asset": "USD",
"collateralAmount": "0.05",
"collateralAsset": "CIRBTC",
"toAddress": "0x5a0b4a11d3f9b2c1e8a7d6c5b4a39281f0e1d2c3",
"loanId": "fc988ed5-c129-4f70-a064-e5beb7eb8e32",
"transferId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"oraclePrice": "67234.51",
"userOpHash": "0x9f8e7d6c5b4a39281f0e1d2c3b4a5968778695a4b3c2d1e0f9a8b7c6d5e4f3a2",
"txHash": "0x1a2b3c4d5e6f70819293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f9",
"createDate": "2026-06-20T14:20:00.000Z",
"updateDate": "2026-06-20T14:22:00.000Z"
}
Was this page helpful?