Skip to main content
POST
Add to library

Description

Add a survey item to the library.

Payload

  • item: Object containing the item configuration
    • type: Item type. Required.
    • subtype: Item subtype. Required.
    • frontendId: Item frontend id. Required.
    • position: Item position in the survey. Required.
    • title: Item title. Required.
    • config: Object containing item configurations, internal fields depend on the item type. Refer to the auto save functionality for further details.. Required.
  • name: Item name for library. Optional.
  • isShared: Boolean value to know if the item is shared with other company members. Optional.
  • isDefaultItem: Boolean value to know if the item is default. Required.

Response

200 OK

where:
  • createdAt: Creation date for the library item with the format YYYY-MM-DDTHH:mm:ss.SSSZ.
  • updatedAt: Last update date for the library item with the format YYYY-MM-DDTHH:mm:ss.SSSZ.
  • name: Library item name.
  • isDefaultItem: Whether or not the item should be available for all users.
  • isShared: Whether or not the item is shared for all users in the same company as the user that created it.
  • item: Same item passed in the payload.
  • id: Library item identifier.

400 Bad Request

subtype / frontendId / position / title / config are missing from item.

401 Unauthorized

The user doesn’t have permissions.

422 Unprocessable Entity

type is missing from item.
isDefaultItem is missing.

500 Internal Server Error

Error occurred while processing the request.

Authorizations

Authorization
string
header
required

Access token obtained from the m2m-token endpoint.

Headers

Authorization
string
required

Authorization token

Body

application/json

The body is of type object.

Response

Add to library

The response is of type object.