Views

Create a view

POST
Add a new view to the space

Request

This endpoint expects an object.
sheetId
stringRequired
Sheet ID
name
stringRequired
config
objectRequired
The configuration of a view. Filters, sorting, and search query.

Response

This endpoint returns an object
data
object
A view

Errors

POST
$curl -X POST https://api.x.flatfile.com/v1/views \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "sheetId": "us_sh_YOUR_ID",
> "name": "My View",
> "config": {
> "sortField": "email",
> "sortDirection": "asc",
> "filter": "error",
> "filterField": "email",
> "q": "firstname like %John%"
> }
>}'
Response
1{
2 "data": {
3 "id": "us_vi_YOUR_ID",
4 "sheetId": "us_sh_YOUR_ID",
5 "name": "My View",
6 "config": {
7 "sortField": "email",
8 "sortDirection": "asc",
9 "filter": "error",
10 "filterField": "email",
11 "q": "firstname like %John%"
12 },
13 "createdBy": "us_usr_YOUR_ID"
14 }
15}