curl --request POST \
--url https://api.lightspark.com/grid/2025-10-13/agents/device-codes/{code}/redeem{
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000001",
"agentName": "Payroll Automation Agent",
"accessToken": "gat_ed0ad25881e234cc28fb2dec0a4fe64e4172a3b9",
"policy": {
"permissions": [
"VIEW_TRANSACTIONS"
],
"defaultExecutionMode": "AUTO",
"spendingLimits": {
"currency": "USD",
"perTransactionLimit": 50000,
"dailyLimit": 500000,
"dailyTransactionLimit": 10,
"monthlyLimit": 5000000
},
"accountRestrictions": {
"allowedAccountIds": [
"Account:019542f5-b3e7-1d02-0000-000000000001"
],
"accountRules": [
{
"accountId": "Account:019542f5-b3e7-1d02-0000-000000000001",
"executionMode": "AUTO",
"perTransactionLimit": 10000
}
]
},
"approvalThresholds": {
"currency": "USD",
"amount": 100000
}
}
}Redeem a device code to obtain agent credentials. This endpoint is called by the agent software during installation. On success, returns a Bearer access token that the agent uses for all subsequent API calls. The token is returned only once and must be stored securely. This endpoint does not require platform authentication — the device code itself serves as proof of authorization.
curl --request POST \
--url https://api.lightspark.com/grid/2025-10-13/agents/device-codes/{code}/redeem{
"agentId": "Agent:019542f5-b3e7-1d02-0000-000000000001",
"agentName": "Payroll Automation Agent",
"accessToken": "gat_ed0ad25881e234cc28fb2dec0a4fe64e4172a3b9",
"policy": {
"permissions": [
"VIEW_TRANSACTIONS"
],
"defaultExecutionMode": "AUTO",
"spendingLimits": {
"currency": "USD",
"perTransactionLimit": 50000,
"dailyLimit": 500000,
"dailyTransactionLimit": 10,
"monthlyLimit": 5000000
},
"accountRestrictions": {
"allowedAccountIds": [
"Account:019542f5-b3e7-1d02-0000-000000000001"
],
"accountRules": [
{
"accountId": "Account:019542f5-b3e7-1d02-0000-000000000001",
"executionMode": "AUTO",
"perTransactionLimit": 10000
}
]
},
"approvalThresholds": {
"currency": "USD",
"amount": 100000
}
}
}Documentation Index
Fetch the complete documentation index at: https://ramps-docs-agents-webhook-and-account-model-links.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The device code to redeem
Device code redeemed successfully
The agent's system-generated ID.
"Agent:019542f5-b3e7-1d02-0000-000000000001"
The agent's name.
"Payroll Automation Agent"
Bearer token used to authenticate all subsequent API calls as this agent. Pass as Authorization: Bearer <accessToken>. This token is returned only once and must be stored securely — it cannot be retrieved again.
"gat_ed0ad25881e234cc28fb2dec0a4fe64e4172a3b9"
Policy governing what an agent can do, how it executes actions, and its spending boundaries.
Show child attributes
Was this page helpful?