Save a search as a Smart Space
A user can have at most 50 spaces. query is the text of a search and can use the operators from GET /v1/search.
bearerAuthorizationBearer <token>A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
application/json- body
name*stringlength <= 80query*stringlength <= 500color?|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.
^(red|orange|yellow|green|teal|blue|purple|pink|#[0-9a-f]{6})$The new space
application/json- response
id*stringname*stringquery*stringThe 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.
^(red|orange|yellow|green|teal|blue|purple|pink|#[0-9a-f]{6})$created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://example.com/v1/spaces' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "query": "string"}'{ "id": "string", "name": "string", "query": "string", "color": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}