Create Condition Set Items
curl --request POST \
--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"
},
{
"value": "0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2"
},
{
"value": "0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93"
}
]
'HttpResponse<String> response = Unirest.post("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 },\n {\n \"value\": \"0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2\"\n },\n {\n \"value\": \"0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93\"\n }\n]")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{value: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'},
{value: '0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2'},
{value: '0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93'}
])
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'value' => '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
],
[
'value' => '0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2'
],
[
'value' => '0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93'
]
]),
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 },\n {\n \"value\": \"0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2\"\n },\n {\n \"value\": \"0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93\"\n }\n]")
req, _ := http.NewRequest("POST", 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",
"created_at": 1761271537642
},
{
"id": "def456ghi789jkl012mno345",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2",
"created_at": 1761271537643
},
{
"id": "pqr678stu901vwx234yza567",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93",
"created_at": 1761271537644
}
]Condition set items
Add items to a condition set
Add new items to a condition set. Can add up to 100 items at once.
POST
/
v1
/
condition_sets
/
{condition_set_id}
/
condition_set_items
Create Condition Set Items
curl --request POST \
--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"
},
{
"value": "0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2"
},
{
"value": "0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93"
}
]
'HttpResponse<String> response = Unirest.post("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 },\n {\n \"value\": \"0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2\"\n },\n {\n \"value\": \"0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93\"\n }\n]")
.asString();const options = {
method: 'POST',
headers: {
'privy-app-id': '<privy-app-id>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{value: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'},
{value: '0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2'},
{value: '0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93'}
])
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'value' => '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb'
],
[
'value' => '0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2'
],
[
'value' => '0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93'
]
]),
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 },\n {\n \"value\": \"0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2\"\n },\n {\n \"value\": \"0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93\"\n }\n]")
req, _ := http.NewRequest("POST", 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",
"created_at": 1761271537642
},
{
"id": "def456ghi789jkl012mno345",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0xB00F0759DbeeF5E543Cc3E3B07A6442F5f3928a2",
"created_at": 1761271537643
},
{
"id": "pqr678stu901vwx234yza567",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x5B8b13e8f3E6Ec888e88C77cf039EB6281F21D93",
"created_at": 1761271537644
}
]Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Request authorization signature. If multiple signatures are required, they should be comma separated.
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.
Path Parameters
Required string length:
24Body
application/json
Required array length:
1 - 100 elementsMinimum string length:
1Response
200 - application/json
Array of created condition set items.
Unique ID of the created condition set item.
Required string length:
24Unique ID of the condition set this item belongs to.
Required string length:
24The value stored in this condition set item.
Unix timestamp of when the condition set item was created in milliseconds.
Was this page helpful?
⌘I

