curl --request POST \
--url https://api.affinity.co/v2/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "entities",
"content": {
"html": "<p>Followed up after the demo. Strong interest, will recirculate next week.</p>"
},
"persons": [
{
"id": 2
},
{
"id": 3
}
],
"companies": [
{
"id": 10
}
],
"opportunities": [
{
"id": 100
}
]
}
'{
"id": 1,
"type": "entities",
"content": {
"html": "<p>Followed up after the demo. Strong interest, will recirculate next week.</p>"
},
"creator": {
"id": 1,
"firstName": "Jane",
"lastName": "Smith",
"primaryEmailAddress": "jane.smith@northpointvc.com",
"type": "internal"
},
"mentions": [],
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": null
}Create a Note
Create a new note. By default it is authored by the calling user; set creator to attribute
it to a different internal person in your organization. Notes can be attached directly to
entities (Persons, Companies, Opportunities), anchored to an interaction (meeting,
call, or chat message), or written as a reply to an existing note.
The type field selects the shape of the request body. AI Notetaker note types
(ai-notetaker, ai-notetaker-reply) are system-generated and cannot be created through
this endpoint.
type | Description | Required | Optional |
|---|---|---|---|
entities | A note attached directly to one or more entities. | content, and at least one of persons / companies / opportunities. | Any combination of persons / companies / opportunities. |
interaction | A note anchored to a meeting, call, or chat message. | content, interaction.{type,id}. | persons / companies / opportunities, added as direct associations on top of the interaction’s own participants. |
user-reply | A reply to an existing root note. Replies have no entity associations or interaction attachment of their own. | content, parent.id (must reference an existing root note the caller can access). | None |
By default a note is authored by the calling user. To attribute a note to a different member
of your organization, set the optional creator field to reference that person by id. The
referenced person must be an active internal person in your organization.
By default a note’s creation time is the time of the request. To backfill a historical note,
set the optional createdAt field to the time the note should be recorded as created.
Body content. content.html is rendered HTML that must use only the allowed tags;
submitting restricted tags, attributes, URL schemes, or mention spans will cause the request to
fail. See the request examples below for representative payloads.
curl --request POST \
--url https://api.affinity.co/v2/notes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "entities",
"content": {
"html": "<p>Followed up after the demo. Strong interest, will recirculate next week.</p>"
},
"persons": [
{
"id": 2
},
{
"id": 3
}
],
"companies": [
{
"id": 10
}
],
"opportunities": [
{
"id": 100
}
]
}
'{
"id": 1,
"type": "entities",
"content": {
"html": "<p>Followed up after the demo. Strong interest, will recirculate next week.</p>"
},
"creator": {
"id": 1,
"firstName": "Jane",
"lastName": "Smith",
"primaryEmailAddress": "jane.smith@northpointvc.com",
"type": "internal"
},
"mentions": [],
"createdAt": "2023-01-01T00:00:00Z",
"updatedAt": null
}Authorizations
Body
- notes.EntitiesNoteToBeCreated
- notes.InteractionNoteToBeCreated
- notes.UserReplyNoteToBeCreated
Request body for creating a note attached directly to one or more entities. At least one of persons, companies, or opportunities must include an entry, since a note of this type requires at least one attached entity.
Response
Created
- notes.EntitiesNote
- notes.InteractionNote
- notes.AiNotetakerRootNote
- notes.UserReplyNote
- notes.AiNotetakerReplyNote
A Note object attached to an entity (Person, Company, Opportunity)
Was this page helpful?