Get a note
const url = 'https://api.usesonora.com/v1/notes/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.usesonora.com/v1/notes/example \ --header 'Authorization: Bearer <token>'One shared note. A private note answers 404 note_not_found, as a missing one does.
Requires the notes:read scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The note’s Sonora id.
Responses
Section titled “Responses”The note.
A note your team shares on a customer.
object
The note as Markdown: headings, lists, checklists, links and emphasis kept.
The note as plain text, for search or a preview.
Who wrote a note: a person on your team, or an API key — never the person who created the key.
object
user for a note someone wrote in Sonora; api_key for one written through the API.
The person’s name, or the API key’s. Null for a key since deleted.
The person’s email. Always null for an API key.
object
This resource’s canonical URL on the API host.
Example
{ "author": { "type": "user" }}Headers
Section titled “Headers”A fingerprint of the note’s title and body. Send it back as If-Match to update only if neither has changed since.
unauthorized: The Authorization header is missing, or the key is invalid, revoked or expired.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}insufficient_scope: The key or token lacks the scope this endpoint needs, and details.required names it; or an OAuth access token called an endpoint only an API key can.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}note_not_found: No shared note with that id. Private notes are never found.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}rate_limited: Too many requests for this key; retry after Retry-After seconds.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}internal_error: Something went wrong on Sonora’s side. Retry, and quote requestId if it persists.
The one error shape every endpoint answers with.
object
object
Stable snake_case code to branch on; see the error table.
For humans; may change.
object
Quote it when asking for help.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": { "additionalProperty": "example" }, "requestId": "example" }}Try it
Run this request against your own Sonora workspace. Sign in, pick the workspace, and the page gets an access token that only reads, only what your role covers, for an hour.
Signed in.
As curl
$SONORA_TOKEN is your access token or an API key; the page never shows the token.