cURL
curl --request POST \
--url http://localhost:4100/v1/agents/api/calls/requirements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providerId": "<string>",
"endpointId": "<string>",
"url": "<string>",
"requestNonce": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
providerId: '<string>',
endpointId: '<string>',
url: '<string>',
requestNonce: '<string>'
})
};
fetch('http://localhost:4100/v1/agents/api/calls/requirements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"requirementId": "<string>",
"payload": "<string>",
"signingVersion": 1,
"chainId": 8453,
"asset": "<string>",
"domainSeparator": "<string>",
"authorization": {
"from": "<string>",
"to": "<string>",
"value": "<string>",
"validAfter": "<string>",
"validBefore": "<string>",
"nonce": "<string>"
},
"requirement": {
"scheme": "<string>",
"network": "<string>",
"maxAmountRequired": "<string>",
"asset": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"resource": "<string>",
"description": "<string>",
"mimeType": "<string>",
"extra": {}
},
"approvalRequired": true,
"expiresAt": "2023-11-07T05:31:56Z"
}Agent API
Post v1agentsapicallsrequirements
Connected agent session required. Available only when the Base Agent API runtime gate is enabled and verified.
cURL
curl --request POST \
--url http://localhost:4100/v1/agents/api/calls/requirements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providerId": "<string>",
"endpointId": "<string>",
"url": "<string>",
"requestNonce": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
providerId: '<string>',
endpointId: '<string>',
url: '<string>',
requestNonce: '<string>'
})
};
fetch('http://localhost:4100/v1/agents/api/calls/requirements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"requirementId": "<string>",
"payload": "<string>",
"signingVersion": 1,
"chainId": 8453,
"asset": "<string>",
"domainSeparator": "<string>",
"authorization": {
"from": "<string>",
"to": "<string>",
"value": "<string>",
"validAfter": "<string>",
"validBefore": "<string>",
"nonce": "<string>"
},
"requirement": {
"scheme": "<string>",
"network": "<string>",
"maxAmountRequired": "<string>",
"asset": "<string>",
"payTo": "<string>",
"maxTimeoutSeconds": 123,
"resource": "<string>",
"description": "<string>",
"mimeType": "<string>",
"extra": {}
},
"approvalRequired": true,
"expiresAt": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json
Response
Current authoritative state or accepted request.