Notes#
Create, read, update, and delete notes attached to activities, campaigns, or creators.
List notes#
List notes for an entity, ordered by most recent first.
typescript
const { items, totalCount, facets } = await bw.notes.list({
organizationId: 'org_123',
entityType: 'activity',
entityId: 'act_abc123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
| entityType | 'activity' | 'campaign' | 'creator' | Required | Type of entity to list notes for. |
| entityId | string (UUID) | Required | Entity identifier to list notes for. |
Response#
Returns { items, totalCount, facets } with paginated results.
Scoping required
You must pass entityType ('activity', 'campaign', or 'creator') and entityId to scope the list.
Get note#
Retrieve a single note by ID.
typescript
const { data } = await bw.notes({ id: 'abc-123' });Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Note identifier. |
Response#
Returns { data } with the result.
Create note#
Create a new note attached to an entity.
typescript
const { data } = await bw.notes.create({
organizationId: 'org_123',
entityType: 'activity',
entityId: 'act_abc123',
content: 'Note content here.',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier. |
| entityType | 'activity' | 'campaign' | 'creator' | Required | Type of entity to attach the note to. |
| entityId | string (UUID) | Required | Entity identifier to attach the note to. |
| content | string | Required | Note content (plain text or markdown). |
| createdBy | string (UUID) | null | — | User identifier who created the note. |
| createdByName | string | — | Display name of the note creator (max 255 characters). |
Response#
Returns { data } with the result.
Update note#
Update a note's content.
typescript
const { data } = await bw.notes.update({
noteId: 'note_abc123',
content: 'Note content here.',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| noteId | string (UUID) | Required | Note identifier to update. |
| content | string | Required | Updated note content. |
Response#
Returns { data } with the result.