Documentation Index
Fetch the complete documentation index at: https://docs.grantex.dev/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
GET /v1/budget/allocations
Authentication
Requires a developer API key in the Authorization header.
| Header | Value |
|---|
Authorization | Bearer <api_key> |
Example Request
curl https://grantex-auth-dd4mtrt2gq-uc.a.run.app/v1/budget/allocations \
-H "Authorization: Bearer gx_..."
Response — 200 OK
{
"allocations": [
{
"id": "ba_01HXYZ...",
"grantId": "grnt_01HXYZ...",
"initialBudget": 100.00,
"remainingBudget": 94.50,
"currency": "USD",
"createdAt": "2026-04-05T12:00:00.000Z",
"updatedAt": "2026-04-05T14:30:00.000Z"
}
]
}
Response Fields
| Field | Type | Description |
|---|
allocations | array | Array of budget allocation objects |
allocations[].id | string | Unique budget allocation ID |
allocations[].grantId | string | The grant this budget is attached to |
allocations[].initialBudget | number | The original budget amount |
allocations[].remainingBudget | number | Current remaining budget |
allocations[].currency | string | Currency code |
allocations[].createdAt | string | ISO-8601 creation timestamp |
allocations[].updatedAt | string | ISO-8601 last update timestamp |
Error Responses
| Status | Code | Description |
|---|
| 401 | UNAUTHORIZED | Invalid or missing API key |
SDK Examples
import Grantex from '@grantex/sdk';
const grantex = new Grantex({ apiKey: 'gx_...' });
const { allocations } = await grantex.budgets.allocations();
for (const a of allocations) {
console.log(`${a.grantId}: ${a.remainingBudget}/${a.initialBudget} ${a.currency}`);
}