Assign Resources to Client Account Configuration
curl --request POST \
--url https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assigned_resources": {
"assistant": [
"asst_abc123"
],
"vapi_workflow": [],
"vapi_squad": [],
"phone_number": [],
"phone_number_pool": [],
"knowledge_base": [],
"tools_and_functions": [],
"campaign": [
"Vm9pY2VDYW1wYWlnbjoxMjM="
]
}
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign"
payload = { "assigned_resources": {
"assistant": ["asst_abc123"],
"vapi_workflow": [],
"vapi_squad": [],
"phone_number": [],
"phone_number_pool": [],
"knowledge_base": [],
"tools_and_functions": [],
"campaign": ["Vm9pY2VDYW1wYWlnbjoxMjM="]
} }
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({
assigned_resources: {
assistant: ['asst_abc123'],
vapi_workflow: [],
vapi_squad: [],
phone_number: [],
phone_number_pool: [],
knowledge_base: [],
tools_and_functions: [],
campaign: ['Vm9pY2VDYW1wYWlnbjoxMjM=']
}
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign', 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.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign",
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([
'assigned_resources' => [
'assistant' => [
'asst_abc123'
],
'vapi_workflow' => [
],
'vapi_squad' => [
],
'phone_number' => [
],
'phone_number_pool' => [
],
'knowledge_base' => [
],
'tools_and_functions' => [
],
'campaign' => [
'Vm9pY2VDYW1wYWlnbjoxMjM='
]
]
]),
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.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign"
payload := strings.NewReader("{\n \"assigned_resources\": {\n \"assistant\": [\n \"asst_abc123\"\n ],\n \"vapi_workflow\": [],\n \"vapi_squad\": [],\n \"phone_number\": [],\n \"phone_number_pool\": [],\n \"knowledge_base\": [],\n \"tools_and_functions\": [],\n \"campaign\": [\n \"Vm9pY2VDYW1wYWlnbjoxMjM=\"\n ]\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.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assigned_resources\": {\n \"assistant\": [\n \"asst_abc123\"\n ],\n \"vapi_workflow\": [],\n \"vapi_squad\": [],\n \"phone_number\": [],\n \"phone_number_pool\": [],\n \"knowledge_base\": [],\n \"tools_and_functions\": [],\n \"campaign\": [\n \"Vm9pY2VDYW1wYWlnbjoxMjM=\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign")
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 \"assigned_resources\": {\n \"assistant\": [\n \"asst_abc123\"\n ],\n \"vapi_workflow\": [],\n \"vapi_squad\": [],\n \"phone_number\": [],\n \"phone_number_pool\": [],\n \"knowledge_base\": [],\n \"tools_and_functions\": [],\n \"campaign\": [\n \"Vm9pY2VDYW1wYWlnbjoxMjM=\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Resources assigned to client account configuration successfully",
"data": {
"asset_group_id": "<string>",
"assigned_resources": {
"assistant": [
"asst_abc123"
],
"vapi_workflow": [],
"vapi_squad": [],
"phone_number": [],
"phone_number_pool": [],
"knowledge_base": [],
"tools_and_functions": [],
"campaign": [
"Vm9pY2VDYW1wYWlnbjoxMjM="
]
}
}
}{
"message": "Invalid data",
"errors": [
"Assigned resources cannot be empty"
]
}{
"message": "<string>"
}{
"message": "Client Account Configuration not found or does not belong to this tenant",
"errors": [
"Invalid client_account_configuration_id"
]
}{
"message": "<string>"
}Client Account Configurations
Assign Resources to Client Account Configuration
Replaces all resource assignments for a client account configuration with the provided set.
Authentication
All requests require an Authorization header using Bearer token authentication:
Authorization: Bearer <api_key>
POST
/
api
/
v2
/
client-account-configurations
/
{client_account_configuration_id}
/
resources
/
assign
Assign Resources to Client Account Configuration
curl --request POST \
--url https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assigned_resources": {
"assistant": [
"asst_abc123"
],
"vapi_workflow": [],
"vapi_squad": [],
"phone_number": [],
"phone_number_pool": [],
"knowledge_base": [],
"tools_and_functions": [],
"campaign": [
"Vm9pY2VDYW1wYWlnbjoxMjM="
]
}
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign"
payload = { "assigned_resources": {
"assistant": ["asst_abc123"],
"vapi_workflow": [],
"vapi_squad": [],
"phone_number": [],
"phone_number_pool": [],
"knowledge_base": [],
"tools_and_functions": [],
"campaign": ["Vm9pY2VDYW1wYWlnbjoxMjM="]
} }
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({
assigned_resources: {
assistant: ['asst_abc123'],
vapi_workflow: [],
vapi_squad: [],
phone_number: [],
phone_number_pool: [],
knowledge_base: [],
tools_and_functions: [],
campaign: ['Vm9pY2VDYW1wYWlnbjoxMjM=']
}
})
};
fetch('https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign', 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.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign",
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([
'assigned_resources' => [
'assistant' => [
'asst_abc123'
],
'vapi_workflow' => [
],
'vapi_squad' => [
],
'phone_number' => [
],
'phone_number_pool' => [
],
'knowledge_base' => [
],
'tools_and_functions' => [
],
'campaign' => [
'Vm9pY2VDYW1wYWlnbjoxMjM='
]
]
]),
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.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign"
payload := strings.NewReader("{\n \"assigned_resources\": {\n \"assistant\": [\n \"asst_abc123\"\n ],\n \"vapi_workflow\": [],\n \"vapi_squad\": [],\n \"phone_number\": [],\n \"phone_number_pool\": [],\n \"knowledge_base\": [],\n \"tools_and_functions\": [],\n \"campaign\": [\n \"Vm9pY2VDYW1wYWlnbjoxMjM=\"\n ]\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.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"assigned_resources\": {\n \"assistant\": [\n \"asst_abc123\"\n ],\n \"vapi_workflow\": [],\n \"vapi_squad\": [],\n \"phone_number\": [],\n \"phone_number_pool\": [],\n \"knowledge_base\": [],\n \"tools_and_functions\": [],\n \"campaign\": [\n \"Vm9pY2VDYW1wYWlnbjoxMjM=\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/client-account-configurations/{client_account_configuration_id}/resources/assign")
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 \"assigned_resources\": {\n \"assistant\": [\n \"asst_abc123\"\n ],\n \"vapi_workflow\": [],\n \"vapi_squad\": [],\n \"phone_number\": [],\n \"phone_number_pool\": [],\n \"knowledge_base\": [],\n \"tools_and_functions\": [],\n \"campaign\": [\n \"Vm9pY2VDYW1wYWlnbjoxMjM=\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Resources assigned to client account configuration successfully",
"data": {
"asset_group_id": "<string>",
"assigned_resources": {
"assistant": [
"asst_abc123"
],
"vapi_workflow": [],
"vapi_squad": [],
"phone_number": [],
"phone_number_pool": [],
"knowledge_base": [],
"tools_and_functions": [],
"campaign": [
"Vm9pY2VDYW1wYWlnbjoxMjM="
]
}
}
}{
"message": "Invalid data",
"errors": [
"Assigned resources cannot be empty"
]
}{
"message": "<string>"
}{
"message": "Client Account Configuration not found or does not belong to this tenant",
"errors": [
"Invalid client_account_configuration_id"
]
}{
"message": "<string>"
}Authorizations
Path Parameters
Body
application/json
Resource assignments to apply
Was this page helpful?

