{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peerbound/json-schema/peerbound-list-response-story-schema.json",
  "title": "ListResponse[Story]",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peerbound-stories-api-openapi.yml#/components/schemas/ListResponse_Story_",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/Story"
      },
      "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."
    },
    "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."
    },
    "Story": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Unique Peerbound identifier"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Title",
          "description": "Published title of the story"
        },
        "approval_state": {
          "type": "string",
          "enum": [
            "Not Approved",
            "Approved – Public"
          ],
          "title": "Approval State",
          "description": "Current approval state"
        },
        "links": {
          "$ref": "#/$defs/StoryLinks",
          "description": "URLs for accessing the story content"
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/LinkedAccount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Associated account (customer)"
        },
        "approved_on": {
          "type": "string",
          "title": "Approved On",
          "description": "Date when the story was approved (ISO 8601 date)"
        },
        "is_deleted": {
          "type": "boolean",
          "title": "Is Deleted",
          "description": "Whether the story has been deleted"
        },
        "created_at": {
          "type": "string",
          "title": "Created At",
          "description": "Timestamp when the story was created (ISO 8601)"
        },
        "updated_at": {
          "type": "string",
          "title": "Updated At",
          "description": "Timestamp when the story was last updated (ISO 8601)"
        }
      },
      "type": "object",
      "required": [
        "id",
        "approval_state",
        "links",
        "approved_on",
        "is_deleted",
        "created_at",
        "updated_at"
      ],
      "title": "Story",
      "description": "A published customer story."
    },
    "StoryLinks": {
      "properties": {
        "pdf_url": {
          "type": "string",
          "title": "Pdf Url",
          "description": "URL to the story PDF"
        },
        "web_link_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Web Link Url",
          "description": "URL to the story landing page"
        },
        "slide_deck_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Slide Deck Url",
          "description": "URL to slide deck version"
        },
        "sales_content_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sales Content Url",
          "description": "URL to sales enablement content"
        }
      },
      "type": "object",
      "required": [
        "pdf_url"
      ],
      "title": "StoryLinks",
      "description": "Links associated with a story."
    }
  }
}