Reject a Trust Center access request
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.vendorica.com/v1/trust-center/access-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"reason\": \"example\", \"reference\": \"example\" }") { 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.vendorica.com/v1/trust-center/access-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject"
payload := strings.NewReader("{ \"reason\": \"example\", \"reference\": \"example\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <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, "{ \"reason\": \"example\", \"reference\": \"example\" }");Request request = new Request.Builder() .url("https://api.vendorica.com/v1/trust-center/access-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();const url = 'https://api.vendorica.com/v1/trust-center/access-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"reason":"example","reference":"example"}'};
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.vendorica.com/v1/trust-center/access-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject";
let payload = json!({ "reason": "example", "reference": "example" });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <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.vendorica.com/v1/trust-center/access-requests/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reject \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "reason": "example", "reference": "example" }'Rejects a PENDING request. reason is required, exactly as it is in the app, and is an INTERNAL note: it is stored on the request for your organization’s reviewers and never sent to the visitor. Nothing is sent to the visitor at all — a rejected requester is answered exactly as a pending one is, so the decision cannot be probed from outside. reference (optional, up to 500 characters) is your own ticket key or URL, shown beside the decision in the app and recorded in the audit trail. The decision is attributed to this API key, never to a person. Strict body.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "reason": "example", "reference": "example"}Responses
Section titled “Responses”Success
object
object
Example
{ "success": true, "data": { "id": "1eeb308b-353d-47ab-87aa-2d78dce59a34", "organizationId": "6f090efa-c342-4068-8cc9-5871d5f6402f", "visitorEmail": "string", "visitorName": "string", "companyName": "string", "reason": "string", "rejectionReason": "string", "status": "string", "decidedByUserId": "16d7f813-06fb-42c3-8dee-d44042f8270c", "decidedByApiClientId": "1d22ad83-5e97-4213-87ea-9f307a589edc", "decidedAt": "2026-08-19T09:41:12.004Z", "decidedVia": "app", "decisionReference": "string", "autoRuleId": "bda60f9c-2a6a-45ba-8ec9-b23bd683992d", "visitorTokenId": "15446676-eead-489c-89c9-524da0ec88eb", "requestCountryCode": "string", "requestCity": "string", "requestedResourceIds": [ "6dd31592-734a-41b0-81fa-7cc97a5276b7" ], "createdAt": "2026-08-19T09:41:12.004Z" }, "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H", "message": "string"}Validation error
object
Example
{ "success": false, "error": "Bad request", "code": "BAD_REQUEST", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}Unauthorized
object
Example
{ "success": false, "error": "Unauthorized", "code": "UNAUTHORIZED", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}Forbidden — missing scope
object
Example
{ "success": false, "error": "Forbidden", "code": "FORBIDDEN", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}Not found
object
Example
{ "success": false, "error": "Resource not found", "code": "NOT_FOUND", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}The request is no longer pending — a person, a rule or an earlier call decided it first (ACCESS_REQUEST_ALREADY_DECIDED). Nothing was changed and no credential was minted. GET the request to see what it now says; this is the answer a RETRY of a decision that already landed receives.
object
Example
{ "success": false}Unrecognised or invalid field — the response names it
object
Example
{ "success": false, "error": "Validation failed", "code": "VALIDATION_ERROR", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}Rate limit exceeded
object
Example
{ "success": false, "error": "Too many requests", "code": "TOO_MANY_REQUESTS", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}