Reject intent
curl --request POST \
--url https://api.privy.io/v1/intents/{intent_id}/reject \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/intents/{intent_id}/reject")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'POST',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/intents/{intent_id}/reject', 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/{intent_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/intents/{intent_id}/reject"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"intent_id": "clpq1234567890abcdefghij",
"intent_type": "RPC",
"created_by_display_name": "developer@example.com",
"created_by_id": "did:privy:clabcd123",
"created_at": 1741834854578,
"resource_id": "xs76o3pi0v5syd62ui1wmijw",
"authorization_details": [
{
"members": [
{
"type": "user",
"user_id": "did:privy:clabcd123",
"signed_at": null
}
],
"threshold": 1,
"display_name": "Admin Key Quorum"
}
],
"status": "pending",
"custom_expiry": false,
"expires_at": 1741921254578,
"request_details": {
"method": "POST",
"url": "https://api.privy.io/v1/wallets/xs76o3pi0v5syd62ui1wmijw/rpc",
"body": {
"method": "eth_sendTransaction",
"caip2": "eip155:8453",
"chain_type": "ethereum",
"params": {
"transaction": {
"to": "0x0000000000000000000000000000000000000000",
"value": 1
}
}
}
}
}Usage
Reject intent
Reject a pending intent, preventing it from being executed. Can be called by the intent creator (via user token) or with the app secret.
POST
/
v1
/
intents
/
{intent_id}
/
reject
Reject intent
curl --request POST \
--url https://api.privy.io/v1/intents/{intent_id}/reject \
--header 'Authorization: Basic <encoded-value>' \
--header 'privy-app-id: <privy-app-id>'HttpResponse<String> response = Unirest.post("https://api.privy.io/v1/intents/{intent_id}/reject")
.header("privy-app-id", "<privy-app-id>")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {
method: 'POST',
headers: {'privy-app-id': '<privy-app-id>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api.privy.io/v1/intents/{intent_id}/reject', 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/{intent_id}/reject",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.privy.io/v1/intents/{intent_id}/reject"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("privy-app-id", "<privy-app-id>")
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"intent_id": "clpq1234567890abcdefghij",
"intent_type": "RPC",
"created_by_display_name": "developer@example.com",
"created_by_id": "did:privy:clabcd123",
"created_at": 1741834854578,
"resource_id": "xs76o3pi0v5syd62ui1wmijw",
"authorization_details": [
{
"members": [
{
"type": "user",
"user_id": "did:privy:clabcd123",
"signed_at": null
}
],
"threshold": 1,
"display_name": "Admin Key Quorum"
}
],
"status": "pending",
"custom_expiry": false,
"expires_at": 1741921254578,
"request_details": {
"method": "POST",
"url": "https://api.privy.io/v1/wallets/xs76o3pi0v5syd62ui1wmijw/rpc",
"body": {
"method": "eth_sendTransaction",
"caip2": "eip155:8453",
"chain_type": "ethereum",
"params": {
"transaction": {
"to": "0x0000000000000000000000000000000000000000",
"value": 1
}
}
}
}
}Authorizations
Response
200 - application/json
Rejected intent.
- RpcIntentResponse
- TransferIntentResponse
- RawSignIntentResponse
- WalletIntentResponse
- PolicyIntentResponse
- RuleIntentResponse
- KeyQuorumIntentResponse
- ConditionSetIntentResponse
- ConditionSetItemIntentResponse
Response for an RPC intent
Current state of the wallet before any changes. If undefined, the resource was deleted and no longer exists
Show child attributes
Show child attributes
Example:
{
"id": "id2tptkqrxd39qo9j423etij",
"address": "0xF1DBff66C993EE895C8cb176c30b07A559d76496",
"display_name": "Treasury",
"external_id": "my-order-123",
"chain_type": "ethereum",
"policy_ids": [],
"additional_signers": [],
"owner_id": "rkiz0ivz254drv1xw982v3jq",
"parent_wallet_id": null,
"entity": {
"id": "jorpjo4rfxj62nx1itt8y1zt",
"type": "user"
},
"created_at": 1741834854578,
"exported_at": null,
"imported_at": null,
"archived_at": null
}
Was this page helpful?

