Update a policy
curl --request PUT \
--url https://api.xentfi.com/v1/policies/{id} \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"agentId": "<string>",
"name": "<string>",
"isActive": true,
"priority": 123,
"perTransactionLimitUsd": 123,
"dailyLimitUsd": 123,
"weeklyLimitUsd": 123,
"monthlyLimitUsd": 123,
"allowedRecipients": [
"<string>"
],
"allowedAssetIds": [
"<string>"
],
"allowedBlockchainIds": [
"<string>"
],
"allowedDaysOfWeek": [
123
],
"allowedHourStart": 123,
"allowedHourEnd": 123
}
'const options = {
method: 'PUT',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
name: '<string>',
isActive: true,
priority: 123,
perTransactionLimitUsd: 123,
dailyLimitUsd: 123,
weeklyLimitUsd: 123,
monthlyLimitUsd: 123,
allowedRecipients: ['<string>'],
allowedAssetIds: ['<string>'],
allowedBlockchainIds: ['<string>'],
allowedDaysOfWeek: [123],
allowedHourStart: 123,
allowedHourEnd: 123
})
};
fetch('https://api.xentfi.com/v1/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/policies/{id}"
payload = {
"agentId": "<string>",
"name": "<string>",
"isActive": True,
"priority": 123,
"perTransactionLimitUsd": 123,
"dailyLimitUsd": 123,
"weeklyLimitUsd": 123,
"monthlyLimitUsd": 123,
"allowedRecipients": ["<string>"],
"allowedAssetIds": ["<string>"],
"allowedBlockchainIds": ["<string>"],
"allowedDaysOfWeek": [123],
"allowedHourStart": 123,
"allowedHourEnd": 123
}
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/policies/{id}"
payload := strings.NewReader("{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"priority\": 123,\n \"perTransactionLimitUsd\": 123,\n \"dailyLimitUsd\": 123,\n \"weeklyLimitUsd\": 123,\n \"monthlyLimitUsd\": 123,\n \"allowedRecipients\": [\n \"<string>\"\n ],\n \"allowedAssetIds\": [\n \"<string>\"\n ],\n \"allowedBlockchainIds\": [\n \"<string>\"\n ],\n \"allowedDaysOfWeek\": [\n 123\n ],\n \"allowedHourStart\": 123,\n \"allowedHourEnd\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
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))
}const options = {
method: 'PUT',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
name: '<string>',
isActive: true,
priority: 123,
perTransactionLimitUsd: 123,
dailyLimitUsd: 123,
weeklyLimitUsd: 123,
monthlyLimitUsd: 123,
allowedRecipients: ['<string>'],
allowedAssetIds: ['<string>'],
allowedBlockchainIds: ['<string>'],
allowedDaysOfWeek: [123],
allowedHourStart: 123,
allowedHourEnd: 123
})
};
fetch('https://api.xentfi.com/v1/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"isActive": true,
"priority": 123,
"perTransactionLimitUsd": "<string>",
"dailyLimitUsd": "<string>",
"weeklyLimitUsd": "<string>",
"monthlyLimitUsd": "<string>",
"allowedRecipients": [
"<string>"
],
"allowedAssetIds": [
"<string>"
],
"allowedBlockchainIds": [
"<string>"
],
"allowedDaysOfWeek": [
123
],
"allowedHourStart": 123,
"allowedHourEnd": 123,
"timezone": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Policies
Update a policy
PUT
/
v1
/
policies
/
{id}
Update a policy
curl --request PUT \
--url https://api.xentfi.com/v1/policies/{id} \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'orgId: <api-key>' \
--data '
{
"agentId": "<string>",
"name": "<string>",
"isActive": true,
"priority": 123,
"perTransactionLimitUsd": 123,
"dailyLimitUsd": 123,
"weeklyLimitUsd": 123,
"monthlyLimitUsd": 123,
"allowedRecipients": [
"<string>"
],
"allowedAssetIds": [
"<string>"
],
"allowedBlockchainIds": [
"<string>"
],
"allowedDaysOfWeek": [
123
],
"allowedHourStart": 123,
"allowedHourEnd": 123
}
'const options = {
method: 'PUT',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
name: '<string>',
isActive: true,
priority: 123,
perTransactionLimitUsd: 123,
dailyLimitUsd: 123,
weeklyLimitUsd: 123,
monthlyLimitUsd: 123,
allowedRecipients: ['<string>'],
allowedAssetIds: ['<string>'],
allowedBlockchainIds: ['<string>'],
allowedDaysOfWeek: [123],
allowedHourStart: 123,
allowedHourEnd: 123
})
};
fetch('https://api.xentfi.com/v1/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.xentfi.com/v1/policies/{id}"
payload = {
"agentId": "<string>",
"name": "<string>",
"isActive": True,
"priority": 123,
"perTransactionLimitUsd": 123,
"dailyLimitUsd": 123,
"weeklyLimitUsd": 123,
"monthlyLimitUsd": 123,
"allowedRecipients": ["<string>"],
"allowedAssetIds": ["<string>"],
"allowedBlockchainIds": ["<string>"],
"allowedDaysOfWeek": [123],
"allowedHourStart": 123,
"allowedHourEnd": 123
}
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.xentfi.com/v1/policies/{id}"
payload := strings.NewReader("{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"isActive\": true,\n \"priority\": 123,\n \"perTransactionLimitUsd\": 123,\n \"dailyLimitUsd\": 123,\n \"weeklyLimitUsd\": 123,\n \"monthlyLimitUsd\": 123,\n \"allowedRecipients\": [\n \"<string>\"\n ],\n \"allowedAssetIds\": [\n \"<string>\"\n ],\n \"allowedBlockchainIds\": [\n \"<string>\"\n ],\n \"allowedDaysOfWeek\": [\n 123\n ],\n \"allowedHourStart\": 123,\n \"allowedHourEnd\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<api-key>")
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))
}const options = {
method: 'PUT',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agentId: '<string>',
name: '<string>',
isActive: true,
priority: 123,
perTransactionLimitUsd: 123,
dailyLimitUsd: 123,
weeklyLimitUsd: 123,
monthlyLimitUsd: 123,
allowedRecipients: ['<string>'],
allowedAssetIds: ['<string>'],
allowedBlockchainIds: ['<string>'],
allowedDaysOfWeek: [123],
allowedHourStart: 123,
allowedHourEnd: 123
})
};
fetch('https://api.xentfi.com/v1/policies/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"isActive": true,
"priority": 123,
"perTransactionLimitUsd": "<string>",
"dailyLimitUsd": "<string>",
"weeklyLimitUsd": "<string>",
"monthlyLimitUsd": "<string>",
"allowedRecipients": [
"<string>"
],
"allowedAssetIds": [
"<string>"
],
"allowedBlockchainIds": [
"<string>"
],
"allowedDaysOfWeek": [
123
],
"allowedHourStart": 123,
"allowedHourEnd": 123,
"timezone": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}Path Parameters
Body
application/json
Available options:
UTC, America_New_York, America_Los_Angeles, America_Chicago, Europe_London, Europe_Paris, Europe_Berlin, Asia_Dubai, Asia_Singapore, Asia_Tokyo, Australia_Sydney, Pacific_Auckland Response
Policy updated
Show child attributes
Show child attributes
⌘I

