{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/good-grants/json-schema/good-grants-user-list-schema.json",
  "title": "UserList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/good-grants-users-api-openapi.yml#/components/schemas/UserList",
  "allOf": [
    {
      "$ref": "#/$defs/Pagination"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserSummary"
          }
        }
      }
    }
  ],
  "$defs": {
    "Pagination": {
      "type": "object",
      "title": "Pagination",
      "properties": {
        "current_page": {
          "type": "integer",
          "description": "Number of the page returned by this response, starting at `1`."
        },
        "first_page_url": {
          "type": "string",
          "description": "URL of the first page in the result set, relative when the requested page is beyond the last page."
        },
        "from": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Position of the first record on this page within the full result set, starting at `1`, or `null` when the requested page is beyond the last page."
        },
        "last_page": {
          "type": "integer",
          "description": "Total number of pages."
        },
        "last_page_url": {
          "type": "string",
          "description": "URL of the last page in the result set, relative when the requested page is beyond the last page."
        },
        "next_page_url": {
          "type": "string",
          "description": "URL of the next page in the result set, empty when the current page is the last page."
        },
        "path": {
          "type": "string",
          "description": "Canonical URL of the endpoint, without query parameters."
        },
        "per_page": {
          "type": "integer",
          "default": 10,
          "description": "Maximum number of records returned per page."
        },
        "prev_page_url": {
          "type": "string",
          "description": "URL of the previous page in the result set, empty when the current page is the first page."
        },
        "to": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Position of the last record on this page within the full result set, or `null` when the requested page is beyond the last page."
        },
        "total": {
          "type": "integer",
          "description": "Total number of records across all pages."
        }
      }
    },
    "UserSummary": {
      "type": "object",
      "description": "Core user fields shared by the list and single-user responses.",
      "properties": {
        "analytics_cookies": {
          "type": "boolean",
          "description": "Specifies whether the user accepted analytics cookies."
        },
        "broadcast_emails": {
          "type": "boolean",
          "description": "Specifies whether the user accepted broadcast emails."
        },
        "comments": {
          "type": "string",
          "description": "Administrative notes recorded against the user, formatted for export."
        },
        "confirmation": {
          "type": "string",
          "description": "Account confirmation status of the user, such as `Confirmed` or `Invited`."
        },
        "confirmed_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Date and time when the user confirmed the account, null until confirmed."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time when the user account was created."
        },
        "created_by": {
          "type": "string",
          "description": "Method by which the user account was created, such as `manual` or `registration`."
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "format": "email",
          "description": "Email address of the user, null if not recorded."
        },
        "first_name": {
          "type": "string",
          "description": "First name of the user."
        },
        "language": {
          "type": "object",
          "description": "Preferred language of the user.",
          "properties": {
            "code": {
              "type": "string",
              "description": "Locale code of the language, such as `en_GB`."
            },
            "language": {
              "type": "string",
              "description": "Display name of the language, such as `English (United Kingdom)`."
            }
          }
        },
        "last_name": {
          "type": "string",
          "description": "Last name of the user."
        },
        "marketing_cookies": {
          "type": "boolean",
          "description": "Specifies whether the user accepted marketing cookies."
        },
        "mobile": {
          "type": "string",
          "description": "Mobile phone number of the user."
        },
        "name": {
          "type": "string",
          "description": "Full name of the user."
        },
        "necessary_cookies": {
          "type": "boolean",
          "description": "Specifies whether the user accepted necessary cookies."
        },
        "notification_emails": {
          "type": "boolean",
          "description": "Specifies whether the user accepted notification emails."
        },
        "notification_sms": {
          "type": "boolean",
          "description": "Specifies whether the user accepted notification text messages."
        },
        "roles": {
          "type": "array",
          "description": "Roles assigned to the user within the account.",
          "items": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string",
                "description": "URL-safe identifier of the role."
              },
              "link": {
                "type": "string",
                "format": "uri",
                "description": "URL of the role resource."
              },
              "name": {
                "type": "object",
                "description": "Name of the role, keyed by locale code.",
                "additionalProperties": {
                  "type": "string"
                }
              }
            }
          }
        },
        "slug": {
          "type": "string",
          "description": "URL-safe identifier of the user."
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "Date and time when the user account was last updated."
        }
      }
    }
  }
}