Blocks
Create
You can use this endpoint to create a block.
- Endpoint:
POST https://api.proposalpage.com/projects/<projectId>/blocks
1
- Response:
Status: 201
{
"style": {
"backgroundColor": "rgba(255, 255, 255, 1)",
"backgroundImage": "",
"backgroundRepeat": "no-repeat",
"backgroundSize": "cover",
"backgroundPosition": "center center",
"opacity": 1
},
"_id": "5c41db25d139900014b5d8ae",
"description": "Block Last",
"rows": [ rowSchema ],
"createdAt": "2019-01-18T13:56:53.742Z",
"updatedAt": "2019-01-18T13:56:53.742Z"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Parameters:
Path: Empty.
Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body:
Name Type Description Required style object Block style. description string Block description. ✔️ rows array Block rows. Example:
curl -XPOST -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" -d '{ "description": "New block", "rows": [] }' 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks'
1
Clone
You can use this endpoint to clone a block and put it in a specific position.
- Endpoint:
POST https://api.proposalpage.com/projects/<projectId>/blocks/<blockId>/clone/<position>
1
- Response:
Status: 201
{
"style": {
"backgroundColor": "rgba(255, 255, 255, 1)",
"backgroundImage": "",
"backgroundRepeat": "no-repeat",
"backgroundSize": "cover",
"backgroundPosition": "center center",
"opacity": 1
},
"_id": "5c41db25d139900014b5d8ae",
"description": "Block Last",
"rows": [ rowSchema ],
"createdAt": "2019-01-18T13:56:53.742Z",
"updatedAt": "2019-01-18T13:56:53.742Z"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Parameters:
- Path:
Name Type Description Required projectId string The id of the project of the block that is going to be cloned. ✔️ blockId string The id of the block that is going to be cloned. ✔️ position number The position to put the block that is going to be cloned (eg. 0 is first). - Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body: Empty.
Example:
curl -XPOST -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks/5c41db25d139900014b5d8ae/clone/0'
1
Delete
You can use this endpoint to delete a block.
- Endpoint:
DELETE https://api.proposalpage.com/projects/<projectId>/blocks/<blockId>
1
- Response:
Status: 204 (no-content)
1
Parameters:
- Path:
Name Type Description Required projectId string The id of the project of the block that is going to be deleted. ✔️ blockId string The id of the block that is going to be deleted. ✔️ - Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body: Empty.
Example:
curl -XDELETE -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks/5c41db25d139900014b5d8ae'
1
List
You can use this endpoint to list the blocks of a project.
- Endpoint:
GET https://api.proposalpage.com/projects/<projectId>/blocks
1
- Response:
Status: 200
{
[
{ ... },
{
"style": {
"backgroundColor": "rgba(255, 255, 255, 1)",
"backgroundImage": "",
"backgroundRepeat": "no-repeat",
"backgroundSize": "cover",
"backgroundPosition": "center center",
"opacity": 1
},
"_id": "5c41db25d139900014b5d8ae",
"description": "Block Last",
"rows": [ rowSchema ],
"createdAt": "2019-01-18T13:56:53.742Z",
"updatedAt": "2019-01-18T13:56:53.742Z"
},
{ ... }
]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Parameters:
- Path:
Name Type Description Required projectId string The id of the project that the blocks are going to be listed. ✔️ - Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body: Empty.
Example:
curl -XGET -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks'
1
Move Backward
You can use this endpoint to move a block backward.
- Endpoint:
POST https://api.proposalpage.com/projects/<projectId>/blocks/<blockId>/backward
1
- Response:
Status: 200
{
"style": {
"backgroundColor": "rgba(255, 255, 255, 1)",
"backgroundImage": "",
"backgroundRepeat": "no-repeat",
"backgroundSize": "cover",
"backgroundPosition": "center center",
"opacity": 1
},
"_id": "5c41db25d139900014b5d8ae",
"description": "Block Last",
"rows": [ rowSchema ],
"createdAt": "2019-01-18T13:56:53.742Z",
"updatedAt": "2019-01-18T13:56:53.742Z"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Parameters:
- Path:
Name Type Description Required projectId string The id of the project of the block that is going to be moved backward. ✔️ blockId string The id of the block that is going to be moved backward. ✔️ - Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body: Empty.
Example:
curl -XPOST -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks/5c41db25d139900014b5d8ae/forward'
1
Move Forward
You can use this endpoint to move a block forward.
- Endpoint:
POST https://api.proposalpage.com/projects/<projectId>/blocks/<blockId>/forward
1
- Response:
Status: 200
{
"style": {
"backgroundColor": "rgba(255, 255, 255, 1)",
"backgroundImage": "",
"backgroundRepeat": "no-repeat",
"backgroundSize": "cover",
"backgroundPosition": "center center",
"opacity": 1
},
"_id": "5c41db25d139900014b5d8ae",
"description": "Block Last",
"rows": [ rowSchema ],
"createdAt": "2019-01-18T13:56:53.742Z",
"updatedAt": "2019-01-18T13:56:53.742Z"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Parameters:
- Path:
Name Type Description Required projectId string The id of the project of the block that is going to be moved forward. ✔️ blockId string The id of the block that is going to be moved forward. ✔️ - Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body: Empty.
Example:
curl -XPOST -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks/5c41db25d139900014b5d8ae/forward'
1
Update
You can use this endpoint to update a block.
- Endpoint:
PUT https://api.proposalpage.com/projects/<projectId>/blocks/<blockId>
1
- Response:
Status: 200
{
"style": {
"backgroundColor": "rgba(255, 255, 255, 1)",
"backgroundImage": "",
"backgroundRepeat": "no-repeat",
"backgroundSize": "cover",
"backgroundPosition": "center center",
"opacity": 1
},
"_id": "5c41db25d139900014b5d8ae",
"description": "Block Last",
"rows": [ rowSchema ],
"createdAt": "2019-01-18T13:56:53.742Z",
"updatedAt": "2019-01-18T13:56:53.742Z"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Parameters:
- Path:
Name Type Description Required projectId string The id of the project of the block that is going to be updated. ✔️ blockId string The id of the block that is going to be updated. ✔️ - Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body:
Name Type Description Required style object Block style. description string Block description. rows array Block rows. Example:
curl -XPUT -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" -d '{ "description": "Updated block description" }' 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks/5c41db25d139900014b5d8ae'
1
Retrieve
You can use this endpoint to retrieve a block.
- Endpoint:
GET https://api.proposalpage.com/projects/<projectId>/blocks/<blockId>
1
- Response:
Status: 200
{
"style": {
"backgroundColor": "rgba(255, 255, 255, 1)",
"backgroundImage": "",
"backgroundRepeat": "no-repeat",
"backgroundSize": "cover",
"backgroundPosition": "center center",
"opacity": 1
},
"_id": "5c41db25d139900014b5d8ae",
"description": "Block Last",
"rows": [ rowSchema ],
"createdAt": "2019-01-18T13:56:53.742Z",
"updatedAt": "2019-01-18T13:56:53.742Z"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Parameters:
- Path:
Name Type Description Required projectId string The id of the project of the block that is going to be retrieved. ✔️ blockId string The id of the block that is going to be retrieved. ✔️ - Header:
Name Type Description Required Authorization string Your Bearer Token obtained in the Auth Token endpoint. ✔️ - Body: Empty.
Example:
curl -XGET -H 'Authorization: Bearer $TOKEN' -H "Content-type: application/json" 'https://api.proposalpage.com/projects/5cbe31f7372099001a4f0d74/blocks/5c41db25d139900014b5d8ae'
1