Create Condition Set Items
curl --request PUT \
--url https://api.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
[
{
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage"
},
{
"value": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"
}
]
'HttpResponse<String> response = Unirest.put("https://api.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("[\n {\n \"value\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"name\": \"Treasury cold storage\"\n },\n {\n \"value\": \"0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\"\n }\n]")
.asString();const options = {
method: 'PUT',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
value: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
name: 'Treasury cold storage'
},
{value: '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'}
])
};
fetch('https://api.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items', 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.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items",
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([
[
'value' => '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
'name' => 'Treasury cold storage'
],
[
'value' => '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$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.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items"
payload := strings.NewReader("[\n {\n \"value\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"name\": \"Treasury cold storage\"\n },\n {\n \"value\": \"0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\"\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}[
{
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
},
{
"id": "xyz789abc012def345ghi678",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
"name": null,
"created_at": 1761271537643
}
]Condition set items
Update items in a condition set
Replace all items in a condition set by condition set ID. Can add up to 100 items at once.
PUT
/
v1
/
condition_sets
/
{condition_set_id}
/
condition_set_items
Create Condition Set Items
curl --request PUT \
--url https://api.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '
[
{
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage"
},
{
"value": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"
}
]
'HttpResponse<String> response = Unirest.put("https://api.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("[\n {\n \"value\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"name\": \"Treasury cold storage\"\n },\n {\n \"value\": \"0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\"\n }\n]")
.asString();const options = {
method: 'PUT',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
value: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
name: 'Treasury cold storage'
},
{value: '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'}
])
};
fetch('https://api.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items', 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.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items",
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([
[
'value' => '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
'name' => 'Treasury cold storage'
],
[
'value' => '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json",
"privy-app-id: <privy-app-id>"
],
]);
$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.privy.io/v1/condition_sets/{condition_set_id}/condition_set_items"
payload := strings.NewReader("[\n {\n \"value\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb\",\n \"name\": \"Treasury cold storage\"\n },\n {\n \"value\": \"0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B\"\n }\n]")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
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))
}[
{
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
},
{
"id": "xyz789abc012def345ghi678",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
"name": null,
"created_at": 1761271537643
}
]Authorizations
Headers
Body
application/json
Response
200 - application/json
Array of condition set items after replacement.
Was this page helpful?

