Docs API reference
Collections and feeds
Collections hold the records templates fill from; a feed (RSS, Atom, JSON Feed or a news website) keeps one up to date. Each feed item is a record with title, summary, image, date, time, author, category, link and feed_title. Write records yourself under Records.
Every call needs an API key in the Authorization header. New to the API? Start with
the API overview.
List collections
/collections dataParameters
limitinteger queryPage size, 1–200.
1–200. Default
50cursorstring queryThe
next_cursorof the previous page.
Responses
- 200 A page of collections.
- 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
Response fields (200)
itemsobject[] required8 fields in
itemsidstring requirednamestring requiredprefixstring requiredIts records’ refs start with this.
fieldsstring[]field_typesmap of stringPer field: text, date (YYYY-MM-DD), time (HH:MM), image (asset:<id> or https://…), presenters (write <name>_ids = presenter ids; <name>, <name>_title, <name>_organization and <name>_photo are derived) or record (write <name>_ref = refs of records in the linked collection; <name> = their titles and <name>_<field> for each field of that collection are derived, and kept current).
field_linksmap of stringA record field → the id of the collection it links to.
title_fieldstring or nulltemplate_idstring or null
next_cursorstring or null requiredPass as
cursorfor the next page;nullon the last page.
curl "https://www.wunderframe.com/api/v1/collections?limit=50" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY"{
"items": [
{
"id": "col_news",
"name": "News",
"prefix": "news/",
"fields": [
"title",
"summary",
"image"
],
"template_id": "scn_headline"
}
],
"next_cursor": null
}Error example
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key."
}
}Create a collection
/collections dataRequest body required
namestring requiredprefixstringfieldsobject[]The field list, in order, with types. Optional; fields also grow as records arrive.
5 fields in
fieldsnamestring requiredlabelstringtypestringOne of
text,date,time,image,presenters,recordhiddenbooleancollectionstringtype record: the id of the collection it links to. A record field named sponsor owns every sponsor_… value; no other field may start with sponsor_.
title_fieldstringThe field that names a record.
Responses
- 201 The collection.
- 400 The request is invalid —
details.fieldnames the field when there is one. - 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
Response fields (201)
idstring requirednamestring requiredprefixstring requiredIts records’ refs start with this.
fieldsstring[]field_typesmap of stringPer field: text, date (YYYY-MM-DD), time (HH:MM), image (asset:<id> or https://…), presenters (write <name>_ids = presenter ids; <name>, <name>_title, <name>_organization and <name>_photo are derived) or record (write <name>_ref = refs of records in the linked collection; <name> = their titles and <name>_<field> for each field of that collection are derived, and kept current).
field_linksmap of stringA record field → the id of the collection it links to.
title_fieldstring or nulltemplate_idstring or null
curl -X POST "https://www.wunderframe.com/api/v1/collections" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "News"
}'{
"id": "col_news",
"name": "News",
"prefix": "news/",
"fields": [
"title",
"summary",
"image"
],
"template_id": "scn_headline"
}Error example
{
"error": {
"code": "invalid",
"message": "The request is invalid — `details.field` names the field when there is one."
}
}Feed a collection
/collections/{id}/feeds dataRead at once, then on schedule (off, 5m, 15m default, 1h, 1d).
Parameters
idstring required pathThe collection id.
Request body required
urlstring requirednamestringschedulestring
Responses
- 201 The source, and how many items it read.
- 400 The request is invalid —
details.fieldnames the field when there is one. - 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
Response fields (201)
source_idstringitemsintegererrorstring or null
curl -X POST "https://www.wunderframe.com/api/v1/collections/wkFRBzMq6POZ_qYJHvgQf/feeds" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.srf.ch/news/bnf/rss/1646",
"schedule": "15m"
}'{
"source_id": "string",
"items": 0,
"error": "string"
}Error example
{
"error": {
"code": "invalid",
"message": "The request is invalid — `details.field` names the field when there is one."
}
}Read a source again now
/sources/{id}/sync dataParameters
idstring required pathThe source id.
Responses
- 200 How it went.
- 400 The request is invalid —
details.fieldnames the field when there is one. - 401 Missing or invalid API key.
- 403 The key lacks the scope, or the role is read-only.
Response fields (200)
itemsintegererrorstring or null
curl -X POST "https://www.wunderframe.com/api/v1/sources/wkFRBzMq6POZ_qYJHvgQf/sync" \
-H "Authorization: Bearer $WUNDERFRAME_API_KEY"{
"items": 0,
"error": "string"
}Error example
{
"error": {
"code": "invalid",
"message": "The request is invalid — `details.field` names the field when there is one."
}
}