Skip to main content
POST
/
api
/
v0
/
smart_account
/
transaction
/
threshold
/
update
Update Threshold
curl --request POST \
  --url https://developer-api.squads.so/api/v0/smart_account/transaction/threshold/update \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "smart_account_address": "<string>",
  "threshold": 2,
  "transaction_signers": [
    "<string>"
  ],
  "fee_config": {
    "payer_address": "<string>"
  }
}
'
import requests

url = "https://developer-api.squads.so/api/v0/smart_account/transaction/threshold/update"

payload = {
"smart_account_address": "<string>",
"threshold": 2,
"transaction_signers": ["<string>"],
"fee_config": { "payer_address": "<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({
smart_account_address: '<string>',
threshold: 2,
transaction_signers: ['<string>'],
fee_config: {payer_address: '<string>'}
})
};

fetch('https://developer-api.squads.so/api/v0/smart_account/transaction/threshold/update', 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://developer-api.squads.so/api/v0/smart_account/transaction/threshold/update",
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([
'smart_account_address' => '<string>',
'threshold' => 2,
'transaction_signers' => [
'<string>'
],
'fee_config' => [
'payer_address' => '<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://developer-api.squads.so/api/v0/smart_account/transaction/threshold/update"

payload := strings.NewReader("{\n \"smart_account_address\": \"<string>\",\n \"threshold\": 2,\n \"transaction_signers\": [\n \"<string>\"\n ],\n \"fee_config\": {\n \"payer_address\": \"<string>\"\n }\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://developer-api.squads.so/api/v0/smart_account/transaction/threshold/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"smart_account_address\": \"<string>\",\n \"threshold\": 2,\n \"transaction_signers\": [\n \"<string>\"\n ],\n \"fee_config\": {\n \"payer_address\": \"<string>\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://developer-api.squads.so/api/v0/smart_account/transaction/threshold/update")

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 \"smart_account_address\": \"<string>\",\n \"threshold\": 2,\n \"transaction_signers\": [\n \"<string>\"\n ],\n \"fee_config\": {\n \"payer_address\": \"<string>\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "transaction": "<string>",
  "fee": {
    "amount": "<string>",
    "amount_decimal": "<string>",
    "currency": "<string>",
    "sol_equivalent": {
      "amount": "<string>",
      "amount_decimal": "<string>"
    }
  }
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Authorizations

Authorization
string
header
required

Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"

Headers

x-squads-network
enum<string>
default:mainnet

Specifies which Solana network to use. Defaults to 'mainnet' if not provided. Valid values are 'devnet' or 'mainnet'.

Available options:
devnet,
mainnet

Body

application/json
smart_account_address
string
required

The address of the Smart Account

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
threshold
integer
required

The new threshold value

Required range: x >= 1
transaction_signers
string[]
required

List of addresses that will sign this transaction

Pattern: ^[1-9A-HJ-NP-Za-km-z]{32,44}$
fee_config
object
required

Response

Threshold successfully updated

transaction
string
required

The transaction encoded in base64

fee
object
required