Skip to content
Skip to Content
Full reference

Spaces

List Smart Spaces

GET
/v1/spaces

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Response Body

The user's spaces, in the order they were made

application/json
  1. response
spaces*array<>
Example Request
curl -X GET 'https://example.com/v1/spaces'
Example Response
{  "spaces": [    {      "id": "string",      "name": "string",      "query": "string",      "color": "string",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}
POST
/v1/spaces

A user can have at most 50 spaces. query is the text of a search and can use the operators from GET /v1/search.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
name*string
Lengthlength <= 80
query*string
Lengthlength <= 500
color?|

Accent color of a space. Either a palette name (red, orange, yellow, green, teal, blue, purple, pink), so each client can tune it for light and dark themes, or a custom color as lowercase #rrggbb. Uppercase and 3-digit hex are rejected, and the value is stored as sent. null means no color. Omit it on create for no color; omit it on update to leave it as is, send null to clear it. Anything else is a 422.

Match^(red|orange|yellow|green|teal|blue|purple|pink|#[0-9a-f]{6})$

Response Body

The new space

application/json
  1. response
id*string
name*string
query*string

The text of the saved search. It can use search operators.

color?|

Accent color of a space. Either a palette name (red, orange, yellow, green, teal, blue, purple, pink), so each client can tune it for light and dark themes, or a custom color as lowercase #rrggbb. Uppercase and 3-digit hex are rejected, and the value is stored as sent. null means no color. Omit it on create for no color; omit it on update to leave it as is, send null to clear it. Anything else is a 422.

Match^(red|orange|yellow|green|teal|blue|purple|pink|#[0-9a-f]{6})$
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/v1/spaces' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "query": "string"}'
Example Response
{  "id": "string",  "name": "string",  "query": "string",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}

Get a space

GET
/v1/spaces/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

The space

application/json
  1. response
id*string
name*string
query*string

The text of the saved search. It can use search operators.

color?|

Accent color of a space. Either a palette name (red, orange, yellow, green, teal, blue, purple, pink), so each client can tune it for light and dark themes, or a custom color as lowercase #rrggbb. Uppercase and 3-digit hex are rejected, and the value is stored as sent. null means no color. Omit it on create for no color; omit it on update to leave it as is, send null to clear it. Anything else is a 422.

Match^(red|orange|yellow|green|teal|blue|purple|pink|#[0-9a-f]{6})$
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://example.com/v1/spaces/string'
Example Response
{  "id": "string",  "name": "string",  "query": "string",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/v1/spaces/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Request Body

application/json
  1. body
name?string
Lengthlength <= 80
query?string
Lengthlength <= 500
color?|

Accent color of a space. Either a palette name (red, orange, yellow, green, teal, blue, purple, pink), so each client can tune it for light and dark themes, or a custom color as lowercase #rrggbb. Uppercase and 3-digit hex are rejected, and the value is stored as sent. null means no color. Omit it on create for no color; omit it on update to leave it as is, send null to clear it. Anything else is a 422.

Match^(red|orange|yellow|green|teal|blue|purple|pink|#[0-9a-f]{6})$

Response Body

The space

application/json
  1. response
id*string
name*string
query*string

The text of the saved search. It can use search operators.

color?|

Accent color of a space. Either a palette name (red, orange, yellow, green, teal, blue, purple, pink), so each client can tune it for light and dark themes, or a custom color as lowercase #rrggbb. Uppercase and 3-digit hex are rejected, and the value is stored as sent. null means no color. Omit it on create for no color; omit it on update to leave it as is, send null to clear it. Anything else is a 422.

Match^(red|orange|yellow|green|teal|blue|purple|pink|#[0-9a-f]{6})$
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://example.com/v1/spaces/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "name": "string",  "query": "string",  "color": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE
/v1/spaces/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

Deleted

Example Request
curl -X DELETE 'https://example.com/v1/spaces/string'
Example Response
Empty
GET
/v1/spaces/{id}/items

Runs the space's saved search now, the same as GET /v1/search.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Query Parameters

limit?integer
Range1 <= value <= 100
Default30
offset?integer
Range0 <= value <= 1000
Default0

Response Body

The space and its ranked matches

application/json
  1. response
space*
hits*array<>
Example Request
curl -X GET 'https://example.com/v1/spaces/string/items'
Example Response
{  "space": {    "id": "string",    "name": "string",    "query": "string",    "color": "string",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  },  "hits": [    {      "id": "string",      "kind": "link",      "source": "api",      "url": "string",      "domain": "string",      "title": "string",      "description": "string",      "content": "string",      "content_html": "string",      "note": "string",      "tags": [        "string"      ],      "image_url": "string",      "favicon_url": "string",      "author": "string",      "publisher": "string",      "published_at": "2019-08-24T14:15:22Z",      "lang": "en",      "ai_tags": [        "string"      ],      "ai_caption": "string",      "ocr_text": "string",      "objects": [        "string"      ],      "ai_summary": "string",      "summary_edited": true,      "card": "article",      "details": {        "property1": "string",        "property2": "string"      },      "recipe": {        "description": "string",        "image": {          "url": "http://example.com",          "width": 1,          "height": 1,          "color": "string",          "asset_id": "string",          "source_url": "http://example.com",          "alt": "string"        },        "yield": "string",        "prep_minutes": 1,        "cook_minutes": 1,        "total_minutes": 1,        "ingredients": [          {            "group": "string",            "text": "string"          }        ],        "steps": [          {            "group": "string",            "text": "string"          }        ]      },      "product": {        "name": "string",        "brand": "string",        "description": "string",        "price": {          "amount": 0,          "currency": "string",          "list_amount": 0        },        "availability": "in_stock",        "rating": {          "value": 0,          "count": 1        },        "images": [          "http://example.com"        ],        "image_refs": [          {            "url": "http://example.com",            "width": 1,            "height": 1,            "color": "string",            "asset_id": "string",            "source_url": "http://example.com",            "alt": "string"          }        ],        "sku": "string"      },      "enrich_status": "none",      "enriched_at": "2019-08-24T14:15:22Z",      "palette": [        {          "hex": "#1e50d2",          "lab": [            0,            0,            0          ],          "weight": 0        }      ],      "color_words": [        "string"      ],      "thumbnail_url": "string",      "thumbnail_color": "string",      "animated_url": "string",      "thumbnail_width": 0,      "thumbnail_height": 0,      "thumbnail_status": "none",      "blurhash": "string",      "crawl_status": "none",      "content_quality": "full",      "reading_progress": {        "progress": 0,        "percent": 0,        "offset": 0,        "anchor": "string",        "updated_at": "2019-08-24T14:15:22Z"      },      "word_count": 1,      "reading_minutes": 1,      "dir": "ltr",      "excerpt": "string",      "lead_image": {        "url": "http://example.com",        "width": 1,        "height": 1,        "color": "string",        "asset_id": "string",        "source_url": "http://example.com",        "alt": "string"      },      "crawl_error": "string",      "crawled_at": "2019-08-24T14:15:22Z",      "capture_status": "none",      "capture_error": "string",      "captured_at": "2019-08-24T14:15:22Z",      "is_favourite": true,      "archived_at": "2019-08-24T14:15:22Z",      "completed_at": "2019-08-24T14:15:22Z",      "change_seq": "string",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "deleted_at": "2019-08-24T14:15:22Z",      "shared": true,      "share_expires_at": "2019-08-24T14:15:22Z",      "score": 0,      "match": {        "reasons": [          "title"        ],        "tag": "string",        "object": "string",        "colour": "string",        "snippet": "string",        "snippet_field": "content",        "snippet_matches": [          [            0,            0          ]        ]      }    }  ]}