cURL
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulations/cc37d526-f8d8-4c28-a9a8-0268a25d1ef2/unshare' \
-X 'POST' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--compressedimport requests
url = "https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare"
headers = {"X-Access-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Access-Key': '<api-key>'}};
fetch('https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare', 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.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Access-Key: <api-key>"
],
]);
$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.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Access-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare")
.header("X-Access-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Simulator
Disable simulation sharing
Call the unshare endpoint to disable public sharing for a simulated transaction from a specific account or project. You need to provide the ID of the simulated transaction.
Learn more about sharing transactions.
POST
/
v1
/
account
/
{accountSlug}
/
project
/
{projectSlug}
/
simulations
/
{simulationId}
/
unshare
cURL
curl 'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulations/cc37d526-f8d8-4c28-a9a8-0268a25d1ef2/unshare' \
-X 'POST' \
-H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
-H 'content-type: application/json' \
--compressedimport requests
url = "https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare"
headers = {"X-Access-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Access-Key': '<api-key>'}};
fetch('https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare', 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.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Access-Key: <api-key>"
],
]);
$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.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Access-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare")
.header("X-Access-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tenderly.co/api/v1/account/{accountSlug}/project/{projectSlug}/simulations/{simulationId}/unshare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Access-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "bad_request",
"message": "Bad request input parameters"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "unauthorized",
"message": "Unauthorized"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "insufficient_permissions",
"message": "Insufficient permissions"
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "resource_not_found",
"message": "The resource you requested could not be found."
}
}{
"error": {
"id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
"slug": "internal_server_error",
"message": "Internal server error"
}
}Authorizations
ApiKeyAuthBearerAuth
An API key is a token that a client provides when making API calls. Send it as the X-Access-Key request header on any endpoint:
curl '<API_ENDPOINT>' \ -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \ ...
Learn how to generate API access tokens at Tenderly Docs.
Path Parameters
Account slug of the user
Project slug of the account
Simulation Id to get info for
Response
The simulation was unshared successfully.
Was this page helpful?
⌘I