In Summer '19, we got access to a new POST
method on the connect/communities
endpoint, allowing for programmatic creation of a Community:
Make a POST request to the existing /connect/communities resource with the new Community Input request body.
The resource is documented here and takes a JSON body:
{
"name":"The Capricorn Cafe",
"urlPathPrefix":"capricorncafe",
"templateName":"Customer Service",
"description":"Coffee and coffee products for the most discerning tastes."
}
I would like to use this endpoint to create a Salesforce Tabs + Visualforce community. However, making this call with "templateName": "Salesforce Tabs + Visualforce"
yields
{'errorCode': 'INVALID_INPUT', 'message': 'The specified community template does not exist.'}]
If you make a request to the Community Templates endpoint, it does indeed include an entry called "Salesforce Tabs + Visualforce"
. However, using a GET to connect/communities
to obtain information on existing Communities, Visualforce communities shows
"templateName" : null,
None of the following options work:
- Percent-encoding the name.
- Omitting the
templateName
entirely. - Passing
null
- Passing the literal string
"null"
- Passing an empty string
All yield the same error.
Is this possible? What input is the endpoint looking for?