POST
/favorites/addAdd a page, space, or template to favorites
Adds a page, space, or template to the authenticated user's favorites. Set type and provide the corresponding ID field: pageId, spaceId, or templateId.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Favorite target details. Specify type and the matching ID field: pageId for a page, spaceId for a space, or templateId for a template.
pageIdstringoptional
UUID of the page to add when `type` is `page`.
spaceIdstringoptional
UUID of the space to add when `type` is `space`.
templateIdstringoptional
UUID of the template to add when `type` is `template`.
typestringrequired
Favorite target type: `page`, `space`, or `template`.
200Returns a response payload confirming the favorite was added.
dataunknownoptional
Response payload
statusintegeroptional
successbooleanoptional
400Returned when the ID matching `type` is missing or invalid.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the authenticated user is forbidden from adding the target to favorites.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
404Returned when the specified target does not exist.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
Error handling
A 400 is returned when type is missing or its corresponding ID is missing or invalid. A 403 is returned when the authenticated user is not permitted to favorite the target. A 404 is returned when the target identified by the matching ID does not exist.