Bundles
Bundles ar the lower-level organization folder for your notes. They are an important pillar for segmenting data on the platform. Bundles allow you to group data for chat bundles, or internally for interacting with ALANI. On this page, we will dive into the different endpoints to manage your bundles. We'll look at how to query, create, update, and delete bundles.
The bundle model
The bundle model contains The conversation model contains all the information about the conversations between you and your contacts. In addition, conversations can also be group-based with more than one contact, they can have a pinned message, and they can be muted.
Properties
- Name
_id
- Type
- string
- Description
Unique identifier for the bundle.
- Name
workspaceId
- Type
- string
- Description
Unique identifier for the workspace that the bundle will be in.
- Name
title
- Type
- string
- Description
Arbitrary name for your bundle.
- Name
description
- Type
- string
- Description
Arbitrary description for your bundle.
- Name
createdAt
- Type
- timestamp
- Description
Timestamp of when the bundle was created.
- Name
updatedAt
- Type
- timestamp
- Description
Timestamp of when the bundle was last updated.
List all bundles
This endpoint allows you to retrieve a list of the bundles from your organization. You can optionally pass a workspace as a query paramter and retrieve the bundles contained in a workspace.
Optional attributes
- Name
workspaceId
- Type
- string
- Description
Unique identifier for the workspace that the bundle will be in.
Request
curl -G https://api.bundleiq.com/v1/bundles \
-H "X-Api-Key: {token}" \
--data-urlencode "workspaceId={workspaceId}" \
Response
{
"data": [
{
"bundles": [
{
"_id": "66c8960d316d444f91917afa",
"workspaceId": "66c75d7085a1de3e72aaf505",
"title": "Sample bundle",
"description": "Sample description written here",
"createdAt": "2024-08-23T14:00:45.465Z",
"updatedAt": "2024-08-23T14:00:45.465Z"
},
...
]
}
]
}
Create a bundle
This endpoint allows you to create a new bundle inside any workspace in your organization.
Required attributes
- Name
title
- Type
- string
- Description
Arbitrary name for your bundle.
- Name
workspaceId
- Type
- string
- Description
The unique identifier of the workspace that this new bundle will belongs to.
Optional attributes
- Name
description
- Type
- string
- Description
Arbitrary description for your bundle.
Request
curl https://api.bundleiq.com/v1/bundles \
-H "Authorization: Bearer {token}" \
-d '{
"workspaceId": "66c75d7085a1de3e72aaf505",
"title": "Created through the API",
"description": "Sample description written here"
}'
Response
{
"_id": "66c7b57095a20b143ac0037d",
"title": "Sample bundle",
"description": "Sample description written here 2",
"workspaceId": "66c75d7085a1de3e72aaf505",
"createdAt": "2024-08-23T14:03:26.325Z",
"updatedAt": "2024-08-23T14:03:26.325Z"
}
Update a bundle
This endpoint allows you to perform an update on a bundle. You can change the name, description, or move the bundle to another workspace in your organization. Note that if you move the bundle to another workspace, all the notes contained inside the bundle will also be moved.
Optional attributes
- Name
workspaceId
- Type
- string
- Description
Unique identifier for the workspce that you want to move the bundle to.
- Name
title
- Type
- string
- Description
Arbitrary name for the bundle.
- Name
description
- Type
- string
- Description
Arbitrary description for the bundle.
Request
curl -X PATCH https://api.bundleiq.com/v1/bundles/66c7b57095a20b143ac0037d \
-H "X-Api-Key: {token}" \
-d '{
"title": "Updated bundle name",
"description": "Updated bundle description"
"workspaceId": "66c75d7085a1de3e72aaf505"
}'
Response
{
"_id": "66c7b57095a20b143ac0037d",
"workspaceId": "66c75d7085a1de3e72aaf505",
"title": ""Updated bundle name",
"description": "Updated bundle description",
"createdAt": "2024-08-22T22:02:24.411Z",
"updatedAt": "2024-08-23T13:48:38.025Z"
}
Delete a bundle
This endpoint allows you to delete a bundle. Note that this action is not reversible and will automatically delete all the notes contained inside the bundle.
Request
curl -X DELETE https://api.bundleiq.com/v1/bundles/66c7b57095a20b143ac0037d \
-H "X-Api-Key: {token}"