curl --request POST \
--url https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline', 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.useanima.sh/v1/provisioning-requests/{requestId}/decline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.useanima.sh/v1/provisioning-requests/{requestId}/decline"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"resource": "VAULT",
"reason": "<string>",
"status": "PENDING",
"options": {
"countryCode": "<string>",
"areaCode": "<string>"
},
"permission": {
"procedurePath": "<string>",
"readOnly": true,
"argumentPreview": {}
},
"expiresAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedNote": "<string>",
"provisionedId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "Declining a provisioning request requires master authority.",
"data": "<unknown>"
}{
"defined": true,
"code": "NOT_FOUND",
"status": 404,
"message": "No such provisioning request in this organization.",
"data": "<unknown>"
}{
"defined": true,
"code": "CONFLICT",
"status": 409,
"message": "This request is no longer pending.",
"data": "<unknown>"
}Post provisioning requests decline
curl --request POST \
--url https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline', 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.useanima.sh/v1/provisioning-requests/{requestId}/decline",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.useanima.sh/v1/provisioning-requests/{requestId}/decline"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/provisioning-requests/{requestId}/decline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"requestId": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"resource": "VAULT",
"reason": "<string>",
"status": "PENDING",
"options": {
"countryCode": "<string>",
"areaCode": "<string>"
},
"permission": {
"procedurePath": "<string>",
"readOnly": true,
"argumentPreview": {}
},
"expiresAt": "2023-11-07T05:31:56Z",
"decidedAt": "2023-11-07T05:31:56Z",
"decidedNote": "<string>",
"provisionedId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "Declining a provisioning request requires master authority.",
"data": "<unknown>"
}{
"defined": true,
"code": "NOT_FOUND",
"status": 404,
"message": "No such provisioning request in this organization.",
"data": "<unknown>"
}{
"defined": true,
"code": "CONFLICT",
"status": 409,
"message": "This request is no longer pending.",
"data": "<unknown>"
}Authorizations
JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer
Path Parameters
Provisioning request identifier
1Body
Response
OK
A provisioning request and its current state
Unique provisioning request identifier
Agent the resource would belong to
Agent display name, so the owner knows who is asking
Resource being requested: VAULT (encrypted secret storage for this agent), PHONE_NUMBER (a provisioned number, Starter+ only), or GENERIC (a master-gated operation the agent tried to perform; approving grants permission rather than provisioning anything).
VAULT, PHONE_NUMBER, GENERIC The agent's stated justification
Lifecycle status: PENDING (awaiting the owner), APPROVED (resource provisioned), DECLINED (owner refused — soft, the agent may ask again), EXPIRED (7-day TTL elapsed unanswered), CANCELLED (withdrawn by the agent).
PENDING, APPROVED, DECLINED, EXPIRED, CANCELLED Resource-specific options, if any
Show child attributes
Show child attributes
What the agent was refused, when this request records a permission rather than a resource
Show child attributes
Show child attributes
When an unanswered request stops being actionable
When the owner decided; null while PENDING
The owner's note, typically the reason for a decline — surfaced so a second attempt can address the objection instead of repeating the first
Id of what approval created (vault identity or phone identity); null unless APPROVED
When the agent asked
