Notes

Notes are the unit of content in the platform. They are the backbone of the knowledge for your account. In this section, we will cover how to create, update, list and delete notes for your organization.

The notes model

The notes model contains all the information about the notes and their content, as well as some references from the sources they come from. These last ones are especially useful when creating syncing pipelines from external sources. They allow you to keep track of the original source of the note.

Properties

  • Name
    _id
    Type
    string
    Description

    Unique identifier for the note.

  • Name
    title
    Type
    string
    Description

    Arbitrary title for the note.

  • Name
    body
    Type
    object
    Description

    This is the main content of the note. It should be a string, but it can be stringified HTML content if you want to include rich text.

  • Name
    bundleId
    Type
    string
    Description

    This is the unique identifier for the bundle that this note is contained in.

  • Name
    workspaceId
    Type
    string
    Description

    This is the unique identifier for the workspace that this note is contained in.

  • Name
    sourceId
    Type
    string
    Description

    Arbitraty identifier for the source of the note. This can be used to track the original source of the note.

  • Name
    sourceURL
    Type
    string
    Description

    The URL of the source if available online. This is useful to display the original source if necessary.

  • Name
    createdAt
    Type
    timestamp
    Description

    Timestamp of when the note was created.

  • Name
    updatedAt
    Type
    timestamp
    Description

    Timestamp of when the note was last updated.


GET/v1/notes

List all notes

This endpoint allows you to retrieve a list of all your notes.

Optional attributes

  • Name
    workspaceId
    Type
    string
    Description

    The workspace identifier to filter notes by.

  • Name
    bundleId
    Type
    string
    Description

    The bundle identifier to filter notes by.

Request

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

Response

{
  "notes": [
      {
          "_id": "66c8c41275a0b48083586863",
          "accountId": "6299121ffb2237e57abbfc37",
          "title": "SAmple note title",
          "body": "<p>This is a note made through the interface to make sure that everything is working well.</p>",
          "bundleId": "66c896aeae50a57242545fd0",
          "source": "bundleIQ",
          "meta": null,
          "workspaceId": "66c75d7085a1de3e72aaf505",
          "createdAt": "2024-08-23T17:17:06.699Z",
          "updatedAt": "2024-08-23T17:17:36.918Z"
      },
      ...
  ]
}

POST/v1/notes

Create a note

This endpoint allows you to create a new note.

Required attributes

  • Name
    title
    Type
    string
    Description

    Arbitrary note title.

  • Name
    body
    Type
    string
    Description

    The main content of the note.

  • Name
    bundleId
    Type
    string
    Description

    The unique identifier of the bundle that the note is going to be created in.

  • Name
    body
    Type
    string
    Description

    The main content of the note.

Optional attributes

  • Name
    sourceId
    Type
    string
    Description

    Arbitrary unique identifier of the source that the information is coming from. Useful for tracking the original source of the note.

  • Name
    sourceURL
    Type
    string
    Description

    Link to the source of the content if available online.

Request

POST
/v1/notes
curl https://api.bundleiq.com/v1/notes \
  -H "X-Api-Key: {token}" \
  -d '{
      "title": "Sample note title",
      "body": "This is a note made through the interface to make sure that everything is working well.",
      "bundleId": "66c896aeae50a57242545fd0"
    }' \

Response

{
  "_id": "66ccef2901006921da8ade3e",
  "title": "Sample note title",
  "body": "<p>this can be rich text</p>",
  "meta": null,
  "createdAt": "2024-08-26T21:10:01.773Z",
  "updatedAt": "2024-08-26T21:10:01.773Z",
  "bundleId": "66c7b57095a20b143ac0037d",
  "workspaceId": "66c75d7085a1de3e72aaf505",
  "accountId": "6299121ffb2237e57abbfc37",
  "source": "bundleIQ"
}

PUT/v1/notes/:id

Update a note

This endpoint allows you to perform an update on a note. Examples of updates are changing the title, body, or moving the note to another bundle

Optional attributes

  • Name
    title
    Type
    string
    Description

    The new title of the note

  • Name
    body
    Type
    string
    Description

    The new content of the note.

  • Name
    sourceId
    Type
    string
    Description

    The arbitrary unique identifier to the source of the note.

  • Name
    sourceURL
    Type
    string
    Description

    The link to the source of the note if available online.

Request

PUT
/v1/notes/66ccef2901006921da8ade3e
curl -X PUT https://api.bundleiq.com/v1/notes/66ccef2901006921da8ade3e \
  -H "X-Api-Key: {token}" \
  -d '{
        "title": "Updated note title",
      }'

Response

{
  "_id": "66ccef2901006921da8ade3e",
  "accountId": "6299121ffb2237e57abbfc37",
  "title": "Updated note title",
  "body": "<p>this can be rich text</p>",
  "source": "bundleIQ",
  "meta": null,
  "workspaceId": "66c75d7085a1de3e72aaf505",
  "createdAt": "2024-08-26T21:10:01.773Z",
  "updatedAt": "2024-08-26T21:17:24.871Z",
  "bundleId": "66c7b57095a20b143ac0037d"
}

DELETE/v1/notes/:id

Delete a note

This endpoint allows you to delete note from your organization. Note: This will permanently delete the note.

Request

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