{
  "openapi": "3.1.0",
  "info": {
    "title": "GuestlistOnline API",
    "version": "1.0.0",
    "description": "Programmatic access to the events and guests of one GuestlistOnline workspace.\n\nAuthenticate with an API key created by the workspace owner under Organization settings, API & webhooks. Send it as `Authorization: Bearer glo_live_...`.\nKeys carry scopes (read, write, checkin). This release exposes the read endpoints; write and check-in endpoints and webhooks follow.\n\nRate limits: 120 requests per minute and 5000 per hour per key, reported in X-RateLimit-Limit and X-RateLimit-Remaining.\nLists are paginated with an opaque cursor: pass next_cursor back as ?cursor= until it is null.\nErrors always have the shape { \"error\": { \"code\", \"message\", \"field\"? } } with a stable code.",
    "contact": {
      "name": "GuestlistOnline support",
      "email": "go@guestlistonline.com",
      "url": "https://www.guestlistonline.com/help"
    }
  },
  "servers": [
    {
      "url": "https://www.guestlistonline.com/api/v1"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key from Organization settings. Keep it server-side."
      }
    },
    "schemas": {
      "Event": {
        "type": "object",
        "required": [
          "id",
          "name",
          "event_date",
          "is_paid_event",
          "registration_open",
          "guest_count",
          "attending_count",
          "checked_in_count",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_date": {
            "type": "string",
            "format": "date",
            "description": "YYYY-MM-DD in the event time zone."
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "start_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "HH:MM, 24-hour."
          },
          "end_time": {
            "type": [
              "string",
              "null"
            ],
            "description": "HH:MM, 24-hour. Null when the event has no end time."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "IANA time zone, for example Europe/Amsterdam."
          },
          "time_format": {
            "type": "string",
            "enum": [
              "24h",
              "12h"
            ],
            "description": "How times are shown to guests on pages and in emails. Stored times are always 24-hour."
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 3166-1 alpha-2."
          },
          "language": {
            "type": "string",
            "enum": [
              "en",
              "nl",
              "de",
              "fr",
              "es",
              "it",
              "pt"
            ]
          },
          "is_paid_event": {
            "type": "boolean"
          },
          "ticket_price": {
            "type": [
              "number",
              "null"
            ],
            "description": "General ticket price in the event currency. Null on free events."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 4217, lower or upper case as stored."
          },
          "guest_limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "registration_open": {
            "type": "boolean",
            "description": "Whether the public registration page accepts sign-ups."
          },
          "require_registration_approval": {
            "type": "boolean"
          },
          "guest_count": {
            "type": "integer"
          },
          "attending_count": {
            "type": "integer"
          },
          "checked_in_count": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Guest": {
        "type": "object",
        "required": [
          "id",
          "name",
          "tags",
          "rsvp_status",
          "plus_one_allowed",
          "companion_count",
          "checked_in",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "greeting_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Informal name used in email salutations."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Null for list-only guests without an email address."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "en",
              "nl",
              "de",
              "fr",
              "es",
              "it",
              "pt",
              null
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "rsvp_status": {
            "type": "string",
            "enum": [
              "pending",
              "attending",
              "not_attending"
            ]
          },
          "approval_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "payment_status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pending",
              "paid",
              "free",
              "failed",
              null
            ]
          },
          "pricing_tier": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "free",
              "artist",
              "general",
              null
            ]
          },
          "registration_source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "manual",
              "self_registration",
              "artist_invitation",
              "sponsor_invitation",
              "import",
              null
            ]
          },
          "plus_one_allowed": {
            "type": "boolean"
          },
          "companion_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Set on companion rows: the id of the main guest they belong to."
          },
          "companion_count": {
            "type": "integer",
            "description": "Number of companions attached to this guest."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own identifier, settable when creating guests through the API (write endpoints, next release)."
          },
          "checked_in": {
            "type": "boolean"
          },
          "checked_in_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "missing_key",
                  "invalid_key",
                  "key_revoked",
                  "key_expired",
                  "plan_required",
                  "insufficient_scope",
                  "rate_limited",
                  "ip_blocked",
                  "invalid_parameter",
                  "unknown_parameter",
                  "invalid_cursor",
                  "invalid_id",
                  "not_found",
                  "method_not_allowed",
                  "unsupported_media_type",
                  "payload_too_large",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string",
                "description": "Present when the error concerns one parameter or field."
              }
            }
          }
        }
      },
      "EventList": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "GuestList": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Guest"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Me": {
        "type": "object",
        "properties": {
          "organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "key": {
            "type": "object",
            "properties": {
              "prefix": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write",
                    "checkin"
                  ]
                }
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "rate_limit": {
            "type": "object",
            "properties": {
              "per_minute": {
                "type": "integer"
              },
              "per_hour": {
                "type": "integer"
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/me": {
      "get": {
        "summary": "Who am I",
        "description": "Connectivity check. Returns the workspace and key the request is authenticated as.",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "The workspace has no active Pro or Enterprise subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded or IP blocked. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "get": {
        "summary": "List events",
        "description": "Events of the workspace, newest first. Filter by event date with from and to (YYYY-MM-DD).",
        "operationId": "listEvents",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque cursor from a previous next_cursor."
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            }
          },
          "400": {
            "description": "Bad limit, cursor or filter; unknown query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "The workspace has no active Pro or Enterprise subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded or IP blocked. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events/{id}": {
      "get": {
        "summary": "Get an event",
        "operationId": "getEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "400": {
            "description": "id is not a UUID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "The workspace has no active Pro or Enterprise subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No event with this id in your workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded or IP blocked. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events/{id}/guests": {
      "get": {
        "summary": "List guests of an event",
        "description": "Guests newest first, companions included (see companion_of). Filter by status, tag, email or updated_since to sync incrementally.",
        "operationId": "listGuests",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Opaque cursor from a previous next_cursor."
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "attending",
                "not_attending"
              ]
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact tag match."
          },
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "email"
            },
            "description": "Exact match, case-insensitive."
          },
          {
            "name": "updated_since",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only guests changed at or after this time."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestList"
                }
              }
            }
          },
          "400": {
            "description": "Bad filter, limit or cursor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked or expired key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "The workspace has no active Pro or Enterprise subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The key lacks the required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No event with this id in your workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded or IP blocked. See Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  }
}