Documents

List documents

GET
Returns all documents for a space

Path parameters

spaceIdstringRequired
ID of space to return

Response

This endpoint returns an object
data
list of objects
A document (markdown components) belong to a space

Errors

GET
$curl https://api.x.flatfile.com/v1/spaces/us_sp_YOUR_ID/documents \
> -H "Authorization: Bearer <token>"
Response
1{
2 "data": [
3 {
4 "body": "My information",
5 "createdAt": "2022-09-18T00:19:57.007Z",
6 "id": "us_dc_YOUR_ID",
7 "title": "My Document 1",
8 "updatedAt": "2022-09-18T00:19:57.007Z",
9 "actions": [
10 {
11 "label": "Submit",
12 "operation": "submitAction",
13 "mode": "foreground",
14 "description": "Submit data to webhook.site",
15 "primary": true
16 }
17 ],
18 "environmentId": "us_env_YOUR_ID",
19 "spaceId": "us_sp_YOUR_ID",
20 "treatments": []
21 },
22 {
23 "body": "Updated My information",
24 "createdAt": "2022-09-18T00:19:57.007Z",
25 "id": "us_dc_YOUR_ID",
26 "title": "Updated Title",
27 "updatedAt": "2022-09-18T00:19:57.007Z",
28 "actions": [
29 {
30 "label": "Submit",
31 "operation": "submitAction",
32 "mode": "foreground",
33 "description": "Submit data to webhook.site",
34 "primary": true
35 }
36 ],
37 "environmentId": "us_env_YOUR_ID",
38 "spaceId": "us_sp_YOUR_ID",
39 "treatments": []
40 }
41 ]
42}