{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mepmail-dev/json-schema/mepmail-dev-list-contacts-response-schema.json",
  "title": "ListContactsResponse",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mepmail-dev-api-openapi.json#/components/schemas/ListContactsResponse",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "list"
      ]
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "unsubscribed": {
            "type": "boolean"
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "string"
                      ]
                    },
                    "value": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "value"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "number"
                      ]
                    },
                    "value": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "type",
                    "value"
                  ]
                }
              ]
            },
            "description": "Present with include=properties"
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "subscription": {
                  "type": "string",
                  "enum": [
                    "opt_in",
                    "opt_out"
                  ],
                  "description": "Effective choice: the contact's explicit one, else the topic's default"
                },
                "explicit": {
                  "type": "boolean",
                  "description": "True when the contact or the API chose this; false when it is the topic's default"
                },
                "visibility": {
                  "type": "string",
                  "enum": [
                    "public",
                    "private"
                  ],
                  "description": "The hosted preference page lists public topics only"
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "subscription",
                "explicit",
                "visibility"
              ]
            },
            "description": "Present with include=topics"
          }
        },
        "required": [
          "id",
          "email",
          "first_name",
          "last_name",
          "created_at",
          "unsubscribed"
        ]
      }
    },
    "has_more": {
      "type": "boolean"
    }
  },
  "required": [
    "object",
    "data",
    "has_more"
  ]
}