curl --request POST \
--url https://api.useanima.sh/v1/provisioning-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"agentId": "<string>",
"options": {
"countryCode": "<string>",
"areaCode": "<string>"
}
}
'import requests
url = "https://api.useanima.sh/v1/provisioning-requests"
payload = {
"reason": "<string>",
"agentId": "<string>",
"options": {
"countryCode": "<string>",
"areaCode": "<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({
reason: '<string>',
agentId: '<string>',
options: {countryCode: '<string>', areaCode: '<string>'}
})
};
fetch('https://api.useanima.sh/v1/provisioning-requests', 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",
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([
'reason' => '<string>',
'agentId' => '<string>',
'options' => [
'countryCode' => '<string>',
'areaCode' => '<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"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"agentId\": \"<string>\",\n \"options\": {\n \"countryCode\": \"<string>\",\n \"areaCode\": \"<string>\"\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"agentId\": \"<string>\",\n \"options\": {\n \"countryCode\": \"<string>\",\n \"areaCode\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/provisioning-requests")
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 \"reason\": \"<string>\",\n \"agentId\": \"<string>\",\n \"options\": {\n \"countryCode\": \"<string>\",\n \"areaCode\": \"<string>\"\n }\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",
"emailSent": true
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "Agents can only request resources for themselves.",
"data": "<unknown>"
}{
"defined": true,
"code": "NOT_FOUND",
"status": 404,
"message": "No such agent in this organization.",
"data": "<unknown>"
}{
"defined": true,
"code": "CONFLICT",
"status": 409,
"message": "An identical request is already pending for this agent.",
"data": "<unknown>"
}Post provisioning requests
curl --request POST \
--url https://api.useanima.sh/v1/provisioning-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>",
"agentId": "<string>",
"options": {
"countryCode": "<string>",
"areaCode": "<string>"
}
}
'import requests
url = "https://api.useanima.sh/v1/provisioning-requests"
payload = {
"reason": "<string>",
"agentId": "<string>",
"options": {
"countryCode": "<string>",
"areaCode": "<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({
reason: '<string>',
agentId: '<string>',
options: {countryCode: '<string>', areaCode: '<string>'}
})
};
fetch('https://api.useanima.sh/v1/provisioning-requests', 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",
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([
'reason' => '<string>',
'agentId' => '<string>',
'options' => [
'countryCode' => '<string>',
'areaCode' => '<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"
payload := strings.NewReader("{\n \"reason\": \"<string>\",\n \"agentId\": \"<string>\",\n \"options\": {\n \"countryCode\": \"<string>\",\n \"areaCode\": \"<string>\"\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\",\n \"agentId\": \"<string>\",\n \"options\": {\n \"countryCode\": \"<string>\",\n \"areaCode\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/provisioning-requests")
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 \"reason\": \"<string>\",\n \"agentId\": \"<string>\",\n \"options\": {\n \"countryCode\": \"<string>\",\n \"areaCode\": \"<string>\"\n }\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",
"emailSent": true
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "Agents can only request resources for themselves.",
"data": "<unknown>"
}{
"defined": true,
"code": "NOT_FOUND",
"status": 404,
"message": "No such agent in this organization.",
"data": "<unknown>"
}{
"defined": true,
"code": "CONFLICT",
"status": 409,
"message": "An identical request is already pending for this agent.",
"data": "<unknown>"
}Authorizations
JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer
Body
Ask the organization owner to provision a resource this agent cannot provision itself.
Resource being requested: VAULT (encrypted secret storage for this agent) or PHONE_NUMBER (a provisioned number, Starter+ only).
VAULT, PHONE_NUMBER Why the agent needs this, shown verbatim to the owner. Required — an unexplained ask is not a decidable one.
1 - 500Agent identifier. Optional when using an agent API key (resolved automatically); required when using a master key.
^[0-9a-z]+$Resource-specific options; ignored for resources that take none
Show child attributes
Show child attributes
Response
OK
The created request, plus whether the owner notification actually went out
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
Whether the owner was successfully emailed. False means the request is still live and visible in the console — the notification failed, not the request.
