Create a community
POST
/apps/{appId}/communities
const url = 'https://api.passion.io/v1/apps/example/communities';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","summary":"example","membersCanMessageCreator":false,"membersCanMessageEachOther":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.passion.io/v1/apps/example/communities \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "summary": "example", "membersCanMessageCreator": false, "membersCanMessageEachOther": false }'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
name
required
The name of the community, as members see it, for example “Calm circle”.
string
summary
One or two sentences that tell members what the community is for.
string
membersCanMessageCreator
Whether members can send the creator a direct message.
boolean
membersCanMessageEachOther
Whether members can send each other direct messages.
boolean
Responses
Section titled “Responses”OK
Media typeapplication/json
object
Examplegenerated
{ "communityId": "example", "name": "example", "summary": "example", "membersCanMessageCreator": true, "membersCanMessageEachOther": true}