> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://reference.flatfile.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://reference.flatfile.com/_mcp/server.

# List canvas areas

GET https://api.x.flatfile.com/v1/canvas-areas

Returns a list of canvas areas filtered by canvas, space, or environment

Reference: https://reference.flatfile.com/api-reference/canvas-areas/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `canvasId` (string, optional) — ID of the canvas to filter areas by
- `parentId` (string, optional) — ID of the parent canvas area to filter by
- `spaceId` (string, optional) — ID of the space to filter areas by
- `environmentId` (string, optional) — ID of the environment to filter areas by
- `pageSize` (integer, optional) — Number of areas to return in a page (default 20)
- `pageNumber` (integer, optional) — Based on pageSize, which page of areas to return

## Response

### 200

- `data` (list of CanvasArea, required)
- `pagination` (Pagination, optional) — pagination info

## Errors

### 400 Bad Request Error

- `errors` (list of Error, required)

## Types

### CanvasArea

A canvas area represents a section within a canvas for organizing content

- `id` (string, required) — Canvas Area ID
- `canvasId` (string, required) — ID of the canvas this area belongs to
- `config` (any, required) — Additional configuration data for the canvas area
- `metadata` (any, required) — Metadata associated with the canvas area
- `layout` (enum, required) — Layout configuration for the canvas area
  - Allowed values: `split`, `drawer`, `modal`
- `overlay` (any, required) — Overlay configuration for the canvas area
- `type` (enum, required) — Type of the canvas area
  - Allowed values: `mapping`, `header`, `agent`, `form`, `sheet`, `sheets`, `workbook`, `document`, `file`, `iframe`
- `position` (enum, required) — Position of the canvas area within the canvas
  - Allowed values: `top`, `left`, `right`, `middle`, `bottom`
- `visibility` (enum, required) — Visibility of the canvas area
  - Allowed values: `visible`, `hidden`, `optional`, `skeleton`
- `createdAt` (datetime, required) — When the canvas area was created
- `updatedAt` (datetime, required) — When the canvas area was last updated
- `parentId` (string, optional) — ID of the parent canvas area, if this is a nested area
- `deletedAt` (datetime, optional) — When the canvas area was deleted, if applicable

### Pagination

pagination info

- `currentPage` (integer, required) — current page of results
- `pageCount` (integer, required) — total number of pages of results
- `totalCount` (integer, required) — total available results

### Error

- `message` (string, required)
- `key` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "id",
      "canvasId": "canvasId",
      "config": {
        "key": "value"
      },
      "metadata": {
        "key": "value"
      },
      "layout": "split",
      "overlay": {
        "key": "value"
      },
      "type": "mapping",
      "position": "top",
      "visibility": "visible",
      "createdAt": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z",
      "parentId": "parentId",
      "deletedAt": "2024-01-15T09:30:00Z"
    },
    {
      "id": "id",
      "canvasId": "canvasId",
      "config": {
        "key": "value"
      },
      "metadata": {
        "key": "value"
      },
      "layout": "split",
      "overlay": {
        "key": "value"
      },
      "type": "mapping",
      "position": "top",
      "visibility": "visible",
      "createdAt": "2024-01-15T09:30:00Z",
      "updatedAt": "2024-01-15T09:30:00Z",
      "parentId": "parentId",
      "deletedAt": "2024-01-15T09:30:00Z"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "pageCount": 1,
    "totalCount": 1
  }
}
```

**SDK Code**

```typescript
import { FlatfileClient } from "@flatfile/api";

const client = new FlatfileClient({ token: "YOUR_TOKEN" });
await client.canvasAreas.list();

```

```python
import requests

url = "https://api.x.flatfile.com/v1/canvas-areas"

headers = {
    "X-Disable-Hooks": "true",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.x.flatfile.com/v1/canvas-areas"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-Disable-Hooks", "true")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.x.flatfile.com/v1/canvas-areas")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Disable-Hooks"] = 'true'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.x.flatfile.com/v1/canvas-areas")
  .header("X-Disable-Hooks", "true")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.x.flatfile.com/v1/canvas-areas', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Disable-Hooks' => 'true',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.x.flatfile.com/v1/canvas-areas");
var request = new RestRequest(Method.GET);
request.AddHeader("X-Disable-Hooks", "true");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Disable-Hooks": "true",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.x.flatfile.com/v1/canvas-areas")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```