{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peerbound/json-schema/peerbound-list-response-note-schema.json",
  "title": "ListResponse[Note]",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peerbound-notes-api-openapi.yml#/components/schemas/ListResponse_Note_",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/Note"
      },
      "type": "array",
      "title": "Data",
      "description": "List of resources"
    },
    "pagination": {
      "$ref": "#/$defs/PaginationInfo",
      "description": "Pagination information"
    }
  },
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "$defs": {
    "LinkedAccount": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Unique Peerbound identifier for the account"
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Name of the account"
        },
        "salesforce_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Salesforce Id",
          "description": "Salesforce Account ID if synced"
        },
        "hubspot_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hubspot Id",
          "description": "HubSpot Company ID if synced"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "LinkedAccount",
      "description": "Account (customer company) linked to a resource.\n\nUsed for stories, reviews, and moments to reference the associated account."
    },
    "LinkedContact": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Unique Peerbound identifier for the contact"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "description": "Full name of the contact"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email",
          "description": "Email address of the contact"
        },
        "salesforce_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Salesforce Id",
          "description": "Salesforce Contact ID if synced"
        },
        "hubspot_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hubspot Id",
          "description": "HubSpot Contact ID if synced"
        }
      },
      "type": "object",
      "required": [
        "id"
      ],
      "title": "LinkedContact",
      "description": "Contact (person) linked to a resource.\n\nUsed for reviews and moments to reference the associated contact."
    },
    "Note": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Unique Peerbound identifier for the note"
        },
        "text": {
          "type": "string",
          "title": "Text",
          "description": "The note content"
        },
        "note_type": {
          "type": "string",
          "title": "Note Type",
          "description": "Type/category of the note"
        },
        "date": {
          "type": "string",
          "title": "Date",
          "description": "Date the note is associated with (ISO 8601 date)"
        },
        "source_link_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source Link Url",
          "description": "External URL reference for the note"
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/LinkedAccount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Associated account (customer)"
        },
        "contact": {
          "anyOf": [
            {
              "$ref": "#/$defs/LinkedContact"
            },
            {
              "type": "null"
            }
          ],
          "description": "Associated contact (person)"
        },
        "is_deleted": {
          "type": "boolean",
          "title": "Is Deleted",
          "description": "Whether the note has been deleted"
        },
        "created_at": {
          "type": "string",
          "title": "Created At",
          "description": "Timestamp when the note was created (ISO 8601)"
        },
        "updated_at": {
          "type": "string",
          "title": "Updated At",
          "description": "Timestamp when the note or its type was last updated (ISO 8601)"
        }
      },
      "type": "object",
      "required": [
        "id",
        "text",
        "note_type",
        "date",
        "is_deleted",
        "created_at",
        "updated_at"
      ],
      "title": "Note",
      "description": "A note associated with an account and optionally a contact.\n\nNotes include the type name normalized as a string. The updated_at\nreflects changes to both the note and its associated note type."
    },
    "PaginationInfo": {
      "properties": {
        "next_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Next Cursor",
          "description": "Opaque cursor to fetch the next page. Null if no more results."
        },
        "has_more": {
          "type": "boolean",
          "title": "Has More",
          "description": "Whether there are more results available"
        },
        "limit": {
          "type": "integer",
          "title": "Limit",
          "description": "Maximum number of results requested"
        }
      },
      "type": "object",
      "required": [
        "has_more",
        "limit"
      ],
      "title": "PaginationInfo",
      "description": "Pagination metadata for list responses.\n\nAll list endpoints use cursor-based pagination with consistent metadata."
    }
  }
}