Skip to content

Save Search

POST
/search/saved-searches

Store a search so it can be run again.

Sending id REPLACES that saved search rather than creating a second one - which is why a caller looping over a list should send the id back, not omit it. A saved search belonging to someone else comes back as a 404 rather than a 403, so a guessed id cannot confirm that it exists.

icp_query is stored verbatim and is not interpreted here.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Store a search so a person can run it again later.

icp_query is OPAQUE and round-tripped verbatim: the app stores it as a plain JSON blob and does not interpret it at save time, so this contract does not either. That is also why it is the one place here that does not go through the field map - translating a blob nobody reads would change what the caller gets back.

id present means UPDATE the saved search rather than create a new one.

object
icp_query
required

The search itself. Opaque and round-tripped as-is.

object
key
additional properties
any
id
Any of:
integer
scope
required

What the saved search is over - contacts or companies today. Deliberately a free string rather than a closed enum, matching the app, which is designed to add more.

string
>= 1 characters <= 64 characters
title
required
string
>= 1 characters <= 255 characters

Responses

201

Successful Response

object
data
required

An open envelope for an autocomplete or filter-option result.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string