Get Started
In this guide, you are going to learn how to interact with sections as a frontend developer. If you are a vueJS dev you can use our ready made vue-sections library.
If you wish to create your own client implementation, keep reading.
Step 1: Register here to get your project_id.
Step 2: With your project_id you can start requesting sections yet to create pages and add content to them you need an access token. Read below to understand how to get an access token for your project.
Note: All requests that are secured by a Section token is subject to CORS verification
API's base URL is https://sections.geeks.solutions
Models
Dashboard
Dashboard information returned that conveys package limitations and current consumption
{
"package_name": "free",
"package_locked": false,
"max_pages": 2,
"max_media_files": 10,
"max_file_size": 500000,
"current_pages": 0,
"current_medias": 0,
"api_until_reset": 46674951,
"api_limit_use": 500,
"api_current_use": 0
}
| Property | Description | Type | Required |
|---|---|---|---|
| api_current_use | current rate limtied requests ina specific day | boolean | true |
| api_limit_use | Maximum allowed rate-limited requests in a specific day - Package limitation | string | true |
| api_until_reset | Timestamp in milliseconds until the API rate-limited consumption is reset | integer | true |
| current_medias | Count of total files currently present linked to pages of this project. | integer | true |
| current_pages | Count of number of pages currently created in the project. | integer | true |
| max_file_size | Maximum allowed file size (in bytes) that can be used in pages of this project - Package limitation. | integer | true |
| max_media_files | Maximum allowed files that can be present linked to pages of this project - Package limitation. | integer | false |
| max_pages | Maximmum number of pages that can be created in the project. - Package limitation | integer | true |
| package_locked | The package's locked status the project is subscribed to. | boolean | true |
| package_name | The package's name the project is subscribed to. | string | true |
Error
Errors returned by sections
{
"error": "Section type already exists"
}
| Property | Description | Type | Required |
|---|---|---|---|
| error | Description of the error | string | false |
Invitation
This is the response of the invitation API call.
{
"invited": [
"email1@gmail.com",
"email2@gmail.com"
],
"failed_to_send": [
"email3@gmail.com"
],
"demotion": [
"superiorrole@gmail.com"
]
}
| Property | Description | Type | Required |
|---|---|---|---|
| demotion | List of emails that are already in the project and have a superior role to the invitation one. | array(any) | false |
| failed_to_send | List of failed invitation emails | array(any) | false |
| invited | List of successfully invited emails | array(any) | false |
Media
A media is an entity that presents a file in Sections
{
"type": "image",
"seo_tag": "",
"private_status": "public",
"number_of_contents": 1,
"namespace": "608c0177d66ef2000836a374",
"locked_status": "unlocked",
"id": "613874bc0a998613c74b338c",
"files": [
{
"url": "https://s3.amazonaws.com/eweevtestbucketprivate/sections%2Fa5ac5bc7e6d643f89a4f15c4d8f29aec89ba3988ab904d6aae5934719d4df19a.png",
"type": "image/png",
"thumbnail_url": "https://s3.amazonaws.com/eweevtestbucketprivate/sections%2Fa5ac5bc7e6d643f89a4f15c4d8f29aec89ba3988ab904d6aae5934719d4df19a_thumbnail.png",
"size": 25442,
"platform_id": "611610df0a998615afb99c29",
"filename": "sections/a5ac5bc7e6d643f89a4f15c4d8f29aec89ba3988ab904d6aae5934719d4df19a.png",
"file_id": "ac411a0825cd280cc219844bf3b64271-12de37"
}
],
"contents_used": [
"60cb6953d66ef20008ae2177"
],
"author": "60cb6953d66ef20008ae2177"
}
| Property | Description | Type | Required |
|---|---|---|---|
| author | The author of the media | string | false |
| contents_used | List of pages related to this media | array(any) | false |
| files | List of files | array(any) | true |
| id | Unique identifier | string | true |
| locked_status | unlocked media can be edited by any user in the project. locked medias can only be edited by their author |
string | false |
| namespace | The project id using this media | string | false |
| number_of_contents | The number of contents referencing this media | integer | false |
| private_status | public files are accessible by anyone, private files requires an STS token to be viewed |
string | false |
| seo_tag | Image Alt tag used for SEO | string | false |
| type | Media type (image, video..) | string | false |
Message
A confirmation message back to the user upon successfull action
{
"message": "Section type deleted succesfully"
}
| Property | Description | Type | Required |
|---|---|---|---|
| message | a message | string | false |
Options
Options returned by third party applications for a configurable section type
[
{
"option_values": [
1,
2,
3
],
"field": "article_ids"
}
]
| Property | Description | Type | Required |
|---|---|---|---|
| error | Array of options with their possible values | array(any) | false |
Package
A package is the subscription of your project in section. It represents what the project is offered in term of resources.
{
"type": "public",
"rank": 1,
"quota": -1,
"price": 1700,
"name": "solo",
"locked": false,
"limits": [
{
"value": 5,
"name": "number_of_pages",
"label": "Max number of pages"
},
{
"value": 3,
"name": "variation_per_page",
"label": "Max number of variation per page"
},
{
"value": 20,
"name": "static_sections",
"label": "Max number of static section types that can be declared"
},
{
"value": 10,
"name": "sections_total",
"label": "Max number of sections per page"
},
{
"value": 100,
"name": "hosted_files",
"label": "Max number of files hosted"
},
{
"value": 1000000,
"name": "size_per_file",
"label": "Maximum Size Per File (in bytes)"
},
{
"value": -1,
"name": "api_limit_sec",
"label": "API rate limit per sec"
},
{
"value": -1,
"name": "api_limit_minute",
"label": "API rate limit per minute"
},
{
"value": 500,
"name": "api_limit_hour",
"label": "API rate limit per hour"
},
{
"value": 1000,
"name": "api_limit_day",
"label": "API rate limit per day"
}
],
"label": "Standard"
}
| Property | Description | Type | Required |
|---|---|---|---|
| id | Unique identifier | string | true |
| label | The title of the package | string | false |
| limits | A list of limits, it shows up to how much resources can your project consume | array(any) | false |
| locked | Whether this package is locked and can receive new subscriptions or not | boolean | false |
| name | Unique name of the package | string | false |
| price | The price of the package in cents (ie 10,50€ is returned as 1050) | integer | false |
| quota | The number of projects allowed to use this package at any given time. -1 for unlimited | integer | false |
| rank | The package rank used to identify upgrades/downgrades between packages | integer | false |
| type | The type of the package could be private or a public one. | string | false |
Page
A page is layout of different sections grouped together.
{
"variations": [
"variation-1",
"variation-2"
],
"settings": [
{
"weight": 1,
"type": "dynamic",
"region": "bottom-left",
"name": "blogs:categories_articles",
"id": "123456789123456789123456"
}
],
"project_id": "5fe309f42a4e7d91aad8964f",
"page": "home_page",
"layout": "layout1"
}
| Property | Description | Type | Required |
|---|---|---|---|
| id | Unique identifier | string | true |
| layout | The layout title | string | false |
| metadata | An object containing the metadata of your page | map | false |
| page | Name of the page | string | true |
| path | The path under your domain to access your page, it has to be unique per project. Equals to your page name if empty | string | true |
| render_data | Data requested by the front end developer that he will use to render the content needed. | string | false |
| settings | List of sections that are included in the page | array(any) | false |
| variations | A variations for the page | string | false |
Payload
This is the registration payload to send to social connection flows.
{
"user": {
"role": "webmaster",
"invited_at": 1652524584,
"email": "email@gmail.com"
},
"project": {
"title": "My test project",
"project_url": [
"https://your.project.url.com"
],
"login_redirect_url": "https://your.project.url.com/redirect_login/admin",
"configured_fields": {
"blogs ": {
"project_id": 1,
"private_key": "xxxxxx"
}
}
},
"page": "true"
}
| Property | Description | Type | Required |
|---|---|---|---|
| page | Page creation | boolean | false |
| project | A Project that a user owns in sections it contains the project credentials and configurations | Project | true |
| user | This is Section's user model. It contains all the information that sections needs to know about you. | User | true |
Pending_Invitation
This is the response of the get pending_invitation API call.
{
"users": [
{
"role": "webmaster",
"invited_at": 1652524584,
"email": "email@gmail.com"
}
],
"total": 1
}
| Property | Description | Type | Required |
|---|---|---|---|
| total | Total of pending invitations | integer | false |
| users | List of pending invitations | array(any) | false |
Project
A Project that a user owns in sections it contains the project credentials and configurations
{
"type": "private",
"project_url": [
"https://your.project.url.com"
],
"private_key": "xxxxxx",
"package": "free",
"login_redirect_url": "https://your.project.url.com/redirect_login/admin",
"id": "601bf1221907a50007ba3f81",
"files_counter": 0,
"configured_fields": {
"blogs ": {
"project_id": 1,
"private_key": "xxxxxx"
}
},
"active": true
}
| Property | Description | Type | Required |
|---|---|---|---|
| active | The status of the project | boolean | false |
| billing_status | The Billing status of the project, can be any of upgrade_lock or upgradeable. |
||
| This is automatically set based on your company solvency status. | string | false | |
| configured_fields | A list of object (maps) that indicates the configured fields of the third party apps for this project | array(any) | false |
| id | Unique identifier | string | true |
| limitation_status | The Limitation status of the project, can be any of active, degraded or blocked. |
||
| This is automatically set based on your invoice payment status. | string | false | |
| login_redirect_url | The URL Sections redirects connected user to with the auth code to issue a valid access token. | string | false |
| package | The current subscription of the project | string | false |
| project_url | The list of base URLs of the project, used to pass CORS. You are allowed to use localhost in the list, as long as you specify the port.Local network IP Addreses are also allowed, only on HTTP and by specifying the port as well. | array(any) | false |
| reason | The reason of inactivity in case the project is inactive | string | false |
| type | The type of the project can be public or private | string | false |
Section_Type
A Section Type in Sections
{
"type": "static",
"name": "private_static",
"multiple": false,
"id": "60195bbd2a4e7df7496d9740",
"fields": "null",
"dynamic_options": false,
"application": "sections",
"access": "private"
}
| Property | Description | Type | Required |
|---|---|---|---|
| access | The access to the section type | string | false |
| application | application that declared the section type | string | false |
| authorization_fields | Used for third party integration to authorize the use who is asking for the section type | map | false |
| fields | Used for configurable Section Types fields that can be chosen to render | map | false |
| id | Unique identifier | string | true |
| name | Section type's name | string | false |
| options | Used for configurable Section Types options | map | false |
| region | The region of the layout that section type will be rendered into default to {}. | map | false |
| requirements | Shows the required fields for a public scoped section type. | array(any) | false |
| status | Shows the status for a public scoped section type. | string | false |
| type | The type of the sections i.e. static, local, configurable or dynamic | string | false |
| weight | The weight of the section type on the layout which means the order | integer | false |
Token
Certain API calls are secured with an access token, read below about authentication to know how to get an access token for your application
{
"token": "A really long string"
}
| Property | Description | Type | Required |
|---|---|---|---|
| token | An authentication token | string | false |
User
This is Section's user model. It contains all the information that sections needs to know about you.
{
"token": "A really long string"
}
| Property | Description | Type | Required |
|---|---|---|---|
| Users email | string | false | |
| roles | DEPRECATED. A list, contains the roles' IDS. | array(any) | false |
| roles_object | A lsit of objects. Each object contains the role title and id. These are the roles that are assigned tot he user. | array(any) | false |
| saas_project_id | The section project to which the user is linked to. | string | false |
1. Authentication
In order to issue secured api calls to sections you need an access token, to simplify the generation of such token we implemented a simple flow.
When you register or login successfully you will get redirected to the back office page of your project where you see your project information.
There is a field named Login Redirect Url you should populate it with the URL of a page on your project where you will run the Access Token retrieval code.
Next to the field, there is a button called Connect to your app with your sections credentials. When clicking this button you will get redirected to your website with an auth_code in the query string. This auth code is required to retrieve your access token from sections in the Get Access Token request.
Once you retrieve your token you have to include it in :ratethe header of the secured requests.
Get access token
Valid auth code
GET /api/v1/project/68fa039d88ac0f0329ce2dbc/token/53E717A5C15F303587620E1B74F25418
origin: http://514d9968-ed25-4414-9229-b30868a3a466.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzlkODhhYzBmMDMyOWNlMmRiY2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDFiNTNiMjY4MDcwMTQyYmZhOTkyNjE3ZTQ5MDMxNDVjbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgCwHp4QmgFiAAFRgA.NFGP_5fhVR1IBV4YQ4-AZ-ivUtN7Gi0qzq4aY8lgJsw
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYELo-8TQeZakABa2h
content-type: application/json; charset=utf-8
access-control-allow-origin: http://514d9968-ed25-4414-9229-b30868a3a466.com
{
"token": "SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzlkODhhYzBmMDMyOWNlMmRiY2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDFiNTNiMjY4MDcwMTQyYmZhOTkyNjE3ZTQ5MDMxNDVjbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgCwHp4QmgFiAAFRgA.NFGP_5fhVR1IBV4YQ4-AZ-ivUtN7Gi0qzq4aY8lgJsw"
}
Use a supplied auth_code to retrieve an access token. The auth_code expires in a few seconds, if you wish to test that using an API client (i.e Postman) make sure to act quickly.
Request
GET api/v1/project/{project_id}/token/{auth_code}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| auth_code | An authentication code that will be returned on redirection when you login/register successfully | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | Token |
| 410 | Error Resource | Error |
2. Working With Pages
A page is where you organize your sections in one or more layouts. In this part you will learn how to create/update/render and delete a page. Please refer to the page models to see all fields a page can contain.
Renders a page
Get an existing page with project_id
POST /api/v1/project/68fa038f88ac0f0329e83781/page/page-path-4a94c58a-29dd-4961-9933-eec4ecdd4be5
origin: http://df39ebd4-f60b-4705-8952-b271881b8b14.com
user-agent: user-agent-a469dc1c-d6c4-495f-9116-215fa37a6c87
project-id-6943cdb5-3497-45a1-bf6e-3918fa6be062: 1
content-type: multipart/mixed; boundary=plug_conn_test
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYDexwczjJresABahh
content-type: application/json; charset=utf-8
access-control-allow-origin: http://df39ebd4-f60b-4705-8952-b271881b8b14.com
{
"variations": null,
"sections": [
{
"weight": 1,
"type": "static",
"status_code": null,
"settings": {},
"render_data": "",
"region": {},
"query_string_keys": null,
"private_data": {},
"name": "section_name_695de0a0-933d-41f3-b4c8-297b7b0f87db",
"linked_to": "",
"id": "68fa039188ac0f03294f546e",
"error": null
}
],
"path": "page-path-4a94c58a-29dd-4961-9933-eec4ecdd4be5",
"page": "page_f8d3df48-c7e9-414d-9405-22e866968bb7",
"metadata": {
"project_metadata": {},
"package": {
"name": "solo",
"label": "Standard"
}
},
"layout": "layout1",
"last_updated": 1761215377,
"invalid_sections": [],
"id": "68fa0391052f506967e95675"
}
Renders a page with all the available sections declared inside.
Request
POST api/v1/project/{project_id}/page/{page_path}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| query_string | Query Strings | body | map | false | {id: 1} | |
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| page_path | The page path | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Project resource | Page |
| 404 | Error Resource | Error |
| 429 | Error Resource for rate limiting | Message |
Creates/updates a page
Create a page with valid section using medias ids
PUT /api/v1/project/68fa038a88ac0f0329401440/page/page_b52a70b5-e02f-49b3-b927-1ce9f287953e
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzhhODhhYzBmMDMyOTQwMTQ0MGptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGQwNjg1NWQ3OWFmMjRjNTRiZjFjMTQxZjk1ZjQyYjA4bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgBH1p0QmgFiAAFRgA.kdfYc2aOsthVSfv_brDqBeqI0eFrn_Ra3ENnEt5SR0k
origin: http://921ff68b-6dae-4c36-846f-67b418e9b9a3.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"variations": [
"1"
],
"sections": [
{
"weight": 1,
"region": {
"layout1": {
"weight": 1,
"slot": "main"
}
},
"private_data": {
"data": "test123"
},
"options": [
{
"image": {
"media_id": "68fa038c88ac0f0329164156"
}
}
],
"name": "section_name_342f24bc-206f-4679-bd09-399eb203c0ff"
}
],
"path": "my-page-path",
"metadata": {
"title": "Page Title",
"description": "Page SEO Description"
},
"layout": "layout1"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYDOaEGMqwfpcABabB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://921ff68b-6dae-4c36-846f-67b418e9b9a3.com
{
"variations": [
"1"
],
"sections": [
{
"weight": 1,
"type": "static",
"status_code": null,
"settings": [
{
"image": {
"url": "https://www.fake-url.com/d9db3bc31fd04b4da22fe5a1f7a9de59",
"seo_tag": null,
"metadata": null,
"media_id": "68fa038c88ac0f0329164156"
}
}
],
"render_data": "",
"region": {
"layout1": {
"weight": 1,
"slot": "main"
}
},
"query_string_keys": null,
"private_data": {
"data": "test123"
},
"name": "section_name_342f24bc-206f-4679-bd09-399eb203c0ff",
"linked_to": "",
"id": "68fa038d88ac0f0329709593",
"error": null
}
],
"path": "my-page-path",
"page": "page_b52a70b5-e02f-49b3-b927-1ce9f287953e",
"metadata": {
"title": "Page Title",
"description": "Page SEO Description"
},
"layout": "layout1",
"last_updated": 1761215373,
"invalid_sections": [],
"id": "68fa038d052f506967e9561b"
}
Upsert a page in your project with all the sections declared and their configuration so when rendering the page the user gets the same result.
To use a global section instance in a page you add a section object with a weight and the name of the global section in the linked_to field. For ex:
{
"sections": [{
"weight": 2,
"linked_to": "test"
}]
}
The content of the global instance will automatically be added to your page and any update to the global instance will be synchronized inside your page
If you wish to create an empty page, simply supply an empty sections list in the payload.
For each section you can provide options.
In the options you can add files for you to use. In order to add a file for a static section type.
You need to add the fields that declare files in that section type. For ex:
{
"fields": [
{
"type": "image",
"name": "profile_image"
},
{
"type": "image",
"name": "cover_image"
}
]
}
Now in the options you can provide an existing media id to link to a section on a page.
"options": [{"profile_image": {"media_id": "media_id"}}]
For More details on Medias, please head to the Medias section below.
DEPRECATED: you can also provide the image like that:
"options": [{"profile_image": "A BASE 64 file string"}]
The base64 will be transformed into a media file on the fly. This method will be dropped in an upcoming update.
Request
PUT api/v1/project/{project_id}/page/{page_name}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| page_name | The page name | query_string | string | true | ||
| token | Sections Token | header | string | true | ||
| variations | In case you need no Variations of the page send an empty list or null | body | array | true | {'variations': ['page1', 'page2']} | |
| sections | List of sections that are going to be rendered in the page | body | array | true | {'sections': []} | |
| layout | Layout title of the page | body | string | false | {'layout': 'main'} | |
| url | Url of the page as the Path to access it (ie https://www.example.com/{url}) | body | string | true | {'url': 'my-page-url'} | |
| metadata | Metadata of the page | body | map | false | {'metadata': {'title': 'My Page Title', 'description': 'SEO Description'}} |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Project resource | Page |
| 401 | Error Resource | Error |
| 402 | Error Resource | Error |
Deletes a page
delete a page
DELETE /api/v1/project/68fa039288ac0f0329e5ad2c/page/68fa0392052f506967e9568b
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzkyODhhYzBmMDMyOWU1YWQyY2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGE0ODc5NTMwNjQ5MDQ2MWI4Y2ZlZGExY2Q3YzdjN2U4bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgDo8p0QmgFiAAFRgA.5kD_ETU3QBNRJhxXS5452F73UxOknrGiqDUp4F1Kw0o
origin: http://8a37fc39-fdc4-42f6-af3f-a8b2a037bb2c.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYDiM79f08imwABakB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://8a37fc39-fdc4-42f6-af3f-a8b2a037bb2c.com
{
"message": "Successfully deleted 68fa0392052f506967e9568b"
}
Deletes the page for your project. This call will erase all the data you have stored for the sections added in this particular page.
Request
DELETE api/v1/project/{project_id}/page/{page_id}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| page_id | The page id in Sections | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Project resource | Message |
| 401 | Error Resource | Error |
| 404 | Error Resource | Error |
3. Working With Section Types
### Sections supports four section types:
Local: This section type is totally declared and rendered on your frontend project. We have added support for such contents so you can blend it with the rest of section and define where in the page this content should display in between other sections. To add a local section to your page you just need to add a section object to your payload with type
localand a name of your choice so you can then match it to the right content to render when you are to render the page to your visitor.Static: Static sections are supported out of the box. A static section is a very simple piece of content that provides a basic object storage for the frontend developer. This section can be used to store simple html, medias, DEPRECATED: images in base64 format (do not abuse it :-), or even JS/CSS code if you need to. This section is called static because from a server's perspective the content returned by this section is directly loaded from the Database with no processing, yet you can, as a frontend developer provide very dynamic end results by relying on external APIs at the javascript level (i.e facebook plugins, api request on frontend level etc...). You are just limited by your imagination here.
Dynamic: A dynamic section type is a bit more interesting as the content of such sections will be loaded dynamically server side. A dynamic section type will be declared by a backend third party and it will be called each time this section is requested for rendering.
Configurable: A configurable section is similar to a dynamic one as both have dynamic contents. The difference here is that a configurable section has options that the page editor can choose from. These options are stored in sections and provided to the third party server for rendering so you don't have to worry about that.
Accesses
Accesses to section types varies between:
Public is obviously public to anyone to use. So a public section type can be used by any user from any project. A section will be always declared private. However, only admins of sections can make a section type public. So you should ask them for that, they will review it and take action.
Private section type is only accessible by the project who declared the section type using his project_id and private key as mentioned in the
prerequisitesabove. The project id and private key will be used to make sure that this private section type will only be accessible by the declarer’s project.Public scoped is a public section type that needs authorization to be used. It is accessible to anyone who is authorized to see it. So the project owner will need to pass authorization fields when rendering a public scoped section type in order to be granted the access for it. The authorization fields are per application level. So it only needs to be sent once (the first time). Then the application gains access if the authorization fields are valid.
Returns the list of section types the project owns
GET Section Types
GET /api/v1/project/68fa03cd88ac0f0329dd24b7/section-types
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2NkODhhYzBmMDMyOWRkMjRiN2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDYyYWUyZTJiNzg1ZjRjNDBhMWM1MzY3M2M2ZDgyYjBhbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgA53J4QmgFiAAFRgA.Lq0FMQSWYr-V8LBNhE6FKO9qJ6KIYkQKMAFfNXPKyTQ
origin: http://9b41381c-bef6-4896-832b-9f66e4507bad.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHAPjMQ3nayoABcdh
content-type: application/json; charset=utf-8
access-control-allow-origin: http://9b41381c-bef6-4896-832b-9f66e4507bad.com
{
"data": [
{
"type": "static",
"name": "wysiwyg",
"multiple": false,
"id": "68fa0361052f506967e951cc",
"fields": null,
"dynamic_options": false,
"application_id": null,
"application": "sections",
"access": "public"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03a888ac0f0329ecd652:top_articles",
"multiple": false,
"id": "68fa03a9052f506967e9587b",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03a888ac0f0329ecd652",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03a888ac0f0329ecd652:selective_articles",
"multiple": true,
"id": "68fa03a9052f506967e9587d",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03a888ac0f0329ecd652",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03a888ac0f0329ecd652:needs_query_string",
"multiple": false,
"id": "68fa03a9052f506967e9587f",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03a888ac0f0329ecd652",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03aa88ac0f03297ecf4b:top_articles",
"multiple": false,
"id": "68fa03aa052f506967e958a3",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03aa88ac0f03297ecf4b",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03aa88ac0f03297ecf4b:selective_articles",
"multiple": true,
"id": "68fa03aa052f506967e958a5",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03aa88ac0f03297ecf4b",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03aa88ac0f03297ecf4b:needs_query_string",
"multiple": false,
"id": "68fa03aa052f506967e958a7",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03aa88ac0f03297ecf4b",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03ac88ac0f0329df398e:top_articles",
"multiple": false,
"id": "68fa03ad052f506967e958de",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03ac88ac0f0329df398e",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03ac88ac0f0329df398e:selective_articles",
"multiple": true,
"id": "68fa03ad052f506967e958e0",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03ac88ac0f0329df398e",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03ac88ac0f0329df398e:needs_query_string",
"multiple": false,
"id": "68fa03ad052f506967e958e2",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03ac88ac0f0329df398e",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key"
],
"query_string_keys": null,
"name": "68fa03ac88ac0f0329df398e:check",
"multiple": false,
"id": "68fa03ad052f506967e958e4",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03ac88ac0f0329df398e",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03ae88ac0f032969f8b7:top_articles",
"multiple": false,
"id": "68fa03af052f506967e95906",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03ae88ac0f032969f8b7",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03ae88ac0f032969f8b7:selective_articles",
"multiple": true,
"id": "68fa03af052f506967e95908",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03ae88ac0f032969f8b7",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03ae88ac0f032969f8b7:needs_query_string",
"multiple": false,
"id": "68fa03af052f506967e9590a",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03ae88ac0f032969f8b7",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03b188ac0f0329ae9c57:top_articles",
"multiple": false,
"id": "68fa03b2052f506967e95933",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03b188ac0f0329ae9c57",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03b188ac0f0329ae9c57:selective_articles",
"multiple": true,
"id": "68fa03b2052f506967e95935",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03b188ac0f0329ae9c57",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03b188ac0f0329ae9c57:needs_query_string",
"multiple": false,
"id": "68fa03b2052f506967e95937",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03b188ac0f0329ae9c57",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03b588ac0f032961c6e0:top_articles",
"multiple": false,
"id": "68fa03b6052f506967e9596a",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03b588ac0f032961c6e0",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03b588ac0f032961c6e0:selective_articles",
"multiple": true,
"id": "68fa03b6052f506967e9596c",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03b588ac0f032961c6e0",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03b588ac0f032961c6e0:needs_query_string",
"multiple": false,
"id": "68fa03b6052f506967e9596e",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03b588ac0f032961c6e0",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03b788ac0f0329bb7c1c:top_articles",
"multiple": false,
"id": "68fa03b8052f506967e95995",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03b788ac0f0329bb7c1c",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03b788ac0f0329bb7c1c:selective_articles",
"multiple": true,
"id": "68fa03b8052f506967e95997",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03b788ac0f0329bb7c1c",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03b788ac0f0329bb7c1c:needs_query_string",
"multiple": false,
"id": "68fa03b8052f506967e95999",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03b788ac0f0329bb7c1c",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03ba88ac0f0329be096c:top_articles",
"multiple": false,
"id": "68fa03bb052f506967e959d0",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03ba88ac0f0329be096c",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03ba88ac0f0329be096c:selective_articles",
"multiple": true,
"id": "68fa03bb052f506967e959d2",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03ba88ac0f0329be096c",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03ba88ac0f0329be096c:needs_query_string",
"multiple": false,
"id": "68fa03bb052f506967e959d4",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03ba88ac0f0329be096c",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03bc88ac0f03294348bd:top_articles",
"multiple": false,
"id": "68fa03bd052f506967e959fb",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03bc88ac0f03294348bd",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03bc88ac0f03294348bd:selective_articles",
"multiple": true,
"id": "68fa03bd052f506967e959fd",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03bc88ac0f03294348bd",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03bc88ac0f03294348bd:needs_query_string",
"multiple": false,
"id": "68fa03bd052f506967e959ff",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03bc88ac0f03294348bd",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03be88ac0f0329c893b9:top_articles",
"multiple": false,
"id": "68fa03bf052f506967e95a20",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03be88ac0f0329c893b9",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03be88ac0f0329c893b9:selective_articles",
"multiple": true,
"id": "68fa03bf052f506967e95a22",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03be88ac0f0329c893b9",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03be88ac0f0329c893b9:needs_query_string",
"multiple": false,
"id": "68fa03bf052f506967e95a24",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03be88ac0f0329c893b9",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c088ac0f03293643db:top_articles",
"multiple": false,
"id": "68fa03c1052f506967e95a49",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c088ac0f03293643db",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c088ac0f03293643db:selective_articles",
"multiple": true,
"id": "68fa03c1052f506967e95a4b",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03c088ac0f03293643db",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03c088ac0f03293643db:needs_query_string",
"multiple": false,
"id": "68fa03c1052f506967e95a4d",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c088ac0f03293643db",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c288ac0f0329979317:top_articles",
"multiple": false,
"id": "68fa03c3052f506967e95a6f",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c288ac0f0329979317",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c288ac0f0329979317:selective_articles",
"multiple": true,
"id": "68fa03c3052f506967e95a71",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03c288ac0f0329979317",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03c288ac0f0329979317:needs_query_string",
"multiple": false,
"id": "68fa03c3052f506967e95a73",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c288ac0f0329979317",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c488ac0f0329349c4b:top_articles",
"multiple": false,
"id": "68fa03c5052f506967e95a93",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c488ac0f0329349c4b",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c488ac0f0329349c4b:selective_articles",
"multiple": true,
"id": "68fa03c5052f506967e95a95",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03c488ac0f0329349c4b",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03c488ac0f0329349c4b:needs_query_string",
"multiple": false,
"id": "68fa03c5052f506967e95a97",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c488ac0f0329349c4b",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c588ac0f0329920603:top_articles",
"multiple": false,
"id": "68fa03c6052f506967e95ab7",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c588ac0f0329920603",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c588ac0f0329920603:selective_articles",
"multiple": true,
"id": "68fa03c6052f506967e95ab9",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03c588ac0f0329920603",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03c588ac0f0329920603:needs_query_string",
"multiple": false,
"id": "68fa03c6052f506967e95abb",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c588ac0f0329920603",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c788ac0f03295beadb:top_articles",
"multiple": false,
"id": "68fa03c8052f506967e95ad5",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c788ac0f03295beadb",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03c788ac0f03295beadb:selective_articles",
"multiple": true,
"id": "68fa03c8052f506967e95ad7",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03c788ac0f03295beadb",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": [
"title",
"name"
],
"name": "68fa03c788ac0f03295beadb:needs_query_string",
"multiple": false,
"id": "68fa03c8052f506967e95ad9",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03c788ac0f03295beadb",
"application": "App Title",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "dynamic",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03cb88ac0f0329628ef0:top_articles",
"multiple": false,
"id": "68fa03cc052f506967e95b42",
"fields": [],
"dynamic_options": false,
"application_id": "68fa03cb88ac0f0329628ef0",
"application": "68fa03cb88ac0f0329628ef0",
"app_status": "disbaled",
"access": "public_scoped"
},
{
"type": "configurable",
"requirements": [
"private_key",
"project_id"
],
"query_string_keys": null,
"name": "68fa03cb88ac0f0329628ef0:selective_articles",
"multiple": true,
"id": "68fa03cc052f506967e95b44",
"fields": [
{
"type": "integer",
"name": "articles_ids",
"key": "articles_ids"
}
],
"dynamic_options": true,
"application_id": "68fa03cb88ac0f0329628ef0",
"application": "68fa03cb88ac0f0329628ef0",
"app_status": "disbaled",
"access": "public_scoped"
}
]
}
Load all the section types the project has access to. This can be custom static section types, private section types or public ones exposed by other backend third party developers. For section types with public scoped access you can know their status and required fields in this call also the application id to which they belong. This is helpful for updating your security fields for the considered application.
Request
GET api/v1/project/{project_id}/section-types
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | List of section types resource | Section_Type |
| 401 | Error Resource | Error |
Edits a global section instance
Edit a global Section instance
PUT /api/v1/project/68fa03ca88ac0f0329995d4d/global-instances/global_section
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2NhODhhYzBmMDMyOTk5NWQ0ZGptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDA2MzBmMDQwNGNiNTRiYTQ4ZjE5ZjU3ZWMwZDBjYTAxbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgCwz54QmgFiAAFRgA.8uI_Y4b0_Ig8jUBm5PwQ526mS-B5C2x3Amd2MWd4mq8
origin: http://efa2bef9-71c3-4da1-bc37-9274eed7cb53.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"section": {
"type": "static",
"name": "wysiwyg"
},
"auto_insertion": false
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYG0qMU9bE6YIABcRB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://efa2bef9-71c3-4da1-bc37-9274eed7cb53.com
{
"section": {
"type": "static",
"name": "wysiwyg"
},
"pages": [],
"name": "global_section",
"id": "68fa03ca88ac0f0329995d4f",
"auto_insertion": false
}
Edits an existing standalone section that you can use in multiple pages. Editing this global section instance will update it on all the pages where its being used.
Request
PUT api/v1/project/:project_id/global-instances/:name
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| section_name | Section name | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | Section_Type |
| 400 | Error Resource | Error |
| 401 | Error Resource | Error |
Deletes a global section instance by its name
Delete a specific Global Sections by its name
DELETE /api/v1/project/68fa03cf88ac0f03292b915b/global-instances/global_section
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2NmODhhYzBmMDMyOTJiOTE1YmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDA3NWNkZjNiZGU1OTRkYzE4M2QxY2NlN2MwMjkyNzQ1bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgD14J4QmgFiAAFRgA.W0Fn4i_kL-kn-1WEs2NtxJ6IeH1TVaroBcFo7CJVNYg
origin: http://13338d5b-1630-42e4-a21e-cca920ee58bc.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHFHLjHvZmugABcih
content-type: application/json; charset=utf-8
access-control-allow-origin: http://13338d5b-1630-42e4-a21e-cca920ee58bc.com
{
"message": "Deleted successfully."
}
Removes the Global Instance from the project. If the Global Instance is being used in a page it can't be removed
Request
DELETE api/v1/project/:project_id/global-instances/:name
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| section_name | Section name | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | Section_Type |
| 400 | Error Resource | Error |
| 401 | Error Resource | Error |
| 423 | Error Resource Locked | Error |
Creates a static section type
Create Static ST
POST /api/v1/project/68fa03d088ac0f0329841999/section-types/section_name_eaf93d23-c85f-46ae-a0f6-0b1d595cf29e
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2QwODhhYzBmMDMyOTg0MTk5OWptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGJhMTYxZTMzNDA5NDQzNjk4NDJkZjJkZDUzYTcwNGFkbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgB75p4QmgFiAAFRgA.c26JFrbSWmKfDORY-ZW_xA86CN7sMx0z1kbY0QstIk8
origin: http://15ad6eab-f67a-49d3-bbc8-d2794295c805.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"fields": [
{
"type": "image",
"name": "profile"
},
{
"type": "image",
"name": "profile1"
}
]
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHKBqAfvIDOoABclh
content-type: application/json; charset=utf-8
access-control-allow-origin: http://15ad6eab-f67a-49d3-bbc8-d2794295c805.com
{
"type": "static",
"name": "section_name_eaf93d23-c85f-46ae-a0f6-0b1d595cf29e",
"multiple": false,
"id": "68fa03d088ac0f032984199a",
"fields": [
{
"type": "image",
"name": "profile"
},
{
"type": "image",
"name": "profile1"
}
],
"dynamic_options": false,
"application_id": null,
"application": "sections",
"access": "private"
}
Declares a PRIVATE static section type for your project. Private sections are exclusive to only one project so these will only be visible by you.
Request
POST api/v1/project/{project_id}/section-types/{section_name}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| section_name | Section name | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | Section_Type |
| 400 | Error Resource | Error |
| 401 | Error Resource | Error |
| 402 | Error when you reach your package limitation | Error |
Renders the requested section's data
Render an existing ST
POST /api/v1/project/68fa03d388ac0f03299ec904/section/render
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2QzODhhYzBmMDMyOTllYzkwNGptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGEzZTY4MDYxOTFhMDRiYWZiMTZlYWRjZTY0YTQxMTcxbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgDJ8Z4QmgFiAAFRgA.LgN4Q7E1m85MNRm3PyqfKj_dcYLVwQDBhbxdXhCicPU
origin: http://7b26800c-4d2d-43d2-8986-d7064e1a6d4d.com
user-agent: user-agent-166418a0-4134-45de-9b20-cbb63e6ced7b
project-id-3e4dedf7-04c7-4b2c-87b6-af9818074b6d: 1
content-type: multipart/mixed; boundary=plug_conn_test
{
"section": {
"weight": 1,
"name": "section_name_a42c724d-81e3-4419-9596-159c7da6814a"
}
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHVNpmkumi44ABcyh
content-type: application/json; charset=utf-8
access-control-allow-origin: http://7b26800c-4d2d-43d2-8986-d7064e1a6d4d.com
{
"weight": 1,
"type": "static",
"status_code": null,
"settings": {},
"render_data": "",
"region": {},
"query_string_keys": null,
"private_data": {},
"name": "section_name_a42c724d-81e3-4419-9596-159c7da6814a",
"linked_to": "",
"id": "68fa03d388ac0f03299ec906",
"error": null
}
Renders the section's data for a preview. When rendering a public scoped section type and the request returns an unauthorized request error (status code 401). The section's status will be updated to invalid. Then it will need the user's intervention to update his credentials for this section's application using this endpoint so the status gets adjusted again.
Request
POST api/v1/project/{project_id}/section/render
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| query_string | Query Strings | body | map | false | {id: 1} | |
| section | A map containing the section name and its order (weight) in the page | body | map | true | {section: {name: '6038e54de3ba240007b07913:categories_articles', weight: '1'} } | |
| base_path | The path of the page, to relay to third party backend app in the context for rendering | query_string | string | false |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | Section_Type |
| 400 | Error Resource | Error |
| 401 | Error Resource | Error |
Gets a configurable section type's options
Returning the options of a configurable section type to Sections
GET /api/v1/project/68fa03cb88ac0f0329628eef/section/68fa03cb88ac0f0329628ef0%3Aselective_articles/options
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2NiODhhYzBmMDMyOTYyOGVlZmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDljZTA5MDQxNGU1ZjQyZWE4M2RlOWQ5NjA2YWQ5ODY3bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgCo0Z4QmgFiAAFRgA.ydnKFHN1Xb2UI_SSIOvnPm6ibiyEU6x95aGh3_Ft5Uo
origin: http://c103db9c-69e1-4c75-81db-0a6a425c753c.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYG535hZiNEb0ABcUB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://c103db9c-69e1-4c75-81db-0a6a425c753c.com
[
{
"option_values": [
{
"title": "Article 1",
"id": 1
},
{
"title": "Article 2",
"id": 2
}
],
"field": "article_ids"
}
]
Gets a configurable section type's options from the third party application. This is used so the user can choose the options he wants in order to render the configurable section type customized to his needs.
Request
GET api/v1/project/{project_id}/section/{section_name}/options
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| section_name | Section name | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Options resource | Options |
| 400 | Error Resource | Error |
| 404 | Error Resource | Error |
Deletes a static section type
Delete Static ST
DELETE /api/v1/project/68fa03d288ac0f03294ffd50/section-types/section_name_1d087cdf-3214-4cf9-bcae-f1710f807f88
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2QyODhhYzBmMDMyOTRmZmQ1MGptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDRjY2M0NjE4ZTMyZTQ4OTFhNmQ2NWEzODZmNmE1YmM5bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgDO7Z4QmgFiAAFRgA.J9fQ9a_bJZjvflVvcP4nXOey593tXBtGW138G75iP5A
origin: http://050eb768-f2ba-45e2-b840-c941e4a29c23.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHRcKM7D0d9QABctB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://050eb768-f2ba-45e2-b840-c941e4a29c23.com
{
"message": "Deleted successfully."
}
Deletes a static section type
Request
DELETE api/v1/project/{project_id}/section-types/{section_name}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| section_name | Section name | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | message resource | Message |
| 404 | Error Resource | Error |
Update the authorization fields for the considered app on your project
Upsert authorization fields for an application
PUT /api/v1/project/68fa03ce88ac0f03298918cb/authorization_fields/123456
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2NlODhhYzBmMDMyOTg5MThjYmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGI1ZDA5MGZmODdjODRhNzk5MzRkNjMwODAzZmVkYTM4bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgCU3Z4QmgFiAAFRgA.5qCisKyd3l3EjT3NAcQAqq7-XQzsZZgv8SLrs28eZhI
origin: http://f0beddbb-2e86-499a-836d-6b4f68383c9d.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"authorization_fields": {
"project_id": 38,
"private_key": "private_key_hashed"
}
}
Response
404
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHBiU4RFI9RgABceh
content-type: application/json; charset=utf-8
access-control-allow-origin: http://f0beddbb-2e86-499a-836d-6b4f68383c9d.com
{
"options": {},
"message": "The app does not exist"
}
It verifies the authorization fields provided.
If the fields are valid then the project's configured fields will be updated to include this app's credentials.
These credentials will be used to render any public_scoped section decalred by the third party app.
In case the credentials become invalid their status will be updated and it will need an update from the user.
This call will let you retrieve the application id for any public_scoped section.
If you wish to unauthorize a particular app, you should update your project with the following payload:
{
"configured_fields": {
{replace_with_app_id}: {
"app_status": "disabled"
}
}
}
You can add several app_ids if you wish to unauthorize multiple apps at the same time.
Request
PUT api/v1/project/{project_id}/authorization_fields/{application_id}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| application_id | The application's id in Sections | query_string | string | true | ||
| authorization_fields | Authorization fields used to authenticate your request to third party services (only for public scoped section types) | body | map | true | {authorization_fields: {username: 'You', password: 'are awsome'} } |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Project resource | Project |
| 410 | Error Resource | Error |
Creates a global section instance
Create a global Section instance
POST /api/v1/project/68fa03d188ac0f0329979f8e/global-instances/global_section
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2QxODhhYzBmMDMyOTk3OWY4ZWptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDU5MzNjZjE4ZTJmODQwMTI5NDliYWE2NzkzYmZmYjZkbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgBh6Z4QmgFiAAFRgA.K9MuL70avQKVI8GTv20mzA0NDANQ-kKN76U7RzLUYtU
origin: http://c8448db1-f284-4da8-9497-6defb632c205.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"section": {
"weight": 2,
"type": "static",
"options": [
{
"data": "Test Wysiwyg content"
}
],
"name": "wysiwyg"
},
"regions": {
"standard": 1
}
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHMyjQSvwFs4ABcoB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://c8448db1-f284-4da8-9497-6defb632c205.com
{
"section": {
"weight": 2,
"type": "static",
"options": [
{
"data": "Test Wysiwyg content"
}
],
"name": "wysiwyg"
},
"pages": [],
"name": "global_section",
"id": "68fa03d188ac0f0329979f90",
"auto_insertion": false
}
Creates a standalone section that you can use in multiple pages. Editing this global section instance will update it on all the pages where its being used.
Request
POST api/v1/project/:project_id/global-instances/:name
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| global_instance_name | Global Instance name | query_string | string | true | ||
| section | A map containing the section name and its order (weight) in the page | body | map | true | {section: {name: '6038e54de3ba240007b07913:categories_articles', weight: '1'} } | |
| auto_insertion | Indicate whether this section should be automatically added when a new page is being created. No effect on the API, just an indication to the page creator application | body | boolean | false |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Global section instance | Section_Type |
| 400 | Error Resource | Error |
| 401 | Error Resource | Error |
List global section instances of a given project
List Global Sections of a given project
GET /api/v1/project/68fa03d288ac0f03294ffd52/global-instances
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2QyODhhYzBmMDMyOTRmZmQ1MmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDE3YTBkNjgxMWM5NjRmYWJiM2Q5Yjc1NTRlM2QzNGUxbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgCo754QmgFiAAFRgA.48K6YYn54uYxZzvpEmBy9aZ3wVHZ61_AO2yIh6TWAa4
origin: http://2af2224e-b716-439c-a272-ab4507717d5d.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHThL0AEiZs8ABcwB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://2af2224e-b716-439c-a272-ab4507717d5d.com
{
"total": 2,
"data": [
{
"section": {
"type": "static",
"name": "wysiwyg"
},
"pages": [],
"name": "global_section",
"id": "68fa03d288ac0f03294ffd54",
"auto_insertion": false
},
{
"section": {
"type": "static",
"name": "wysiwyg"
},
"pages": [],
"name": "global_section_2",
"id": "68fa03d388ac0f03299ec903",
"auto_insertion": false
}
]
}
List all the Global instances of a given project
Request
GET api/v1/project/:project_id/global-instances
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | Section_Type |
| 400 | Error Resource | Error |
| 401 | Error Resource | Error |
Get a global section instance by its name
Get a specific Global Sections by its name
GET /api/v1/project/68fa03d188ac0f0329979f92/global-instances/global_section
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2QxODhhYzBmMDMyOTk3OWY5MmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDIxYTIyZjkwM2MwNTRhNmE4OWIyNzY5YzUzNjZiM2JkbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgAJ7J4QmgFiAAFRgA.trkaYejSJm7ux2d6680nGRsZUgZ9Ohisz-VqiN4e4J0
origin: http://951f69ee-44ba-4588-bd39-865700c49007.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHPsDXrpZtAAABcrB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://951f69ee-44ba-4588-bd39-865700c49007.com
{
"section": {
"type": "static",
"name": "wysiwyg"
},
"pages": [],
"name": "global_section",
"id": "68fa03d188ac0f0329979f94",
"auto_insertion": false
}
Returns the global instance with the provided name that belongs to the project
Request
GET api/v1/project/:project_id/global-instances/:name
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| section_name | Section name | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | Section_Type |
| 400 | Error Resource | Error |
| 401 | Error Resource | Error |
4. Packages and API limits
To ensure a faire usage from all users and provide a stable quality of service we have two layers of limitations, the first one is based on the resources your project can use, the bigger the package the more resources you are allowed to use (i.e number of pages, number of static sections types etc...). Once you reach a limit, any tentative to cross this limit will return an error with code 402. The only way for you to overcome this is to free up some resources or to upgrade your package.
Then we also are capping the number of requests you can issue on a project, here again the package you are on will define your cap. The bigger the package the more API requests you will be authorized to submit. If you reach your limit, any further requests will error with code 429. These limits gets reset per time cycle, you can either wait for the cycle to reset your limit or you can upgrade your package to overcome this limit.
Read below to retrieve your project package with the details of the limits applying to it
Gets the current package of the project
GET a package by name and active package/
GET /api/v1/project/68fa03da88ac0f0329e2f66f/active_package
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2RhODhhYzBmMDMyOWUyZjY2ZmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDNjYTE2NDIyNTc3MTQ1YmQ4NzNiMDY5YWJiZjkzMzc5bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgBWDp8QmgFiAAFRgA.RYqGZ3ZYcKLrH5Q_dfqTfcDcDZnrAChj3iOxcmGAKcU
origin: http://7a43b814-fb00-44a0-bee2-753fcd4660fd.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHwnp_vixlRMABdSB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://7a43b814-fb00-44a0-bee2-753fcd4660fd.com
{
"usage": null,
"type": "public",
"rank": 0,
"quota": -1,
"price": 0,
"name": "free",
"locked": false,
"limits": [
{
"value": 0,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 5,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": 500,
"unit_price": 1,
"name": "api_limit_day",
"included": 1
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 1,
"name": "users"
},
{
"value": 2,
"name": "domains"
}
],
"label": "Free",
"id": "68fa036188ac0f0329457178",
"availability": null
}
This call will return the package name and associated limits for your project
Request
GET /api/v1/project/{project_id}/active_package
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| token | Sections Token | header | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Package Resource | Package |
Get available packages
GET all public packages
GET /api/v1/project/68fa03de88ac0f03291f1bfb/packages
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAVhZG1pbm0AAAAPc2Fhc19wcm9qZWN0X2lkbQAAABg2OGZhMDNkZTg4YWMwZjAzMjkxZjFiZmJqbQAAAAZzdGF0dXNtAAAACHZlcmlmaWVkbQAAAAd1c2VyX2lkbQAAACA2NGI0YjY4Yzg1ZmY0Y2IzODQ5ZjMxODQ2ZGIyMjk2MG0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYA3R2fEJoBYgABUYA.uwvEafJIoeHXya1Fb3d3olvOaJHvV1Z6sKSkvmssWtI
origin: http://2cc12a3d-feee-4675-ad4e-5d720f229e72.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYH-14DeoITQIABdjB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://2cc12a3d-feee-4675-ad4e-5d720f229e72.com
{
"total": 10,
"data": [
{
"usage": null,
"type": "public",
"rank": 2,
"quota": 2,
"price": 14900,
"name": "corporate",
"locked": false,
"limits": [
{
"value": -1,
"unit_price": 150,
"name": "number_of_pages",
"included": 10
},
{
"value": -1,
"name": "query_string_support"
},
{
"value": 5,
"name": "variation_per_page"
},
{
"value": 20,
"name": "static_sections"
},
{
"value": 15,
"name": "sections_total"
},
{
"value": 300,
"name": "hosted_files"
},
{
"value": 2000000,
"name": "size_per_file"
},
{
"value": -1,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_minute"
},
{
"value": 3000,
"name": "api_limit_hour"
},
{
"value": 20000,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 5,
"name": "users"
},
{
"value": -1,
"unit_price": 1000,
"name": "domains",
"included": 3
}
],
"label": "Corporate",
"id": "68fa036188ac0f032945717a",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 0,
"quota": -1,
"price": 0,
"name": "free",
"locked": false,
"limits": [
{
"value": 0,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 5,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": 500,
"unit_price": 1,
"name": "api_limit_day",
"included": 1
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 1,
"name": "users"
},
{
"value": 2,
"name": "domains"
}
],
"label": "Free",
"id": "68fa036188ac0f0329457178",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "new_name",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 100,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "Free",
"id": "68fa03d788ac0f032989de31",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "package_by_id",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 100,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "Free",
"id": "68fa03dc88ac0f0329f57649",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "premium",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 20,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 7,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "premium",
"id": "68fa03d888ac0f0329b4807d",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 5,
"quota": -1,
"price": 10,
"name": "qs_enabled",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 3,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 100,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "QS_enabled",
"id": "68fa036488ac0f03293b8520",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 1,
"quota": 1,
"price": 0,
"name": "quota_1",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": -1,
"name": "api_limit_minute"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 1,
"name": "users"
},
{
"value": 1,
"name": "domains"
}
],
"label": "quota_1_label",
"id": "68fa036388ac0f032987dcc9",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 1,
"quota": 0,
"price": 0,
"name": "quota_register",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": -1,
"name": "api_limit_minute"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 1,
"name": "users"
},
{
"value": 1,
"name": "domains"
}
],
"label": "quota_r_label",
"id": "68fa039a88ac0f0329e79eab",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 1,
"quota": -1,
"price": 2900,
"name": "solo",
"locked": false,
"limits": [
{
"value": 0,
"name": "query_string_support"
},
{
"value": 5,
"name": "number_of_pages"
},
{
"value": 2,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 10,
"name": "sections_total"
},
{
"value": 100,
"name": "hosted_files"
},
{
"value": 1000000,
"name": "size_per_file"
},
{
"value": -1,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_minute"
},
{
"value": 500,
"name": "api_limit_hour"
},
{
"value": 1000,
"unit_size": 100,
"unit_price": 2,
"name": "api_limit_day",
"included": 5
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 1,
"name": "domains"
}
],
"label": "Standard",
"id": "68fa036188ac0f0329457179",
"availability": null
},
{
"usage": null,
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "something",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 100,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "Free",
"id": "68fa03db88ac0f03296540df",
"availability": null
}
]
}
This call will list all the public and private packages with their attached limits that your project can subscribe to. If you have specific needs requiring the customization of certains limits, contact us to build with you a custom private package. Note that locked package won't be returned here unless it is the package you are already subscribed to. If you update your project from a locked package to another one, you won't be able to come back to the locked package.
Request
GET /api/v1/project/{project_id}/packages
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| token | Sections Token | header | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | List of package resource | Package |
5. User Management
This part will guide on how to manage your account on Sections.
Register through the API
Register user and project with root page
POST /api/v1/register
origin: http://clientapp.com:3001
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwNDVmODhhYzBmMDMyOTJmN2M3OWptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDFhNzEwOWIxNjY5ZjQ5MGFhMGY0YzY0N2ZmZTNiZmFjbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgCSF6EQmgFiAAFRgA.qbARSH8MuOEOiaCE9b8A3_a0UxgMEAJw7hCtr1chdMk
content-type: multipart/mixed; boundary=plug_conn_test
{
"user": {
"terms_conditions": true,
"password": "password",
"full_name": "Fullname",
"email": "success@gmail.com"
},
"project": {
"title": "Your Project Title",
"project_url": [
"your.great_url.com"
],
"login_redirect_url": "https://your.great_url.com"
},
"page": true
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYPhiQtKyGhoEABULi
content-type: application/json; charset=utf-8
access-control-allow-origin: http://clientapp.com:3001
{
"data": {
"user": {
"user_id": "123userid123",
"saas_project_id": [
{
"title": "Your Project Title",
"saas_project_id": "68fa046088ac0f032981a423",
"role": "admin"
}
],
"last_login": 1761215584,
"full_name": "Someone",
"email": "someoneb67b5a16a6d544caba2874df14825d66@eweev.com"
},
"token": {
"token": "this is a token"
},
"project": {
"type": "private",
"title": "Your Project Title",
"section_types_count": null,
"reason": null,
"project_url": [
"your.great_url.com"
],
"private_packages": null,
"private_key": "$2b$12$in/rZtITVzoly2pIowOAxuBLpzVlj5Q99UlrHbvq9PuVZByo9QPoe",
"pages_count": null,
"package_label": null,
"package": {
"type": "public",
"rank": 0,
"quota": -1,
"project_id": null,
"price": 0,
"name": "free",
"locked": false,
"limits": [
{
"value": 0,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 5,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 2,
"name": "domains"
}
],
"label": "Free",
"id": "68fa036188ac0f0329457178",
"currency": "EUR"
},
"metadata": {},
"login_redirect_url": "https://your.great_url.com",
"limits": null,
"limitation_status": "active",
"last_req_date": null,
"inserted_at": 1761215584,
"id": "68fa046088ac0f032981a423",
"files_counter": 0,
"configured_fields": {},
"billing_status": "upgrade_lock",
"active": true
}
}
}
API Route to be able to register a new user, and create this user's new project.
We now support the ability to include multiple project URLs used to pass CORS, by passing
a list of valid URLS as the value of project_key
Request
POST api/v1/register
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project | Project Model. | body | map | true | {'active' => true,'configured_fields' => {'blogs' => {'private_key' => 'xxxxxx','project_id' => 1}},'files_counter' => 0,'id' => '601bf1221907a50007ba3f81','login_redirect_url' => 'https://your.project.url.com/redirect_login/admin','package' => 'free','private_key' => 'xxxxxx','project_url' => ['https://your.project.url.com'],'reason' => nil,'type' => 'private'} | |
| user | User Model. | body | map | true | {email: 'your_new_email@gmail.com', password: 'new_pass', current_pass: 'current_pass'} } | |
| page | Create a root page if true | body | false |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | User resource | User |
| 410 | Error Resource | Error |
Get the pending invitations to a project.
Invite user to project success - user exists
GET /api/v1/project/68fa045088ac0f032906f0b9/pending_invitations
origin: http://f208ba59-3b96-44db-ac12-d65c61d1bd58.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAVhZG1pbm0AAAAPc2Fhc19wcm9qZWN0X2lkbQAAABg2OGZhMDQ1MDg4YWMwZjAzMjkwNmYwYjlqbQAAAAZzdGF0dXNtAAAACHZlcmlmaWVkbQAAAAd1c2VyX2lkbQAAACBkZTU1YzI3MDgxNGE0YmMxODc3MzhjMjI4Y2JjOTA3M20AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAXd2gEJoBYgABUYA._GMw0J5IU04ABxLx_KyNHvLwllQbAT0VWAh-Mn79cq4
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYOqFiWIkJQYAABeEB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://f208ba59-3b96-44db-ac12-d65c61d1bd58.com
{
"users": [
{
"role": "webmaster",
"invited_at": 1761215569,
"email": "email@eweev.com"
}
],
"total": 1
}
Used to fetch pending invitation to (existing or non existing) user emails to join your project with a specific role.
Request
GET api/v1/project/:project_id/pending_invitations
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Pending Invitation Resource | Pending_Invitation |
| 401 | Error Resource | Error |
Get your user information.
get user based on token
GET /api/v1/project/68fa044f88ac0f0329304601/user
origin: http://3cc4f065-2497-4613-8ea1-17e6e9ebe7e7.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAl3ZWJtYXN0ZXJtAAAAD3NhYXNfcHJvamVjdF9pZG0AAAAYNjhmYTA0NGY4OGFjMGYwMzI5MzA0NjAxam0AAAAGc3RhdHVzbQAAAAh2ZXJpZmllZG0AAAAHdXNlcl9pZG0AAAAgZWFlMThhZmU2NmZkNGFhOTg4NTQ1NTIzYzIzMGUxMWNtAAAABnN0YXR1c20AAAAHc3VjY2Vzc24GAA7XoBCaAWIAAVGA.BCWjs2OErGl0lStjer8SS5Q2aUB3JhP0CksnXPQTkYY
{
"aspect": "body_params"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYOjl_VuShWdYABUDC
content-type: application/json; charset=utf-8
access-control-allow-origin: http://3cc4f065-2497-4613-8ea1-17e6e9ebe7e7.com
{
"token": null,
"status": null,
"roles": null,
"projects": [
{
"saas_project_id": "68fa044f88ac0f0329304601",
"role": "admin"
}
],
"inserted_at": null,
"id": "1",
"full_name": "Full Name",
"email": "email@eweev.com"
}
Used to get your own user information based on the token.
Request
GET api/v1/project/:project_id/user
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com | |
| token | Sections Token | header | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | User resource | User |
| 401 | Error Resource | Error |
Get the Social Redirect url
Social redirect link checks registration data is correct early
POST /api/v1/social_redirect/google
origin: http://clientapp.com:3001
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwNDVlODhhYzBmMDMyOThjZmQzN2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDc5ZDE5ZDljYTFhMTRlOGU5MTY0ZWMxOTVkMDAwYjc2bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgAzEaEQmgFiAAFRgA.vNB_n-SEX9gecu_-s9txNqqqLRSM1odyr5SXdqCWEco
content-type: multipart/mixed; boundary=plug_conn_test
{
"redirect_uri": "http://redirect",
"payload": {
"user": {
"terms_conditions": true,
"full_name": "Fullname"
},
"project": {
"title": "Your Project Title",
"project_url": [
"your.social_url.com"
],
"login_redirect_url": "https://your.social_url.com"
}
}
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYPbb-08rsV00ABULC
content-type: application/json; charset=utf-8
access-control-allow-origin: http://clientapp.com:3001
{
"url": "register"
}
This is used to allow Sections users to will return the url you should redirect the user to at the social connect provider.
It will ask the user to grant permission to Sections to connect to the user account and grant permissions based on the scopes you request.
The provider supported today is google
The redirect_uri query parameter is mandatory.
The scope[] list is optional, by default the email is requested
Request
POST api/v1/social_redirect/{provider}?redirect_uri={redirect_uri}&scope[]={scope_1}&scope[]={scope_2}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| payload | Registration payload | body | Payload | false |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Redirect URL | string |
Connect the user using his social credentials
Social connection automatically verifies the user
POST /api/v1/social_connect/google
origin: http://clientapp.com:3001
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwNDRkODhhYzBmMDMyOTc2ZjAyYmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGUyMTg0NTUyOTEwODQ4ZTZiOTYyNzI1NDJiNGJlODNlbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgDF0aAQmgFiAAFRgA.ZCFzUW59n7tTNdZJ3NKgAqOQQNX9yfmvuVTZn0vL5yo
content-type: multipart/mixed; boundary=plug_conn_test
{
"redirect_uri": "http://redirect",
"payload": {
"user": {
"terms_conditions": true,
"full_name": "Fullname"
},
"project": {
"title": "Your Project Title",
"project_url": [
"your.social_url.com"
],
"login_redirect_url": "https://your.social_url.com"
}
},
"code": "code-123"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYOe8Mid-CnFgABUCC
content-type: application/json; charset=utf-8
access-control-allow-origin: http://clientapp.com:3001
{
"data": {
"user": {
"user_id": "123userid123",
"saas_project_id": [
{
"title": "Your Project Title",
"saas_project_id": "68fa044e88ac0f03299266f3",
"role": "admin"
}
],
"full_name": "Full name",
"email": "email1@email.com"
},
"token": {
"token": "this is a token"
},
"project": {
"type": "private",
"title": "Your Project Title",
"section_types_count": null,
"reason": null,
"project_url": [
"your.social_url.com"
],
"private_packages": null,
"private_key": "$2b$12$KCerAzf1GanTZVr3s3694.KrcDqbe.TtJJq4MLJjk4ErPqawMsIfi",
"pages_count": null,
"package_label": null,
"package": {
"type": "public",
"rank": 0,
"quota": -1,
"project_id": null,
"price": 0,
"name": "free",
"locked": false,
"limits": [
{
"value": 0,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 5,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 2,
"name": "domains"
}
],
"label": "Free",
"id": "68fa036188ac0f0329457178",
"currency": "EUR"
},
"metadata": {},
"login_redirect_url": "https://your.social_url.com",
"limits": null,
"limitation_status": "active",
"last_req_date": null,
"inserted_at": 1761215566,
"id": "68fa044e88ac0f03299266f3",
"files_counter": 0,
"configured_fields": {},
"billing_status": "upgrade_lock",
"active": true
}
}
}
This is meant to be called after you called the Social Redirect Url.
You should provide the code you collect from the Social Redirect Url flow alongside the redirect_uri and the list of fields you want from the social media.
The provider supported today is google
The redirect_uri query parameter is mandatory.
The fields[] list is optional
Request
POST api/v1/social_connect/{provider}?code={code}&redirect_uri={redirect_uri}&fields[]={field_1}&fields[]={field_2}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| payload | Registration payload | body | Payload | false |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Login Operation | User |
| 400 | Error Resource | Error |
Verify your Sections account
Verify user
POST /api/v1/verify_user
origin: http://clientapp.com:3001
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwNDUxODhhYzBmMDMyOTc5ZWI2N2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDllNjg2OTY3ZGNlNjQ1MzhiNzgwYTg5YzY2NTRlZTc1bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgAa4aAQmgFiAAFRgA.o1RtgvNPxi-SY2HG5oi-k6to-z4yL-05D12fGVaUf0s
content-type: multipart/mixed; boundary=plug_conn_test
{
"token": "this is the token"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYOtoi-829vvMABUEC
content-type: application/json; charset=utf-8
access-control-allow-origin: http://clientapp.com:3001
{
"message": "Your email has been successfully verified."
}
Used to verify your Sections account.
You are expected to use the token received in the verification email as the token authorization header.
Request
POST api/v1/verify_user
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Message resource | Message |
| 410 | Error Resource | Error |
Login through the API
login
POST /login
origin: http://clientapp.com:3001
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwNDU2ODhhYzBmMDMyOTU1OTU2NmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGM0YzZjNmFhNjcxNDQ1ZTJiMzFmYzU2YjUzZTllYjU0bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgDm8qAQmgFiAAFRgA.8TBrq0agydgeCO2ljQlvzLDZPiUVt0NtJa2P9Dj7zmA
content-type: multipart/mixed; boundary=plug_conn_test
{
"password": "password",
"email": "success@gmail.com"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYO-mvQ4JSq0kABeOB
referrer-policy: strict-origin-when-cross-origin
x-content-type-options: nosniff
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-permitted-cross-domain-policies: none
{
"token": {
"token": "this is a token"
},
"status": null,
"roles": null,
"projects": [
{
"title": null,
"saas_project_id": "68fa045688ac0f0329559566",
"role": "webmaster"
}
],
"inserted_at": null,
"id": "123userid123",
"full_name": "Someone",
"email": "someone3848860548474f6c9c542bff87e6c423@eweev.com"
}
API Route to be able to login and retrieve a user token, used for authorization.
The project_id query parameter, alongside the project URL as the origin header, are used to be able to pass CORS.
You can also use the encoded version of the project private key to bypass CORS, and act as the project administrator.
Request
POST api/v1/login?project_id={PROJECT_ID}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | User resource | User |
| 410 | Error Resource | Error |
Updates User
Update User
PUT /api/v1/project/68fa039e88ac0f032912c18b/user
origin: http://33adad49-5eaa-4b7c-addd-6f27bb614474.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzllODhhYzBmMDMyOTEyYzE4YmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDkyZDM5MTMwNzg5YjQwMjNiMjIzMWI5MDViZmQ4N2UybQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgBII54QmgFiAAFRgA.786xDtzz2ml34gTUe0-CPW17-iaymACN_0bG7yi7aYI
content-type: multipart/mixed; boundary=plug_conn_test
{
"password": "new_password",
"full_name": "Your updated name",
"email": "new_email@eweev.com",
"current_password": "your_current_pass",
"confirm_password": "new_password"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYEP3npv34mXkABa6B
content-type: application/json; charset=utf-8
access-control-allow-origin: http://33adad49-5eaa-4b7c-addd-6f27bb614474.com
{
"token": null,
"status": "pending",
"roles": null,
"projects": null,
"inserted_at": null,
"id": null,
"full_name": "Your updated name",
"email": "new_email@eweev.com"
}
This call updates the user. Be careful when updating your email or password you need to supply you current password to authenticate your call under the field current_password.
Request
PUT api/v1/project/{project_id}/user
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| token | Sections Token | header | string | true | ||
| user | User Model. | body | map | true | {email: 'your_new_email@gmail.com', password: 'new_pass', current_pass: 'current_pass'} } |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | User |
| 400 | section type resource | Error |
| 410 | Error Resource | Error |
Add a User
Add a user to a project
PUT /api/v1/project/68fa03a388ac0f03295511bc/add_user
origin: http://ddc7ae7a-8973-4514-94c0-c4d9e270ef4d.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwM2EzODhhYzBmMDMyOTU1MTFiY2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDAwNjA5M2Q5MWI4MDQwZTRhYzUyZDgzOGRkN2EwODcwbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgD0N54QmgFiAAFRgA.7fZSNXPYLgKGhqdOXEzwj79ZrGdPcXzOKMZTDsJc4EQ
content-type: multipart/mixed; boundary=plug_conn_test
{
"saas_project_id": "68fa03a388ac0f03295511bc",
"role": "User",
"email": "USER_EMAIL@gmail.com"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYEjlY8XKiVHkABbGB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://ddc7ae7a-8973-4514-94c0-c4d9e270ef4d.com
{
"token": null,
"status": null,
"roles": null,
"projects": [
{
"saas_project_id": "68fa03a388ac0f03295511bc",
"role": "User",
"accepted_on": 1761215395
}
],
"inserted_at": null,
"id": "847e3b57-2ce5-4324-9393-77b99ab965d7",
"full_name": null,
"email": null
}
This call adds the user, of the given email, to a project you are an admin on.
Request
PUT api/v1/project/{project_id}/add_user
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| token | Sections Token | header | string | true | ||
| user | User Model. | body | map | true | [123,10,32,32,32,32,32,32,34,115,97,97,115,95,112,114,111,106,101,99,116,95,105,100,34,58,32,34,54,48,100,97,101,49,97,49,48,97,57,57,56,54,50,99,50,97,55,48,97,98,49,49,34,44,10,32,32,32,32,32,32,34,114,111,108,101,34,58,32,34,85,115,101,114,34,44,10,32,32,32,32,32,32,34,101,109,97,105,108,34,58,32,34,97,46,115,97,114,107,105,115,43,98,108,111,103,49,48,48,64,101,119,101,101,118,46,99,111,109,34,10,32,32,32,32,125] |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | section type resource | User |
| 400 | section type resource | Error |
| 401 | Error Resource | Error |
| 404 | section type resource | Error |
Invite a user to join your project
Invite user to project success - user exists
POST /api/v1/project/68fa045088ac0f032906f0b9/invite_user
origin: http://f208ba59-3b96-44db-ac12-d65c61d1bd58.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAVhZG1pbm0AAAAPc2Fhc19wcm9qZWN0X2lkbQAAABg2OGZhMDQ1MDg4YWMwZjAzMjkwNmYwYjlqbQAAAAZzdGF0dXNtAAAACHZlcmlmaWVkbQAAAAd1c2VyX2lkbQAAACBkZTU1YzI3MDgxNGE0YmMxODc3MzhjMjI4Y2JjOTA3M20AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAXd2gEJoBYgABUYA._GMw0J5IU04ABxLx_KyNHvLwllQbAT0VWAh-Mn79cq4
content-type: multipart/mixed; boundary=plug_conn_test
{
"invitation_user_email": [
"email@eweev.com"
],
"invitation_role": "webmaster"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYOpnEjmMJQYAABeDB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://f208ba59-3b96-44db-ac12-d65c61d1bd58.com
{
"invited": [
"email@eweev.com"
],
"invalid_format": [],
"failed_to_send": [],
"demotion": []
}
Used to send an invitation to (existing or non existing) user emails to join your project with a specific role.
Request
POST api/v1/project/:project_id/invite_user
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| invitation_role | The role to invite the users as | body | string | true | one of:webmaster,admin | |
| invitation_emails | List of emails to invite to the project | body | array | true | ['email1@gmail.com','email2@gmail.com'] |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Invitation Resource | Invitation |
| 401 | Error Resource | Error |
Accept an invitation to join a project.
Accept invitation to project success - user exists
POST /api/v1/invitation/accept_invitation
origin: http://275da7ba-b88a-4b55-95a8-03d58751ece5.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAR1c2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwNDY1ODhhYzBmMDMyOTMwMDZlN2ptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDJkNzI3YjRjYWU1NDRlZmJiZWEzN2IxM2I3N2I1MDFlbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgD4LqEQmgFiAAFRgA.hoCMXZXlBlFpaO3QDg8R-DkHZqfzauxLaoZ2oCEWuKM
content-type: multipart/mixed; boundary=plug_conn_test
{
"invitation_token": "SFMyNTY.g2gDdAAAAANtAAAACnByb2plY3RfaWRtAAAAGDY4ZmEwNDY1ODhhYzBmMDMyOTMwMDZlN20AAAAEcm9sZW0AAAAJd2VibWFzdGVybQAAAAp1c2VyX2VtYWlsbQAAABBlbWFpbDFAZW1haWwuY29tbgYA0y-hEJoBYgABUYA.LGqk6XOl7mfAeyjNgXDMpHzFHsfUK1vjTdRIa-VM4h8"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYP4QG4Az0BKoABeoh
content-type: application/json; charset=utf-8
{
"token": null,
"status": null,
"roles": null,
"projects": [
{
"title": null,
"saas_project_id": "68fa046588ac0f03293006e7",
"role": "webmaster"
}
],
"inserted_at": null,
"id": "a0a57114417e430cae5a3b45fe3b061c",
"full_name": "Full name",
"email": "email1@email.com"
}
Used to accept an invitation to join a project with a specific role.
You are expected to add the token received in the email as the token authorization header.
Request
POST /api/v1/invitation
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | User Resource | User |
| 401 | Error Resource | Error |
Cancel an invitation
Accept invitation to project failure - invitation cancelled
DELETE /api/v1/project/68fa045c88ac0f0329c3d94b/cancel_invitation
origin: http://3036af6f-9a24-41f7-a98b-d6cffc3b66e7.com
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAAVhZG1pbm0AAAAPc2Fhc19wcm9qZWN0X2lkbQAAABg2OGZhMDQ1Yzg4YWMwZjAzMjljM2Q5NGJqbQAAAAZzdGF0dXNtAAAACHZlcmlmaWVkbQAAAAd1c2VyX2lkbQAAACBmY2Y1MjJmNWQwMzI0YTE3ODRlZjY0MGI4MDc3YWJlMG0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAFA2hEJoBYgABUYA.3U_ahdOM3tNvVZ7nkJbeUcHarrGVEJ7tb-ETlCml3eU
content-type: multipart/mixed; boundary=plug_conn_test
{
"invitation_user_email": "email1@email.com"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYPXvIBsKhe-UABeYB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://3036af6f-9a24-41f7-a98b-d6cffc3b66e7.com
{
"message": "Invitation cancelled successfuly"
}
Used to cancel invitations sent to specific emails.
Request
DELETE api/v1/project/:project_id/cancel_invitation
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| invitation_email | Email to cancel invitation to the project | body | string | true | 'email1@gmail.com','email2@gmail.com' |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Message Resource | Message |
| 401 | Error Resource | Error |
6. Medias
This part is dedicated to give you a clear idea on how to manage your medias. A media is an entity that holds a file that can be used across multiple sections. We can create a media using a base64 file. You are limited to the number of medias and the size of each media file based on your subscription.
Creates a media
Create a page with valid section using medias ids then keep sync
POST /api/v1/project/68fa036d88ac0f032921aed2/media
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzZkODhhYzBmMDMyOTIxYWVkMmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGQ1ZTE2ZmIxYTMyMDQ4NjBiNmQ4NTAxNjQ3MDQxNWJmbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgA5Y50QmgFiAAFRgA.zaO8NGe_aA7GGhIWCTL-YKLDVzSOvEQmfv-E_m8BrWA
origin: http://05fd2edc-3710-45dd-8115-856c36c22392.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"type": "image",
"private_status": "public",
"locked_status": "unlocked",
"files": {
"1": {
"file": {
"content_type": "image/png",
"path": "/builds/eweev/geeks/sections/test/support/toggle",
"filename": "-576460752303057055-blue.png"
}
}
}
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYBYtXfrsNOCkABZeB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://05fd2edc-3710-45dd-8115-856c36c22392.com
{
"type": "image",
"title": null,
"tags": null,
"seo_tag": null,
"private_status": "public",
"number_of_contents": 0,
"namespace": "68fa036d88ac0f032921aed2",
"metadata": null,
"meta": {},
"locked_status": "unlocked",
"id": "68fa036e88ac0f0329802f75",
"files": [
{
"url": "https://www.fake-url.com/868e46debda0472d97711bd2238e80c3",
"type": "image/png",
"thumbnail_url": "https://www.fake-url.com/4432935a5ce84a46991a3f1126924d40",
"size": 3949,
"platform_id": "64d11a55d7c40100075c27ff",
"metadata": {
"width": 80,
"height": 80
},
"filename": "fake_filename",
"file_id": "fake_file_id"
}
],
"creation_date": "2025-10-23",
"author": "d5e16fb1a3204860b6d85016470415bf"
}
Creates a media with a given file
Request
POST api/v1/project/{project_id}/media
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| id | The media id | query_string | string | true | ||
| section | A map containing the file | body | map | true | {1: {file: 'BASE64_STRING_HERE', base64: true}} |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Media resource | Media |
| 400 | Error Resource | Error |
| 404 | Error Resource | Error |
Renders a media
Create a page with valid section using medias ids then keep sync
GET /api/v1/project/68fa036d88ac0f032921aed2/media/68fa036e88ac0f0329802f75
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzZkODhhYzBmMDMyOTIxYWVkMmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGQ1ZTE2ZmIxYTMyMDQ4NjBiNmQ4NTAxNjQ3MDQxNWJmbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgA5Y50QmgFiAAFRgA.zaO8NGe_aA7GGhIWCTL-YKLDVzSOvEQmfv-E_m8BrWA
origin: http://05fd2edc-3710-45dd-8115-856c36c22392.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYBe47RkwNOCkABZkh
content-type: application/json; charset=utf-8
access-control-allow-origin: http://05fd2edc-3710-45dd-8115-856c36c22392.com
{
"type": "image",
"title": null,
"tags": null,
"seo_tag": null,
"private_status": "public",
"number_of_contents": 0,
"namespace": "68fa036d88ac0f032921aed2",
"metadata": null,
"meta": {
"content": [],
"author": "deleted_user"
},
"locked_status": "unlocked",
"id": "68fa036e88ac0f0329802f75",
"files": [
{
"url": "https://www.fake-url.com/868e46debda0472d97711bd2238e80c3",
"type": "image/png",
"thumbnail_url": "https://www.fake-url.com/4432935a5ce84a46991a3f1126924d40",
"size": 3949,
"platform_id": "64d11a55d7c40100075c27ff",
"platform": {
"width": 1000,
"updated_at": 1655974869,
"number_of_medias": 0,
"namespace": "sections_app",
"name": "Global Platform",
"inserted_at": 1655974869,
"id": "64d11a55d7c40100075c27ff",
"height": 1000,
"description": "This is the only platform used for sections"
},
"metadata": {
"width": 80,
"height": 80
},
"filename": "fake_filename",
"file_id": "fake_file_id"
}
],
"creation_date": 1761215342,
"author": "d5e16fb1a3204860b6d85016470415bf"
}
Renders the media with its details.
Request
GET api/v1/project/{project_id}/media/{id}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| id | The media id | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Media resource | Media |
| 400 | Error Resource | Error |
| 404 | Error Resource | Error |
Renders all medias for this project.
List medias
POST /api/v1/project/68fa036888ac0f0329b13cf4/medias
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzY4ODhhYzBmMDMyOWIxM2NmNGptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIDZkMGE2Yzc1NWYzODQ1NTg5YTBiYjIzYTA5NTY2NmI3bQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgD9UJ0QmgFiAAFRgA.uUCqBA9ocShd3A9y1S4aW6_5AgRnHyi-kHUYEOe27MI
origin: http://5a80377e-a54b-4c4e-a86a-4299b7eb2341.com
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYBOFCKJX73noABZSB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://5a80377e-a54b-4c4e-a86a-4299b7eb2341.com
{
"total": 1,
"result": [
{
"type": "image",
"title": null,
"tags": null,
"seo_tag": null,
"private_status": "public",
"number_of_contents": 0,
"namespace": "68fa036888ac0f0329b13cf4",
"metadata": null,
"meta": {},
"locked_status": "unlocked",
"id": "68fa036a88ac0f03298092ef",
"files": [
{
"url": "https://www.fake-url.com/6f148d13ab364f4c9969a4f781a8abc2",
"type": "image/png",
"thumbnail_url": "https://www.fake-url.com/00cd9046acf141bf81f139be9fbed22b",
"size": 3949,
"platform_id": "64d11a55d7c40100075c27ff",
"platform": {
"width": 1000,
"updated_at": 1655974869,
"number_of_medias": 0,
"namespace": "sections_app",
"name": "Global Platform",
"inserted_at": 1655974869,
"id": "64d11a55d7c40100075c27ff",
"height": 1000,
"description": "This is the only platform used for sections"
},
"metadata": {
"width": 80,
"height": 80
},
"filename": "fake_filename",
"file_id": "fake_file_id"
}
],
"creation_date": 1761215338,
"author": "6d0a6c755f3845589a0bb23a095666b7"
}
]
}
Renders the medias with their details.
Request
POST api/v1/project/{project_id}/medias
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Array of Media resource | Media |
Updates a media
Create a page with valid section using medias ids then keep sync
PUT /api/v1/project/68fa036d88ac0f032921aed2/media/68fa036e88ac0f0329802f75
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAAEbQAAAAVlbWFpbHcDbmlsbQAAAA9zYWFzX3Byb2plY3RfaWRsAAAAAXQAAAACbQAAAARyb2xlbQAAAARVc2VybQAAAA9zYWFzX3Byb2plY3RfaWRtAAAAGDY4ZmEwMzZkODhhYzBmMDMyOTIxYWVkMmptAAAABnN0YXR1c20AAAAIdmVyaWZpZWRtAAAAB3VzZXJfaWRtAAAAIGQ1ZTE2ZmIxYTMyMDQ4NjBiNmQ4NTAxNjQ3MDQxNWJmbQAAAAZzdGF0dXNtAAAAB3N1Y2Nlc3NuBgA5Y50QmgFiAAFRgA.zaO8NGe_aA7GGhIWCTL-YKLDVzSOvEQmfv-E_m8BrWA
origin: http://05fd2edc-3710-45dd-8115-856c36c22392.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"type": "image",
"private_status": "public",
"locked_status": "unlocked",
"files": {
"1": {
"file": {
"content_type": "image/svg",
"path": "/builds/eweev/geeks/sections/test/support/toggle",
"filename": "-576460752303056287-blue.png"
}
}
}
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYBjlPDAANOCkABZqB
content-type: application/json; charset=utf-8
access-control-allow-origin: http://05fd2edc-3710-45dd-8115-856c36c22392.com
{
"type": "image",
"title": null,
"tags": null,
"seo_tag": null,
"private_status": "public",
"number_of_contents": 0,
"namespace": "68fa036d88ac0f032921aed2",
"metadata": null,
"meta": {},
"locked_status": "unlocked",
"id": "68fa036e88ac0f0329802f75",
"files": [
{
"url": "https://www.fake-url.com/7a3b8f8dac034b40be10c8584e330d2c",
"type": "image/svg",
"thumbnail_url": "https://www.fake-url.com/ef0b68772f0c4e818af29956a0c74ee6",
"size": 3949,
"platform_id": "64d11a55d7c40100075c27ff",
"metadata": {
"width": 80,
"height": 80
},
"filename": "fake_filename",
"file_id": "fake_file_id"
}
],
"creation_date": "2025-10-23",
"author": "d5e16fb1a3204860b6d85016470415bf"
}
Updates a media with a given file
Request
POST api/v1/project/{project_id}/media/{id}
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| project_id | Your project id in Sections (can be replaced by project domain) | query_string | string | true | ||
| id | The media id | query_string | string | true | ||
| section | A map containing the file | body | map | true | {1: {file: 'BASE64_STRING_HERE', base64: true}} |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Media resource | Media |
| 400 | Error Resource | Error |
| 404 | Error Resource | Error |
7. Project Management
This part will guide on how to manage your project on Sections.
Update a project
Update project
PUT /api/v1/project/68fa037588ac0f03290c4dbb
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACA3ODY3NzY0YjcwZDg0M2Y1YmQzZTdkZmEwNjFmMzYzMG0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAzIKdEJoBYgABUYA.1OG4KZF_hjElShGDuThyU4QHwFfoQ_Wf-WKnRFx1wdo
pkey: $2b$12$SLgsmuUenN5FD2BKOILASejEq8H3eNH.kN7Ph08JqcG.Iz2hC6rSK
content-type: multipart/mixed; boundary=plug_conn_test
{
"title": "New title 123"
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYB4z6zePl9-AABTdi
content-type: application/json; charset=utf-8
{
"type": "private",
"title": "New title 123",
"section_types_count": null,
"reason": null,
"project_url": [
"http://localhost:3000",
"0a9592a5-59a0-4806-a396-cbf969b91449.com"
],
"private_packages": null,
"private_key": "$2b$12$i/DbWwMyZYpzNHyrgDBVnejIws1hD.FtkQ2WHoq1Auatgynq3Vg6q",
"pages_count": null,
"package_label": null,
"package": "free",
"metadata": {},
"login_redirect_url": "http://localhost:3000/redirect-login",
"limits": null,
"limitation_status": "active",
"last_req_date": null,
"inserted_at": 1761215349,
"id": "68fa037588ac0f03290c4dbb",
"files_counter": 0,
"configured_fields": {},
"billing_status": "upgrade_lock",
"active": true
}
Used to update any project field. Updating the package will adjust the billing accordingly (new invoice or credit note prorata of time left)
Notes:
For the
project_urlandlogin_redirect_urlfields, you can specify any of the following patterns for local testing:- localhost:PORT with HTTP:// or HTTPS://
- Class A,B,C Private addresses with HTTP://
Request
PUT api/v1/project/:project_id/
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com | |
| project | Project Model. | body | map | true | {'active' => true,'configured_fields' => {'blogs' => {'private_key' => 'xxxxxx','project_id' => 1}},'files_counter' => 0,'id' => '601bf1221907a50007ba3f81','login_redirect_url' => 'https://your.project.url.com/redirect_login/admin','package' => 'free','private_key' => 'xxxxxx','project_url' => ['https://your.project.url.com'],'reason' => nil,'type' => 'private'} |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Project Resource | Project |
| 400 | Error Resource | Error |
Reset a Project's private key
Reset project private key
PUT /api/v1/project/68fa036a88ac0f03298092ee/reset_key
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACBlYzRiM2VhMzZmNDE0ODIxOTg5NjQwOGY5ZmYyM2MyOG0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAEFadEJoBYgABUYA.Lszxe6UnIwJZAiCiHUVoPNO5AAp-WjY_EfZmMez5x94
pkey: $2b$12$0UzWs/e.70yG1h2BbXvaguZyJofblLBX8rBdCJsP7KAYA0W9/PyUW
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYBODrYC3d6lQABZRh
content-type: application/json; charset=utf-8
{
"message": "Your project private key was successfully reset. The old one does not work anymore. Make sure to update the private key to the new one wherever you are using it."
}
Used to reset the private key field of a project.
Request
PUT api/v1/project/:project_id/reset_key
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Project Resource | Project |
| 400 | Error Resource | Error |
Get a project's dahsboard metrics
Get project dashboard
GET /api/v1/project/68fa037988ac0f0329f9174b/dashboard
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACBmNWQ0ZWVkZGJjZGI0ZWU4OGFiNjczMTAzODQ5NjkzZW0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAp5CdEJoBYgABUYA.b1SMl6ehAJCKo3Hp3SF00UpTqaLO2dKOb1yXnhQjDCI
pkey: $2b$12$KHN0c0RJhXkZ7BMlj7JpoOzCzEfA552c7cjveQNP40U83x3uqlumC
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYCGCN7kBdeA0ABaCh
content-type: application/json; charset=utf-8
{
"package_name": "free",
"package_locked": false,
"package_label": "Free",
"max_pages": 2,
"max_media_files": 10,
"max_file_size": 500000,
"current_pages": 0,
"current_medias": 0,
"api_until_reset": 48646141,
"api_limit_use": {
"value": 500,
"unit_price": 1,
"name": "api_limit_day",
"included": 1
},
"api_current_use": 0
}
Used to retrieve a project's dashboard metrics such as package limitations and current usage.
Request
GET api/v1/project/:project_id/dashboard
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com | |
| project | Project Model. | body | map | true | {'active' => true,'configured_fields' => {'blogs' => {'private_key' => 'xxxxxx','project_id' => 1}},'files_counter' => 0,'id' => '601bf1221907a50007ba3f81','login_redirect_url' => 'https://your.project.url.com/redirect_login/admin','package' => 'free','private_key' => 'xxxxxx','project_url' => ['https://your.project.url.com'],'reason' => nil,'type' => 'private'} |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Dashboard Resource | Dashboard |
| 400 | Error Resource | Error |
Indicates if usages fit a package
When a project wants to update a package it compares offline mode/projected usage to all packages
POST /api/v1/project/68fa036488ac0f03293b851e/projected_usage/all
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACBjOWQ0ZTE4YWM0OWI0YjBiYmJjMzdiYTM4YzM3YzI2NG0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYA6z2dEJoBYgABUYA.xQUkI6tTq48sa_yghDv8DVgB4H1KFEfa5v_vCr2Xm6o
pkey: $2b$12$xzbM/VeWjCtnSaZGe1daZOfolWWwAtFDHquelVnN62ldhRtOXSJ9.
content-type: multipart/mixed; boundary=plug_conn_test
{
"usages": {
"users_count": 1,
"top_sections_in_page_count": 6,
"top_page_variations_count": 1,
"top_file_size": 24000,
"section_type_count": 6,
"require_qs": true,
"require_dynamic_sections": true,
"pages_count": 5,
"files_count": 24,
"domains_count": 1
}
}
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYA8zJ9iIhD0oABY-B
content-type: application/json; charset=utf-8
[
{
"status": "success",
"package": {
"usage": null,
"type": "public",
"rank": 2,
"quota": 2,
"price": 14900,
"name": "corporate",
"locked": false,
"limits": [
{
"value": -1,
"unit_price": 150,
"name": "number_of_pages",
"included": 10
},
{
"value": -1,
"name": "query_string_support"
},
{
"value": 5,
"name": "variation_per_page"
},
{
"value": 20,
"name": "static_sections"
},
{
"value": 15,
"name": "sections_total"
},
{
"value": 300,
"name": "hosted_files"
},
{
"value": 2000000,
"name": "size_per_file"
},
{
"value": -1,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_minute"
},
{
"value": 3000,
"name": "api_limit_hour"
},
{
"value": 20000,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 5,
"name": "users"
},
{
"value": -1,
"unit_price": 1000,
"name": "domains",
"included": 3
}
],
"label": "Corporate",
"id": "68fa036188ac0f032945717a",
"availability": true
},
"message": "Package supports projected usage"
},
{
"status": "failed",
"package": {
"usage": null,
"type": "public",
"rank": 0,
"quota": -1,
"price": 0,
"name": "free",
"locked": false,
"limits": [
{
"value": 0,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 5,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": 500,
"unit_price": 1,
"name": "api_limit_day",
"included": 1
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 1,
"name": "users"
},
{
"value": 2,
"name": "domains"
}
],
"label": "Free",
"id": "68fa036188ac0f0329457178",
"availability": true
},
"message": {
"top_sections_in_page_count": [
"Exceeds package limit of 5"
],
"section_type_count": [
"Exceeds package limit of 5"
],
"require_qs": [
"Not enabled in package"
],
"require_dynamic_sections": [
"Not enabled in package"
],
"pages_count": [
"Exceeds package limit of 2"
],
"files_count": [
"Exceeds package limit of 10"
]
}
},
{
"status": "failed",
"package": {
"usage": null,
"type": "public",
"rank": 5,
"quota": -1,
"price": 10,
"name": "qs_enabled",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 3,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 100,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "QS_enabled",
"id": "68fa036488ac0f03293b8520",
"availability": true
},
"message": {
"top_sections_in_page_count": [
"Exceeds package limit of 5"
],
"pages_count": [
"Exceeds package limit of 3"
],
"files_count": [
"Exceeds package limit of 10"
]
}
},
{
"status": "failed",
"package": {
"usage": null,
"type": "public",
"rank": 1,
"quota": 1,
"price": 0,
"name": "quota_1",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": -1,
"name": "api_limit_minute"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 1,
"name": "users"
},
{
"value": 1,
"name": "domains"
}
],
"label": "quota_1_label",
"id": "68fa036388ac0f032987dcc9",
"availability": true
},
"message": {
"top_sections_in_page_count": [
"Exceeds package limit of 5"
],
"require_dynamic_sections": [
"Not enabled in package"
],
"pages_count": [
"Exceeds package limit of 2"
],
"files_count": [
"Exceeds package limit of 10"
]
}
},
{
"status": "failed",
"package": {
"usage": null,
"type": "public",
"rank": 1,
"quota": -1,
"price": 2900,
"name": "solo",
"locked": false,
"limits": [
{
"value": 0,
"name": "query_string_support"
},
{
"value": 5,
"name": "number_of_pages"
},
{
"value": 2,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 10,
"name": "sections_total"
},
{
"value": 100,
"name": "hosted_files"
},
{
"value": 1000000,
"name": "size_per_file"
},
{
"value": -1,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_minute"
},
{
"value": 500,
"name": "api_limit_hour"
},
{
"value": 1000,
"unit_size": 100,
"unit_price": 2,
"name": "api_limit_day",
"included": 5
},
{
"value": 0,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 1,
"name": "domains"
}
],
"label": "Standard",
"id": "68fa036188ac0f0329457179",
"availability": true
},
"message": {
"require_qs": [
"Not enabled in package"
],
"require_dynamic_sections": [
"Not enabled in package"
]
}
}
]
Checks if the projected usages given in the body will fit the selected package.
Can also check it against all available packages at once by giving the all value as the package name.
If no usages are provided it will check all packages against your project's usages.
Request
POST api/v1/project/:project_id/projected_usage
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com | |
| usages | A projected usages object, all fields must be provided | body | map | true | {"users_count":1,"top_sections_in_page_count":5,"top_page_variations_count":0,"top_file_size":42500,"section_type_count":3,"require_qs":false,"require_dynamic_sections":true,"pages_count":1,"files_count":6,"domains_count":1} | |
| package | The name of an existing package, or all |
query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Project Resource | Project |
| 404 | Error Resource | Error |
| 422 | Error Resource | Error |
Returns the current usage of a project
When a project wants to update a package returns the current usage of a project
GET /api/v1/project/68fa036b88ac0f0329aa02f4/current_usage
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACBjZmYwMWZmZmQ4OGM0NjAxYjhhNmMxMzg5MDA3NzgyNG0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAvlmdEJoBYgABUYA._BLf8wKoCoeGNyBFlQ1-rKdLBIEhZOhRERilsiHfP9A
pkey: $2b$12$LdD9A74kGejfXrqPD4w2nemWTS81E.KQGH0HLitl7H.ljEaDmDile
Response
200
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYBWyY8ZKdbhoABZch
content-type: application/json; charset=utf-8
{
"users_count": 1,
"top_sections_in_page_count": 0,
"top_page_variations_count": 0,
"top_file_size": 0,
"section_type_count": 0,
"require_qs": false,
"require_dynamic_sections": false,
"pages_count": 0,
"files_count": 0,
"domains_count": 1
}
Returns the current usage of a project
Request
POST api/v1/project/:project_id/current_usage
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| origin | Request Origin | header | string | true | https://your.project.url.com |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Usage Resource | Project |
| 404 | Error Resource | Error |
| 422 | Error Resource | Error |
8. Sections Admin Only Access
This part wil guide Sections Admins on actions they only can perform.
Get projects
test pagination and filtering of projects GET /api/v1/auth/project pagination limit and start
GET /api/v1/auth/project?start=1&limit=1
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACA5Zjg0NzA3OWI5Y2E0YzU4ODg4ZDFmYzZkMWE5NGEzOG0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAU5KfEJoBYgABUYA.nI2ZOLJUb5w9W_jD96Ai9DKV-i17Q7f0o5BBcekvqMM
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYJxMJ7Q4nqM8ABT5i
access-control-allow-origin: http://clientapp.com:3001
{
"total": 148,
"public_packages": [
{
"value": "Free",
"key": "free"
},
{
"value": "Standard",
"key": "solo"
},
{
"value": "Corporate",
"key": "corporate"
},
{
"value": "quota_1_label",
"key": "quota_1"
},
{
"value": "QS_enabled",
"key": "qs_enabled"
},
{
"value": "quota_r_label",
"key": "quota_register"
},
{
"value": "Free",
"key": "new_name"
},
{
"value": "premium",
"key": "premium"
},
{
"value": "Free",
"key": "something"
},
{
"value": "Free",
"key": "package_by_id"
},
{
"value": "Free",
"key": "package 1"
},
{
"value": "Free",
"key": "package 2"
}
],
"data": [
{
"type": "private",
"title": "some title",
"section_types_count": 0,
"reason": null,
"project_url": [
"3ac135e3-c3cc-4460-bac9-883d9a1210dc.com"
],
"private_packages": [],
"private_key": "**REDACTED**",
"pages_count": 0,
"package_label": "Free",
"package": "free",
"metadata": {},
"login_redirect_url": null,
"limits": {
"reset_time": 48514460,
"package": 500,
"consumption": 0
},
"limitation_status": "active",
"last_req_date": null,
"inserted_at": 1761215331,
"id": "68fa036388ac0f032987dcc8",
"files_counter": 0,
"configured_fields": {},
"billing_status": "upgrade_lock",
"active": true
}
]
}
Used to retrieve list of projects. Current supported filters are:
earliest_last_req_date: Timestamp of last_req_date as the earliest, ex:
1761215325latest_last_req_date: Timestamp of last_req_date as the latest, ex:
1761215325package: package name that the project subscribed to, ex:
corporateproject_url: project that has this project_url in his list, ex:
https://your.project.url.comid: project id, ex:
628cbb71e537f4000619c0b7full_name: last request user full name, ex:
User Full Nameemail: last request user email, ex: `some_email@gmail.com
Request
POST api/v1/auth/projects
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | List of Project Resource | Project |
| 400 | Error Resource | Error |
Create a new package
create a package and create and existing package
POST /api/v1/auth/package
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACBhNzI0YjViYzVjNTQ0NGJkYmExN2I1MGZkZTljMjUyNm0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYARP6eEJoBYgABUYA.XvW_lDEF5QaN5Ctht30PVLC_sR0nBYEn2cv010XLmqs
origin: http://69133ccd-2808-4449-8304-8e238e115d77.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "new_name",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support",
"label": "label"
},
{
"value": 2,
"name": "number_of_pages",
"label": "label"
},
{
"value": 1,
"name": "variation_per_page",
"label": "label"
},
{
"value": 10,
"name": "static_sections",
"label": "label"
},
{
"value": 5,
"name": "sections_total",
"label": "label"
},
{
"value": 10,
"name": "hosted_files",
"label": "label"
},
{
"value": 500000,
"name": "size_per_file",
"label": "label"
},
{
"value": 10,
"name": "api_limit_sec",
"label": "label"
},
{
"value": 100,
"name": "api_limit_minute",
"label": "label"
},
{
"value": 100,
"name": "api_limit_hour",
"label": "label"
},
{
"value": 500,
"name": "api_limit_day",
"label": "label"
},
{
"value": -1,
"name": "dynamic_section_types_support",
"label": "label"
},
{
"value": 2,
"name": "users",
"label": "label"
},
{
"value": 5,
"name": "domains",
"label": "label"
}
],
"label": "Free"
}
Response
400
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHi7cTnzVpkkABc-h
access-control-allow-origin: http://clientapp.com:3001
{
"message": "Packages already exist"
}
Used to create a package
Request
POST api/v1/auth/package
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Package Resource | Package |
| 400 | Error Resource | Error |
Get package by id
Get package by ID
GET /api/v1/auth/package/68fa03dc88ac0f0329f57649
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACAzNDAzMTA0ZjYzMzA0N2E1YjZkMGYwNDk5NTY0ZGE4OW0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAkBGfEJoBYgABUYA.8Tp92s3ADAtJjswjEuBTJpDgnrqaPhif1d3XZ-qD4tE
origin: http://e550a0ef-00fc-4c0f-9e21-c25adbc6329d.com
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYH1W_kOYAKtsABdYB
access-control-allow-origin: http://clientapp.com:3001
{
"usage": null,
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "package_by_id",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 100,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "Free",
"id": "68fa03dc88ac0f0329f57649",
"availability": null
}
Used to retrieve a package by its id.
Request
GET api/v1/auth/package/:id
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Package Resource | Package |
| 400 | Error Resource | Error |
| 404 | Error Resource | Error |
Edit package by id
UPDATE package/
PUT /api/v1/auth/package/68fa03d888ac0f0329b4807d
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACBmYzI4ZWNmODFlYzk0MmRmOGNjYzg2NzU1YTBlOWFlZm0AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYA8wSfEJoBYgABUYA.0nvFlyqUkRQIvA0YdMQalLFetZ9guXtnyj1Xstwj9fE
origin: http://fb78428b-0df5-40e1-99e0-590581ff2587.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"name": "premium",
"limits": [
{
"value": -1,
"name": "query_string_support",
"label": "label"
},
{
"value": 20,
"name": "number_of_pages",
"label": "label"
},
{
"value": 1,
"name": "variation_per_page",
"label": "label"
},
{
"value": 10,
"name": "static_sections",
"label": "label"
},
{
"value": 5,
"name": "sections_total",
"label": "label"
},
{
"value": 7,
"name": "hosted_files",
"label": "label"
},
{
"value": 500000,
"name": "size_per_file",
"label": "label"
},
{
"value": 10,
"name": "api_limit_sec",
"label": "label"
},
{
"value": -1,
"name": "api_limit_hour",
"label": "label"
},
{
"value": 100,
"name": "api_limit_minute",
"label": "label"
},
{
"value": 500,
"name": "api_limit_day",
"label": "label"
},
{
"value": -1,
"name": "dynamic_section_types_support",
"label": "label"
},
{
"value": 2,
"name": "users",
"label": "label"
},
{
"value": 5,
"name": "domains",
"label": "label"
}
],
"label": "premium"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYHpY6KcFiB1IABdLB
access-control-allow-origin: http://clientapp.com:3001
{
"usage": null,
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "premium",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 20,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 7,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": -1,
"name": "api_limit_hour"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "premium",
"id": "68fa03d888ac0f0329b4807d",
"availability": null
}
Used to edit a package by its id.
Request
PUT api/v1/auth/package/:id
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| package_id | The package id in Sections | query_string | string | true |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Package Resource | Package |
| 400 | Error Resource | Error |
| 404 | Error Resource | Error |
Duplicate package by id
Duplicate package
POST /api/v1/auth/package/68fa03df88ac0f03299db685/duplicate
token: SFMyNTY.g2gDdAAAAAJtAAAABGRhdGF0AAAAAW0AAAAEdXNlcnQAAAACbQAAAAxyb2xlc19vYmplY3RsAAAAAXQAAAABbQAAAAV0aXRsZW0AAAALc3VwZXJfYWRtaW5qbQAAAAd1c2VyX2lkbQAAACAyNmQ3ZDEwOTRkNmI0NGVmOTdjYzZjOWExN2M5ZjIxN20AAAAGc3RhdHVzbQAAAAdzdWNjZXNzbgYAlCCfEJoBYgABUYA.HRsLvkG-7m6RvqrB3TpiRbXyUSy7HRL0b3s_3W-girE
origin: http://06d7d404-15a1-4d3a-8f6a-051b30fc3f22.com
content-type: multipart/mixed; boundary=plug_conn_test
{
"name": "package 2"
}
Response
200
content-type: application/json; charset=utf-8
cache-control: max-age=0, private, must-revalidate
x-request-id: GHEYIDrqaaecm6cABdpB
access-control-allow-origin: http://clientapp.com:3001
{
"usage": null,
"type": "public",
"rank": 3,
"quota": -1,
"price": 1999,
"name": "package 2",
"locked": false,
"limits": [
{
"value": -1,
"name": "query_string_support"
},
{
"value": 2,
"name": "number_of_pages"
},
{
"value": 1,
"name": "variation_per_page"
},
{
"value": 10,
"name": "static_sections"
},
{
"value": 5,
"name": "sections_total"
},
{
"value": 10,
"name": "hosted_files"
},
{
"value": 500000,
"name": "size_per_file"
},
{
"value": 10,
"name": "api_limit_sec"
},
{
"value": 100,
"name": "api_limit_minute"
},
{
"value": 100,
"name": "api_limit_hour"
},
{
"value": 500,
"name": "api_limit_day"
},
{
"value": -1,
"name": "dynamic_section_types_support"
},
{
"value": 2,
"name": "users"
},
{
"value": 5,
"name": "domains"
}
],
"label": "Free",
"id": "68fa03df88ac0f03299db686",
"availability": null
}
Used to duplicate a package by its id.
Request
GET api/v1/auth/package/:id/duplicate
Parameters
| Parameter | Description | In | Type | Required | Default | Example |
|---|---|---|---|---|---|---|
| token | Sections Token | header | string | true | ||
| name | Name of the package to be used when duplicating | body | string | true | Eweev Package #1 |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | Package Resource | Package |
| 400 | Error Resource | Error |
| 404 | Error Resource | Error |