Data model
Grants
A grant application workspace. Owns its file tree (folders and files). Carries funder/program metadata and tracks submission lifecycle.
grant200Fields
Per-field validation rules. Values that violate any constraint are rejected with 400 before they reach the database.
| Field | Type | Constraints |
|---|---|---|
| tags | tags | - |
| color | max length 24 | |
| notes | string | max length 4000 |
| title | string | max length 300 |
| status | enum | enum drafting | submitted | under_review | awarded | rejected | abandoned |
| program | string | max length 200 |
| currency | string | max length 8 |
| deadline | string | max length 32 |
| team_size | number | - |
| description | string | max length 2000 |
| root_file_id | string | max length 64 |
| grant_type_key | string | max length 64 |
| requested_amount | number | - |
Mutability
Which fields can you send, and when? Anything without a marker is server-managed - sending it isn't an error, it's silently ignored.
| Field | Create | Patch |
|---|---|---|
| tags | ||
| color | ||
| notes | ||
| title | ||
| status | ||
| program | ||
| currency | ||
| deadline | ||
| team_size | ||
| description | ||
| root_file_id | ||
| grant_type_key | ||
| requested_amount | ||
| funder | ||
| compiler | ||
| intake_blob_id | ||
| intake_url | ||
| intake_extracted | ||
| import_status | ||
| import_started_at | ||
| import_finished_at | ||
| intake_extracted_by_source | ||
| intake_sources | ||
| awarded_amount | ||
| awarded_at | ||
| profile | ||
| baseline_score | ||
| spellcheck_language_override | ||
| spellcheck_whitelist | ||
| spellcheck_disabled_rules |
Fields marked create-only but not patchable are immutable after creation. Server-managed fields include id, timestamps, ownership, and status.
Filtering & sorting
Combinable on list endpoints. Repeating a filter key produces an IN clause; prefixing a sort key with - reverses direction. Example: ?status=open&status=blocked&sort=-created_at.
Filter keys
data__statusdata__funderdata__tagsdata__deadlinedata__grant_type_keystatusis_archivedowned_bySort keys
created_atupdated_atdata__titledata__deadlinedata__statusDefault: created_at
Endpoints
Each endpoint below lists its HTTP method, path, and the PAT scope it needs. Code samples cover curl, JavaScript, TypeScript, Python, Rust, Java, and WebSocket.
/xapi2/data/grantgrant:listList objects
Returns a paginated list of objects you can read. Default page size is 20; pass ?limit= to change (capped per type). Use ?after=<id> for keyset pagination on created_at-sorted lists, or ?offset= for offset paging.
curl -H "Authorization: Bearer pat_…" \"https://granttool.de/xapi2/data/grant?limit=20"
/xapi2/data/grant/{id}grant:readRead one
Returns the object by id. 404 if it does not exist or you cannot read it (the two cases are intentionally conflated).
curl -H "Authorization: Bearer pat_…" \https://granttool.de/xapi2/data/grant/OBJECT_ID
/xapi2/data/grantgrant:createCreate
Creates a new object. Body is a flat JSON dict of field values. Server-side fields (id, timestamps, ownership) are filled automatically; only fields listed below as creatable are read from the body.
curl -H "Authorization: Bearer pat_…" \-H "Content-Type: application/json" \-X POST https://granttool.de/xapi2/data/grant \-d '{"name": "…"}'
/xapi2/data/grant/{id}grant:updateUpdate
Partial update. Only fields included in the body are touched; everything else is preserved. Same allow-list as create, minus the fields that are immutable post-create.
curl -H "Authorization: Bearer pat_…" \-H "Content-Type: application/json" \-X PATCH https://granttool.de/xapi2/data/grant/OBJECT_ID \-d '{"name": "…"}'
/xapi2/data/grant/{id}grant:deleteDelete
Removes the object. It vanishes from every default list immediately and stops being returned by read / list.
curl -H "Authorization: Bearer pat_…" \-X DELETE https://granttool.de/xapi2/data/grant/OBJECT_ID
Use in CLI
The same endpoints are also exposed via the Grants CLI. For scripts, CI, and bulk imports it's usually the faster path.
grantscli grant list --limit 5grantscli grant get <id>grantscli grant create --grant-type-key "Hello"grantscli grant upsert --unique grant_type_key --csv items.csvgrantscli grant schema # fields & limits
Full command reference, profiles, CSV import, auto-retry, NDJSON streaming → /docs/cli