Replace the Home page of the App
PUT
/apps/{appId}/home
const url = 'https://api.passion.io/v1/apps/example/home';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"tagline":"example","cover":{"kind":"image","fileId":"example"},"story":[{"heading":"example","text":"example","picture":{"kind":"image","fileId":"example"}}],"highlights":["example"],"testimonials":[{"quote":"example","name":"example","photoFileId":"example"}],"questions":[{"question":"example","answer":"example"}],"sections":[{"kind":"story","hidden":true}],"offerIds":["example"],"frontDoor":"open","membersOnlyLine":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.passion.io/v1/apps/example/home \ --header 'Content-Type: application/json' \ --data '{ "tagline": "example", "cover": { "kind": "image", "fileId": "example" }, "story": [ { "heading": "example", "text": "example", "picture": { "kind": "image", "fileId": "example" } } ], "highlights": [ "example" ], "testimonials": [ { "quote": "example", "name": "example", "photoFileId": "example" } ], "questions": [ { "question": "example", "answer": "example" } ], "sections": [ { "kind": "story", "hidden": true } ], "offerIds": [ "example" ], "frontDoor": "open", "membersOnlyLine": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”appId
required
The id of the App, as Studio shows it.
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
cover
required
story
required
highlights
required
Short lines about what members get. Empty lets the App say them.
Array<string>
testimonials
required
questions
required
Questions a visitor asks, each with its answer.
Array<object>
object
question
required
string
answer
required
string
sections
required
Every section kind once, in the order a visitor sees them. A hidden section is not shown.
Array<object>
object
kind
required
string
hidden
required
boolean
offerIds
required
Any of:
Array<string>
null
frontDoor
required
open: visitors see the Home. members_only: visitors see only the tagline, the members-only line and a sign-in.
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
cover
required
story
required
highlights
required
Array<string>
testimonials
required
questions
required
Array<object>
object
question
required
string
answer
required
string
sections
required
Every section kind once, in the order a visitor sees them. A hidden section is not shown.
Array<object>
object
kind
required
string
hidden
required
boolean
offerIds
required
Any of:
Array<string>
null
frontDoor
required
open: visitors see the Home. members_only: visitors see only the tagline, the members-only line and a sign-in.
string
Example
{ "cover": { "kind": "image" }, "story": [ { "picture": { "kind": "image" } } ], "sections": [ { "kind": "story" } ], "frontDoor": "open"}