{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/long-events/json-schema/long-events-success-envelope-schema.json",
  "title": "SuccessEnvelope",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/long-events-openapi.json#/components/schemas/SuccessEnvelope",
  "type": "object",
  "required": [
    "success",
    "data"
  ],
  "properties": {
    "success": {
      "const": true
    },
    "data": {
      "type": "object",
      "description": "Action-specific result. Artist actions use ArtistIdentity for `artist` and each member of `artists`.",
      "properties": {
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "event_page_url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "Human citation page on Belong Events, Crypto Events for a crypto detail, or CheckIn for a Belong-native event. Null when the event has no valid ID or name, or a Belong-native event has no valid CheckIn path."
              },
              "editorial_pick": {
                "type": "boolean",
                "description": "Present on human-approved editorial results."
              },
              "editorial_series": {
                "type": "string",
                "enum": [
                  "long5",
                  "crypto5"
                ],
                "description": "Published editorial series; LONG5 is culture/music, CRYPTO5 is crypto and broader tech."
              },
              "editorial_blurb": {
                "type": "string",
                "description": "Approved reader-facing copy."
              },
              "editorial_is_city_pick": {
                "type": "boolean",
                "description": "Lead event in its published round."
              }
            },
            "additionalProperties": true
          }
        },
        "artist": {
          "$ref": "#/$defs/ArtistIdentity"
        },
        "artists": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ArtistIdentity"
          }
        }
      },
      "additionalProperties": true
    }
  },
  "$defs": {
    "ArtistIdentity": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "id",
        "slug",
        "name",
        "mbid",
        "spotify_id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "LONG Events artist UUID."
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "mbid": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "Accepted MusicBrainz artist ID, or null when no unambiguous mapping is available."
        },
        "spotify_id": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[A-Za-z0-9]{22}$",
          "description": "Spotify artist ID backed by cross-provider verification, or null. Name-only listener-library matches are never published."
        }
      }
    }
  }
}