The Notes API provides a simple interface to manage notes. The API allows you to create, delete and update your notes. You can retrieve a single note as well as list of all notes.

You can assign as many notes as you want to any of the resources listed below:

JSON Format

Name Read Only Type Description
id true number Unique identifier of the note.
creator_id true number Unique identifier of the user that created the note.
resource_type false string Type name of the resource the note is attached to. Possible values: lead, contact, deal
resource_id false number Unique identifier of the resource the note is attached to.
content false string Content of the note.
is_important false boolean Indicator for whether the note has been starred or not.
tags false array An array of tags for a note. See more at Tags.
created_at true string Date and time of creation in UTC (ISO8601 format).
updated_at true string Date and time of the last update in UTC (ISO8601 format).
type false string Type of the note which governs the permissions to the note. Use restricted to narrow the access only to the note creator (as denoted by creator_id field) and regular in all other cases. Possible values: regular, restricted

Retrieve all notes

GET /v2/notes

Returns all notes available to the user, according to the parameters provided.

Parameters

Name Required Type In Description
page false number Query Page number to start from. Page numbering starts at 1, and omitting the page parameter will return the first page.
per_page false number Query Number of records to return per page. The default limit is 25 and the maximum number that can be returned at one time is 100.
sort_by false string Query A field to sort by. Default ordering is ascending. If you want to change the sort ordering to descending, append :desc to the field e.g. sort_by=resource_type:desc. Possible values, resource_type, created_at, updated_at
includes false string Query Comma-separated list of one or more resources related to the note. Not supported at the moment.
ids false string Query Comma-separated list of note IDs to be returned in a request.
creator_id false number Query Unique identifier of the user. Returns all notes created by the user.
q false string Query A query string to search for. Performs a full text search on the content field.
resource_type false string Query Name of the type of resource to search for. Possible values: lead, contact, deal
resource_id false number Query Unique identifier of the resource to search for.

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/notes?resource_type=deals \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "items": [    {      "data": {        "id": 1,        "creator_id": 1,        "resource_type": "lead",        "resource_id": 1,        "content": "Highly important.",        "is_important": true,        "tags": [          "premium"        ],        "created_at": "2014-08-27T16:32:56Z",        "updated_at": "2014-08-27T17:32:56Z",        "type": "regular"      },      "meta": {        "type": "note"      }    }  ],  "meta": {    "type": "collection",    "count": 1,    "links": {      "self": "http://api.getbase.com/v2/notes.json"    }  }}

Create a note

POST /v2/notes

Create a new note and associate it with one of the resources listed below:

Parameters

Name Required Type In Description
resource_type true string Body e.g. lead
resource_id true number Body
content true string Body e.g.Highly important.
is_important false boolean Body
tags false array Body e.g. "tags":["premium"]
type false string Body e.g. "type":regular

Allowed for

  • Agents

Using cURL

curl -v -X POST https://api.getbase.com/v2/notes \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN" \-d '{  "data": {    "resource_type": "lead",    "resource_id": 1,    "content": "Highly important.",    "is_important": true,    "tags": [      "premium"    ],    "type": "regular"  },  "meta": {    "type": "note"  }}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 1,    "creator_id": 1,    "resource_type": "lead",    "resource_id": 1,    "content": "Highly important.",    "is_important": true,    "tags": [      "premium"    ],    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T17:32:56Z",    "type": "regular"  },  "meta": {    "type": "note"  }}

Retrieve a single note

GET /v2/notes/:id

Returns a single note available to the user, according to the unique note ID provided. If the note ID does not exist, this request will return an error.

Parameters

Name Required Type In Description
id true number Query Unique identifier of the note.

Allowed for

  • Agents

Using cURL

curl -v -X GET https://api.getbase.com/v2/notes/1 \-H "Accept: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 1,    "creator_id": 1,    "resource_type": "lead",    "resource_id": 1,    "content": "Highly important.",    "is_important": true,    "tags": [      "premium"    ],    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T17:32:56Z",    "type": "regular"  },  "meta": {    "type": "note"  }}

Update a note

PUT /v2/notes/:id

Updates note information. If the note ID does not exist, this request will return an error.

Parameters

Name Required Type In Description
resource_type false string Body e.g.lead
resource_id false number Query e.g.1
content false string Body e.g. Highly important. Assign to Tom.)
is_important false boolean Body
tags false array Body e.g. ["premium"]
type false string Body e.g. regular

Allowed for

  • Agents

Using cURL

curl -v -X PUT https://api.getbase.com/v2/notes/1 \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Authorization: Bearer $ACCESS_TOKEN" \-d '{  "data": {    "content": "Highly important. Assign to Tom."  }}'

Example response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8Content-Language: en
{  "data": {    "id": 1,    "creator_id": 1,    "resource_type": "lead",    "resource_id": 1,    "content": "Highly important. Assign to Tom.",    "is_important": true,    "tags": [      "premium"    ],    "created_at": "2014-08-27T16:32:56Z",    "updated_at": "2014-08-27T17:32:56Z",    "type": "regular"  },  "meta": {    "type": "note"  }}

Delete a note

DELETE /v2/notes/:id

Delete an existing note. If the note ID does not exist, this request will return an error. This operation cannot be undone.

Parameters

Name Required Type In Description
id true number Body Unique identifier of the note.

Allowed for

  • Agents

Using cURL

curl -v -X DELETE https://api.getbase.com/v2/notes/1 \-H "Authorization: Bearer $ACCESS_TOKEN"

Example response

HTTP/1.1 204 No Content