Workspaces

Workspaces are the top level organization for your notes. They are containers that host bundles, the lower-level folders. On this page, we’ll dive into the different workspace endpoints you can use to manage workspaces programmatically. We'll look at how to query, create, update, and delete workspaces.

The workspace model

The workspace model contains very few properties, as it servers mostly as a tool for organizing your bundles. Below are the properties that are included with workspace objects.

Properties

  • Name
    _id
    Type
    string
    Description

    Unique identifier for the workspace.

  • Name
    name
    Type
    string
    Description

    Arbitrary name for the workspace.

  • Name
    createdAt
    Type
    timestamp
    Description

    Timestamp of when the workspace was created user.

  • Name
    updatedAt
    Type
    timestamp
    Description

    Timestamp of when the workspace was last updated user.

  • Name
    organizationId
    Type
    string
    Description

    Unique identifier for the organization that the workspace belongs to

  • Name
    status
    Type
    enum (active | archived)
    Description

    The current status of the workspace. Archived workspace are not shown by default.


GET/v1/workspaces

List all workspaces

This endpoint allows you to retrieve a paginated list of all your conversations. By default, a maximum of ten conversations are shown per page.

Request

GET
/v1/workspaces
curl -G https://api.bundleiq.com/v1/workspaces \
  -H "X-Api-key: {token}" \

Response

{
  "has_more": false,
  "data":{
"workspaces": [
    {
        "_id": "64be517d694a346b852c0b3b",
        "organizationId": "64b0cfacd547d15c094c52ff",
        "name": "Sample workspace 1",
        "status": "active",
        "createdAt": "2023-07-24T10:25:01.030Z",
        "updatedAt": "2024-08-22T15:35:24.209Z"
    },
    {
        "_id": "66c75d7085a1de3e72aaf505",
        "organizationId": "64b0cfacd547d15c094c52ff",
        "name": "Sample workspace 2",
        "status": "active",
        "createdAt": "2024-08-22T15:46:56.405Z",
        "updatedAt": "2024-08-22T21:28:27.361Z"
    }
  ]
}

POST/v1/workspaces

Create a workspace

This endpoint allows you to create a new workspace.

Required attributes

  • Name
    name
    Type
    string
    Description

    Arbitrary name for the workspace.

Request

POST
/v1/workspaces
curl https://api.bundleiq.com/v1/workspaces \
  -H "X-Api-Key: {token}" \
  -d '{"name": "Sample workspace"}'

Response

{
  "name": "Sample workspace",
  "_id": "66c8ee820084c217769e289c",
  "organizationId": "64b0cfacd547d15c094c52ff",
  "status": "active",
  "createdAt": "2024-08-23T20:18:10.765Z",
  "updatedAt": "2024-08-23T20:18:10.765Z"
}

PATCH/v1/workspaces/:id

Update a workspace

This endpoint allows you update a workspace.

Optional attributes

  • Name
    name
    Type
    string
    Description

    Arbitrary name for the workspace.

Request

GET
/v1/conversations/66c8ee820084c217769e289c
curl https://api.bundleiq.com/v1/workspaces/66c8ee820084c217769e289c \
  -H "Authorization: Bearer {token}"
  -d '{"name": "Sample workspace updated"}'

Response

{
  "_id": "66c8ee820084c217769e289c",
  "organizationId": "64b0cfacd547d15c094c52ff",
  "name": "Sample workspace updated",
  "status": "active",
  "createdAt": "2024-08-23T20:18:10.765Z",
  "updatedAt": "2024-08-23T20:26:36.116Z"
}

DELETE/v1/workspaces/:id

Delete a workspace

This endpoint allows you to delete a workspace in your organization. Note: This action is irreversible, and will delete all the bundles and notes that are associated with the workspace.

Request

DELETE
/v1/workspaces/66c8ee820084c217769e289c
curl -X DELETE https://api.bundleiq.com/v1/workspaces/66c8ee820084c217769e289c \
  -H "X-Api-Key: {token}"