Core API Reference

Notes — Core API

Admin/team notes management. Notes can be attached to resources (users, organizations, issuers, clients) for internal documentation. Supports @mentions of team members and [[references]] to other resources.

Base URL: https://api.authpi.com — see the Core API overview for authentication, pagination, and idempotency, or try these endpoints in the interactive reference.

GET/v1/accounts/{account_id}/notes

List Notes

Lists admin/team notes for an account with optional filtering.

Notes can be filtered by:

  • subject_type and subject_id - Notes attached to a specific resource
  • issuer_id - Notes within a specific issuer (required for user/org notes)
  • created_by - Notes created by a specific team member
  • pinned - Only pinned or unpinned notes
  • mentions_user_id - Notes that @mention a specific team member

Results are ordered by pinned status (pinned first) then by creation date (newest first).

Path parameters

NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account

Query parameters

NameTypeRequiredDescription
limitintegerOptionalMaximum number of items to return (1-100, default: 50)
cursorstringOptionalPagination cursor (format: pinned:timestamp)
subject_typeobjectOptionalFilter by subject type (user, org, issuer, client)
subject_idstringOptionalFilter by subject ID (requires subject_type)
issuer_idstringOptionalFilter by issuer ID (required for user/org subjects)
created_bystringOptionalFilter by creator's user ID
pinnedboolean | nullOptionalFilter by pinned status
mentions_user_idstringOptionalFilter notes that @mention this user ID

Responses

CodeDescriptionSchema
200Notes retrieved successfullyobject
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError

POST/v1/accounts/{account_id}/notes

Create Note

Creates a new admin/team note attached to a resource.

Notes can be attached to:

  • user - A user identity (requires issuer_id)
  • org - An organization (requires issuer_id)
  • issuer - An issuer (account-scoped, no issuer_id needed)
  • client - An OAuth client (account-scoped, no issuer_id needed)

Content Format: Notes support Markdown with special syntax for mentions and references:

  • @mentions: @[Display Name](user_id) - Tags a team member
  • [[references]]: [[type:id]] or [[type:id|Display Text]] - Links to another resource

Mentions and references are automatically extracted and stored for efficient querying (e.g., "find notes that mention me" or "find notes that reference this organization").

Example content:

Hey @[John Doe](usr_abc123), please review [[org:org_xyz|Acme Corp]].

Path parameters

NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account

Request body

Content type: application/json

Schema: CreateNoteInput

Responses

CodeDescriptionSchema
201Note created successfullyobject
400Bad Request - The request is malformed or contains invalid data.ApiError
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError

GET/v1/accounts/{account_id}/notes/count

Count Notes

Counts the number of notes attached to a specific resource.

Useful for displaying note counts in UI without fetching all notes.

Path parameters

NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account

Query parameters

NameTypeRequiredDescription
subject_typeobjectRequiredThe type of resource (user, org, issuer, client)
subject_idstringRequiredThe ID of the resource

Responses

CodeDescriptionSchema
200Note count retrieved successfullyobject
400Bad Request - The request is malformed or contains invalid data.ApiError
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError

Get Note Backlinks

Finds notes that reference a specific resource using [[references]].

This enables "backlink" queries - for example, finding all notes that mention a particular organization or user.

Reference types:

  • user, org, issuer, client, webhook, api_key
NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account
NameTypeRequiredDescription
ref_typeobjectRequiredThe type of referenced resource
ref_idstringRequiredThe ID of the referenced resource
limitintegerOptionalMaximum number of notes to return (1-50, default: 10)
CodeDescriptionSchema
200Backlinks retrieved successfullyobject
400Bad Request - The request is malformed or contains invalid data.ApiError
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError

GET/v1/accounts/{account_id}/notes/{note_id}

Get Note

Retrieves a single note by its ID.

The response includes:

  • Note content and metadata
  • mentions - Array of @mentioned team members extracted from content
  • references - Array of [[referenced]] resources extracted from content

Path parameters

NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account
note_idstringRequiredThe unique identifier of the note

Responses

CodeDescriptionSchema
200Note retrieved successfullyobject
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError
404Not Found - The requested resource does not exist.ApiError

PATCH/v1/accounts/{account_id}/notes/{note_id}

Update Note

Updates an existing note's content or pinned status.

When content is updated, @mentions and [[references]] are automatically re-parsed and the stored mentions/references are updated accordingly.

Updatable fields:

  • content - The note's markdown content
  • pinned - Whether the note should appear at the top of lists

Path parameters

NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account
note_idstringRequiredThe unique identifier of the note

Request body

Content type: application/json

Schema: UpdateNoteInput

Responses

CodeDescriptionSchema
200Note updated successfullyobject
400Bad Request - The request is malformed or contains invalid data.ApiError
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError
404Not Found - The requested resource does not exist.ApiError
412Precondition Failed - The resource has been modified since the provided ETag.PreconditionFailedError

DELETE/v1/accounts/{account_id}/notes/{note_id}

Delete Note

Permanently deletes a note.

This also removes all associated @mentions and [[references]] from the database (cascading delete).

Path parameters

NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account
note_idstringRequiredThe unique identifier of the note

Responses

CodeDescriptionSchema
204No Content - The operation completed successfully with no response body.
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError
404Not Found - The requested resource does not exist.ApiError
412Precondition Failed - The resource has been modified since the provided ETag.PreconditionFailedError