Skip to main content

Get Component Library

Retrieve a list of component libraries available to the authenticated workspace. Each library includes a set of component previews. Component libraries are collections of reusable design components (frames, shapes, icons, etc.) that can be used in design generation.

Endpoint

POST componentLibrary/get

Authentication

Include your Enterprise API credentials in the request headers:

sivi-api-key: YOUR_API_KEY

Request Body Example

{
"clIds": ["cl_RY-kOJp4w__s"],
"system": "SYSTEM"
}

Request Parameters

ParameterTypeRequiredDescription
clIdsArray<String>NoFilter by specific component library IDs
systemStringNoFilter by system type. Allowed values: USER, SYSTEM
abstractUserIdStringNoUnique identifier for the user (Enterprise/Super API only)

Response

Success Response (200 OK)

{
"status": 200,
"body": {
"componentLibraries": [
{
"clId": "cl_RY-kOJp4w__s",
"count": 665,
"createdOn": 1774445138,
"description": "Best for natural products, sustainable brands, farm-to-table businesses, and wellness-focused companies.",
"name": "Organic",
"status": "enabled",
"tags": [],
"system": "SYSTEM",
"componentPreviews": [
{
"cmpId": "cmp_6fa3051ab330cd09b26f5d08d570e4a3",
"name": "frame-6914",
"subType": "person",
"system": "SYSTEM",
"description": "",
"cmpType": "flexible",
"semanticTypes": ["person"]
}
]
}
],
"cursor": null
}
}

Response Body Parameters

ParameterTypeDescription
clIdStringComponent library identifier
countNumberNumber of components in the library
createdOnNumberCreation timestamp
descriptionStringDescription of the library
nameStringDisplay name of the library
statusStringLibrary status (e.g. enabled)
tagsArrayTags associated with the library
systemStringUSER or SYSTEM
componentPreviewsArrayPreview components from the library
componentPreviews[].cmpIdStringComponent identifier
componentPreviews[].nameStringComponent name
componentPreviews[].subTypeStringComponent subtype (e.g. person, product)
componentPreviews[].systemStringUSER or SYSTEM
componentPreviews[].descriptionStringComponent description
componentPreviews[].cmpTypeStringComponent type (e.g. flexible)
componentPreviews[].semanticTypesArray<String>Semantic types of the component
cursorStringCursor for pagination

Error Responses

Authentication Error (401 Unauthorized)

{
"status": 401,
"body": {
"message": "Failed to authenticate request. Please add sivi-api-key header in request"
}
}

Invalid Input (422 Unprocessable Entity)

{
"status": 422,
"body": {
"message": "Invalid input"
}
}

Server Error (500 Internal Server Error)

{
"status": 500,
"body": {
"message": "Server internal error"
}
}

Usage Notes

  • Results are scoped to the authenticated workspace; wId is derived from the session and cannot be set in the request body
  • If clIds is omitted, all libraries accessible to the workspace are returned
  • componentPreviews contains a sample of components from each library
  • Use component/get to fetch the full list of components for a specific library