AI Content Chat (Beta) logo

API - Managing Experiences

Create/Edit/Delete content experiences via API.

Prerequisite

All requests to  Create / Edit / Delete Document Experiences should be authenticated and contain USER_ACCESS_TOKEN. Here is how you can acquire USER_ACCESS_TOKEN

Create a RELAYTO/ experience

curl -X POST \
https://relayto.com/api/v2/docs/pdf \
-H 'authorization: Bearer USER_ACCESS_TOKEN' \
-H 'content-type: multipart/form-data' \
-F 'file=PDF_BIN_FILE'

Response:

{
   "slug": DOCUMENT_EXPERIENCE_SLUG,
   "url": "https://relayto.com/PATH_TO_THE_NEW_DOCUMENT_EXPERIENCE"
}

Update navigation in your RELAYTO experience

curl -X PUT \ https://relayto.com/api/v2/docs/DOCUMENT_EXPERIENCE_SLUG/navigation \ 
-H 'authorization: Bearer USER_ACCESS_TOKEN' \
-H 'content-type: application/json' \
-d '{
     "bookmarks": [
     {
        "title":"Home",
        "pageNumber":1
     },
     {
        "title":"Contents",
        "pageNumber":2
     },
     {
        "title":"Introduction",
        "pageNumber":3
     },
     {
        "title":"1. Many faces of growth",
        "pageNumber":7,
        "bookmarks":[
           {
              "title":"Video Overview",
              "pageNumber":8
           },
           {
              "title":"What'\''s Next",
              "pageNumber":9
           },
           {
              "title":"Fjord Suggests",
              "pageNumber":10
           }
        ]
     }
  ]}'

Response:

200 - (true|false)