The Project Items API allows you to manage a project's items. Learn more about project items in Wix Portfolio.
With the Project Items API, you can:
It’s important to note the following points before starting to code:
This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
You can display a live photo gallery on a digital photo frame, updating dynamically in real-time.
Call Create Project to create a project that will act as the photo gallery, allowing you to store and manage photos represented as project items within the gallery.
Share the newly created project's ID with those who need to access the gallery so they can add or remove photos from the digital photo frame.
Listen for Project Item Created, Project Item Updated, and Project Item Deleted events to detect when new photos are added, existing photos are updated, or photos are removed from the gallery.
Periodically call List Project Items to retrieve the latest gallery content and ensure the photo frame reflects real-time changes.
Project ID.
Project item ID.
Index that determines which position a project is displayed in the project.
Default: Epoch timestamp.
Project item title.
Project item description.
Project item data type.
Date and time the project item was created.
Date and time the project item was last updated.
Project item link.
Information about the Wix Media image.
Information about the Wix Media video.
{
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"id": "987e6543-e21a-10d2-b987-426614176789",
"sortOrder": 1694090400.0,
"title": "Sample Project Item Title",
"description": "This is a description for the sample project item.",
"type": "IMAGE",
"image": {
"imageInfo": {
"id": "987e6543-e21a-10d2-b987-426614176789",
"url": "https://example.com/image.jpg",
"width": 1920,
"height": 1080
}
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:00:00Z",
"link": {
"text": "View Project",
"url": "https://example.com/project",
"target": "_blank"
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a project item.
You can only call this method when authenticated as a Wix app or Wix user identity.
Project item to create.
Newly created project item.
curl -X POST \
'https://www.wixapis.com/portfolio/v1/Items' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
"item": {
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"sortOrder": 1.0,
"title": "Lonely",
"description": "This is the Lonely song image cover.",
"image": {
"imageInfo": {
"id": "23ff-66b77-888aaf-9c45227e,
}
},
"link": {
"text": "Listen to the song",
"url": "https://lonely-song.com",
"target": "_blank"
}
}
}'
{
"item": {
"id": "456e7890-e89b-12d3-a456-426614174000",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"title": "Lonely",
"description": "This is the Lonely song image cover.",
"sortOrder": 1.0,
"type": "IMAGE",
"image": {
"imageInfo": {
"id": "23ff-66b77-888aaf-9c45227e"
}
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:00:00Z",
"link": {
"text": "Listen to the song",
"url": "https://lonely-song.com",
"target": "_blank"
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a project item.
Project item ID.
Project item.
curl -X GET \
'https://www.wixapis.com/portfolio/v1/Items/456e7890-e89b-12d3-a456-426614174001' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json'
{
"item": {
"id": "456e7890-e89b-12d3-a456-426614174001",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"title": "Item Title 1",
"description": "This is item description 1.",
"sortOrder": 1.0,
"type": "IMAGE",
"image": {
"imageInfo": {
"url": "https://example.com/image1.jpg",
"id": "3886bbcc7fb-66b77-888aaf-3c45227f"
}
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:00:00Z",
"link": {
"text": "Visit Site 1",
"url": "https://example.com",
"target": "_blank"
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Deletes a project item.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the project item to delete.
Project ID.
ID of the deleted project item.
curl -X DELETE \
'https://www.wixapis.com/portfolio/v1/Items/456e7890-e89b-12d3-a456-426614174001' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json'
{
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"itemId": "456e7890-e89b-12d3-a456-426614174001"
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a list of all project items in the specified project.
Project ID.
Number of items to load.
Number of items to skip in the current sort order.
Project items.
Paging metadata.
curl -X GET \
'https://www.wixapis.com/portfolio/v1/projectItems/123e4567-e89b-12d3-a456-426614174000/items' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
{
"items": [
{
"id": "456e7890-e89b-12d3-a456-426614174001",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"title": "Item Title 1",
"description": "This is item description 1.",
"sortOrder": 1.0,
"type": "IMAGE",
"image": {
"imageInfo": {
"url": "https://example.com/image1.jpg",
"id": "4889bbcc7fb-66b77-888aaf-3c45227f"
}
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:00:00Z",
"link": {
"text": "Visit Site 1",
"url": "https://example.com",
"target": "_blank"
}
},
{
"id": "456e7890-e89b-12d3-a456-426614174002",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"title": "Item Title 2",
"description": "This is item description 2.",
"sortOrder": 2.0,
"type": "VIDEO",
"video": {
"videoInfo": {
"url": "https://example.com/video3.mp4",
"id": "4ee89bbcc7fb-69b77-888aaf-3c4522eec"
}
},
"createdDate": "2024-07-31T12:10:00Z",
"updatedDate": "2024-07-31T12:10:00Z",
"link": {
"text": "Visit Site 2",
"url": "https://example2.com",
"target": "_self"
}
}
],
"metadata": {
"count": 2,
"offset": 0,
"total": 2,
"tooManyToCount": false,
"cursors": {
"next": "next_cursor",
"prev": "prev_cursor"
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a project item.
You can only call this method when authenticated as a Wix app or Wix user identity.
Project item ID.
The project item to update.
The updated project item.
curl -X PATCH \
'https://www.wixapis.com/portfolio/v1/Items/456e7890-e89b-12d3-a456-426614174001' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
"item": {
"title": "Updated Item Title",
"description": "This is an updated item description.",
"sortOrder": 1.0,
"image": {
"imageInfo": {
"url": "https://example.com/new-image1.jpg",
"id": "9a7eef_afc3d989928f45198a16175e3c7aba3d"
}
},
"link": {
"text": "Visit Updated Site",
"url": "https://example.com/update",
"target": "_blank"
}
}
}'
{
"item": {
"id": "456e7890-e89b-12d3-a456-426614174001",
"projectId": "123e4567-e89b-12d3-a456-426614174000",
"title": "Updated Item Title",
"description": "This is an updated item description.",
"sortOrder": 1.0,
"type": "IMAGE",
"image": {
"imageInfo": {
"url": "https://example.com/new-image1.jpg",
"id": "9a7eef_afc3d989928f45198a16175e3c7aba3d"
}
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-09-31T12:30:00Z",
"link": {
"text": "Visit Updated Site",
"url": "https://example.com/update",
"target": "_blank"
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a project item is created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.portfolio.project_items.v1.project_item
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.portfolio.project_items.v1.project_item_created",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a project item is deleted.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.portfolio.project_items.v1.project_item
.
Event name. Expected deleted
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.portfolio.project_items.v1.project_item_deleted",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a project item is updated.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.portfolio.project_items.v1.project_item
.
Event name. Expected updated
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.portfolio.project_items.v1.project_item_updated",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}