Create condition set items update intent
curl --request PUT \
--url https://api.privy.io/v1/intents/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": "<string>",
"name": "<string>"
}
]
'HttpResponse<String> response = Unirest.put("https://api.privy.io/v1/intents/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\": \"<string>\",\n \"name\": \"<string>\"\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: '<string>', name: '<string>'}])
};
fetch('https://api.privy.io/v1/intents/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/intents/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' => '<string>',
'name' => '<string>'
]
]),
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/intents/condition_sets/{condition_set_id}/condition_set_items"
payload := strings.NewReader("[\n {\n \"value\": \"<string>\",\n \"name\": \"<string>\"\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))
}{
"intent_id": "<string>",
"created_by_display_name": "<string>",
"created_at": 123,
"resource_id": "<string>",
"authorization_details": [
{
"members": [
{
"type": "user",
"user_id": "<string>",
"signed_at": 123
}
],
"threshold": 123,
"display_name": "<string>"
}
],
"status": "pending",
"custom_expiry": true,
"expires_at": 123,
"intent_type": "CONDITION_SET_ITEM",
"request_details": {
"method": "POST",
"url": "<string>",
"body": [
{
"value": "<string>",
"name": "<string>"
}
]
},
"created_by_id": "<string>",
"rejected_at": 123,
"dismissed_at": 123,
"dismissal_reason": "<string>",
"current_resource_data": {
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
},
"condition_set": {
"id": "qvah5m2hmp9abqlxdmfiht95",
"name": "Approved Recipients",
"owner_id": "asgkan0r7gi0wdbvf9cw8qio",
"created_at": 1761271537642
},
"action_result": {
"status_code": 123,
"executed_at": 123,
"authorized_by_display_name": "<string>",
"authorized_by_id": "<string>",
"response_body": [
{
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
}
],
"prior_state": [
{
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
}
]
}
}Resource update intents
Replace items in a condition set
Create an intent to replace all items in a condition set. The intent must be authorized by the condition set owner before it can be executed.
PUT
/
v1
/
intents
/
condition_sets
/
{condition_set_id}
/
condition_set_items
Create condition set items update intent
curl --request PUT \
--url https://api.privy.io/v1/intents/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": "<string>",
"name": "<string>"
}
]
'HttpResponse<String> response = Unirest.put("https://api.privy.io/v1/intents/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\": \"<string>\",\n \"name\": \"<string>\"\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: '<string>', name: '<string>'}])
};
fetch('https://api.privy.io/v1/intents/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/intents/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' => '<string>',
'name' => '<string>'
]
]),
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/intents/condition_sets/{condition_set_id}/condition_set_items"
payload := strings.NewReader("[\n {\n \"value\": \"<string>\",\n \"name\": \"<string>\"\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))
}{
"intent_id": "<string>",
"created_by_display_name": "<string>",
"created_at": 123,
"resource_id": "<string>",
"authorization_details": [
{
"members": [
{
"type": "user",
"user_id": "<string>",
"signed_at": 123
}
],
"threshold": 123,
"display_name": "<string>"
}
],
"status": "pending",
"custom_expiry": true,
"expires_at": 123,
"intent_type": "CONDITION_SET_ITEM",
"request_details": {
"method": "POST",
"url": "<string>",
"body": [
{
"value": "<string>",
"name": "<string>"
}
]
},
"created_by_id": "<string>",
"rejected_at": 123,
"dismissed_at": 123,
"dismissal_reason": "<string>",
"current_resource_data": {
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
},
"condition_set": {
"id": "qvah5m2hmp9abqlxdmfiht95",
"name": "Approved Recipients",
"owner_id": "asgkan0r7gi0wdbvf9cw8qio",
"created_at": 1761271537642
},
"action_result": {
"status_code": 123,
"executed_at": 123,
"authorized_by_display_name": "<string>",
"authorized_by_id": "<string>",
"response_body": [
{
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
}
],
"prior_state": [
{
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
}
]
}
}Authorizations
Headers
Body
application/json
Response
200 - application/json
Created condition set items update intent.
Response for an intent that adds or replaces condition set items
Current state of the targeted condition set item. Undefined for intents that add or replace items, or if the item was deleted
Show child attributes
Show child attributes
Example:
{
"id": "abc123xyz456def789ghi012",
"condition_set_id": "qvah5m2hmp9abqlxdmfiht95",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"name": "Treasury cold storage",
"created_at": 1761271537642
}
Was this page helpful?

