Skip to main content
POST
/
api
/
v0
/
smart_account
/
transaction
/
create
Create Smart Account
curl --request POST \
  --url https://developer-api.squads.so/api/v0/smart_account/transaction/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "smart_account_signers": [
    {
      "address": "<string>",
      "permissions": []
    }
  ],
  "threshold": 2,
  "rent_collector": "<string>",
  "config_authority": "<string>",
  "memo": "<string>"
}
'
import requests

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

payload = {
"smart_account_signers": [
{
"address": "<string>",
"permissions": []
}
],
"threshold": 2,
"rent_collector": "<string>",
"config_authority": "<string>",
"memo": "<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_signers: [{address: '<string>', permissions: []}],
threshold: 2,
rent_collector: '<string>',
config_authority: '<string>',
memo: '<string>'
})
};

fetch('https://developer-api.squads.so/api/v0/smart_account/transaction/create', 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/create",
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_signers' => [
[
'address' => '<string>',
'permissions' => [

]
]
],
'threshold' => 2,
'rent_collector' => '<string>',
'config_authority' => '<string>',
'memo' => '<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/create"

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

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

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_signers\": [\n {\n \"address\": \"<string>\",\n \"permissions\": []\n }\n ],\n \"threshold\": 2,\n \"rent_collector\": \"<string>\",\n \"config_authority\": \"<string>\",\n \"memo\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "smart_account_address": "<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_signers
object[]
required

List of authorized keys that define the permanent configuration of your smart account. Each signer is assigned specific permissions that determine their role:

  • CAN_INITIATE: Allows creating new transactions
  • CAN_VOTE: Allows approving pending transactions
  • CAN_EXECUTE: Allows executing approved transactions
threshold
integer
required

The minimum number of required signatures to execute any action

Required range: x >= 1
rent_collector
string

Optional address where rent for executed, rejected, or cancelled transaction accounts can be reclaimed

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

Optional authority that can change the smart account configuration

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

Optional memo to include with the transaction

Response

Smart Account successfully created

smart_account_address
string
required

The wallet address of the newly created Smart Account

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