{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-candidate-list-with-members-schema.json",
  "title": "CandidateListWithMembers",
  "description": "A candidate list together with a page of its members.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-candidate-lists-api-openapi.yml#/components/schemas/CandidateListWithMembers",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "List ID",
      "description": "Unique identifier for the candidate list."
    },
    "title": {
      "type": "string",
      "title": "Title",
      "description": "Human-readable name of the list."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "title": "Description",
      "description": "Optional free-text description of the list."
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ],
      "title": "External ID",
      "description": "Caller-supplied external identifier for the list, when set."
    },
    "owner": {
      "type": [
        "string",
        "null"
      ],
      "format": "email",
      "title": "Owner",
      "description": "Email of the user who owns the list. Null when that user no longer exists."
    },
    "candidatesCount": {
      "type": "integer",
      "title": "Candidates Count",
      "description": "Number of candidate profiles currently on the list."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "When the list was created (ISO 8601)."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At",
      "description": "When the list was last updated (ISO 8601)."
    },
    "candidates": {
      "type": "array",
      "title": "Members",
      "description": "A page of candidate profiles on this list.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Candidate profile id."
          },
          "externalId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Caller-supplied external identifier of the candidate profile, when available."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Candidate's name."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Candidate's email address."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Candidate's job title."
          },
          "company": {
            "type": [
              "string",
              "null"
            ],
            "description": "Candidate's company."
          },
          "addedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the candidate was added to the list (ISO 8601)."
          }
        },
        "required": [
          "id",
          "externalId",
          "name",
          "email",
          "title",
          "company",
          "addedAt"
        ],
        "additionalProperties": false
      }
    },
    "nextToken": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pass back as `nextToken` to fetch the next page of members. Null when there are no more results."
    }
  },
  "required": [
    "id",
    "title",
    "description",
    "externalId",
    "owner",
    "candidatesCount",
    "createdAt",
    "updatedAt",
    "candidates",
    "nextToken"
  ],
  "additionalProperties": false
}