Unvouch a V2 vouch via Ethos Everywhere wallet
using System.Net.Http.Headers;var clientHandler = new HttpClientHandler{ UseCookies = false,};var client = new HttpClient(clientHandler);var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouch"), Headers = { { "cookie", "ethos-access-token=<ethos-access-token>" }, }, Content = new StringContent("{ \"vouchId\": 1, \"isHealthy\": true, \"waitForTxTimeoutSeconds\": 5 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouch"
payload := strings.NewReader("{ \"vouchId\": 1, \"isHealthy\": true, \"waitForTxTimeoutSeconds\": 5 }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "ethos-access-token=<ethos-access-token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"vouchId\": 1, \"isHealthy\": true, \"waitForTxTimeoutSeconds\": 5 }");Request request = new Request.Builder() .url("https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouch") .post(body) .addHeader("cookie", "ethos-access-token=<ethos-access-token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouch', headers: { cookie: 'ethos-access-token=<ethos-access-token>', 'Content-Type': 'application/json' }, data: {vouchId: 1, isHealthy: true, waitForTxTimeoutSeconds: 5}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouch';const options = { method: 'POST', headers: { cookie: 'ethos-access-token=<ethos-access-token>', 'Content-Type': 'application/json' }, body: '{"vouchId":1,"isHealthy":true,"waitForTxTimeoutSeconds":5}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouch";
let payload = json!({ "vouchId": 1, "isHealthy": true, "waitForTxTimeoutSeconds": 5 });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("cookie", "ethos-access-token=<ethos-access-token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouch \ --header 'Content-Type: application/json' \ --cookie ethos-access-token=<ethos-access-token> \ --data '{ "vouchId": 1, "isHealthy": true, "waitForTxTimeoutSeconds": 5 }'wget --quiet \ --method POST \ --header 'cookie: ethos-access-token=<ethos-access-token>' \ --header 'Content-Type: application/json' \ --body-data '{ "vouchId": 1, "isHealthy": true, "waitForTxTimeoutSeconds": 5 }' \ --output-document \ - https://api.ethos.network/api/v2/wallets/privy/vouches-v2/unvouchWithdraws the full balance of an EthosVouchV2 vouch and archives it using the user’s Ethos Everywhere wallet. No permit is required — the contract refunds the balance minus the exit fee to the author. Restricted to vouches authored by the caller’s EEW. When isHealthy=false, dispatches to unvouchUnhealthy (combo unvouch + markUnhealthy). > ⚠️ Warning: This is a beta endpoint. It is not guaranteed to be stable and may change or break without notice.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Timeout in seconds to wait for the transaction to be processed by Ethos. Defaults to 5 seconds. Set to 0 to skip waiting.
Responses
Section titled “Responses”Successful response
object
0x-prefixed 32-byte transaction hash (keccak256)
Whether the v2 unvouch transaction has been received & processed by Ethos.
Example generated
{ "hash": "example", "processed": true}Invalid input data
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "BAD_REQUEST", "message": "Invalid input data", "issues": []}Authorization not provided
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNAUTHORIZED", "message": "Authorization not provided", "issues": []}Insufficient access
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "FORBIDDEN", "message": "Insufficient access", "issues": []}Internal server error
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": []}