{
  "openapi": "3.0.0",
  "info": {
    "title": "Car Storage Software API",
    "version": "1.1.0",
    "description": "Team-scoped REST API for Car Storage Software. Authenticate with a team API key (`Authorization: Bearer <key>` or `x-api-key: <key>`) created under Settings → Integrations → API. Keys carry granular `read:*` / `write:*` scopes; read never implies write."
  },
  "servers": [
    {
      "url": "https://www.carstoragesoftware.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Team API key from Settings → Integrations. Use `Authorization: Bearer <key>` or `x-api-key`."
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "details": {
            "nullable": true
          }
        },
        "required": [
          "error"
        ]
      },
      "V1Car": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "nullable": true
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "vin": {
            "type": "string",
            "nullable": true
          },
          "stockNumber": {
            "type": "string",
            "nullable": true
          },
          "year": {
            "type": "integer"
          },
          "make": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "trim": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "licensePlate": {
            "type": "string",
            "nullable": true
          },
          "licensePlateState": {
            "type": "string",
            "nullable": true
          },
          "mileage": {
            "type": "integer",
            "nullable": true
          },
          "mileageUnits": {
            "type": "string",
            "nullable": true
          },
          "parkingSpot": {
            "type": "string",
            "nullable": true
          },
          "parkingSpotId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingZoneId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "vendorId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isForSale": {
            "type": "boolean"
          },
          "declaredValueCents": {
            "type": "integer",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "customerId",
          "locationId",
          "vin",
          "stockNumber",
          "year",
          "make",
          "model",
          "trim",
          "color",
          "licensePlate",
          "licensePlateState",
          "mileage",
          "mileageUnits",
          "parkingSpot",
          "parkingSpotId",
          "parkingZoneId",
          "vendorId",
          "isForSale",
          "declaredValueCents",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1CarCreate": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1886,
            "maximum": 2100
          },
          "make": {
            "type": "string",
            "minLength": 1
          },
          "model": {
            "type": "string",
            "minLength": 1
          },
          "trim": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "vin": {
            "type": "string",
            "nullable": true
          },
          "stockNumber": {
            "type": "string",
            "nullable": true
          },
          "licensePlate": {
            "type": "string",
            "nullable": true
          },
          "licensePlateState": {
            "type": "string",
            "nullable": true
          },
          "mileage": {
            "type": "integer",
            "nullable": true
          },
          "mileageUnits": {
            "type": "string",
            "enum": [
              "mi",
              "km"
            ]
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingSpotId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingZoneId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "vendorId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isForSale": {
            "type": "boolean"
          },
          "declaredValueCents": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "year",
          "make",
          "model"
        ]
      },
      "V1CarUpdate": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 1886,
            "maximum": 2100
          },
          "make": {
            "type": "string",
            "minLength": 1
          },
          "model": {
            "type": "string",
            "minLength": 1
          },
          "trim": {
            "type": "string",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "vin": {
            "type": "string",
            "nullable": true
          },
          "stockNumber": {
            "type": "string",
            "nullable": true
          },
          "licensePlate": {
            "type": "string",
            "nullable": true
          },
          "licensePlateState": {
            "type": "string",
            "nullable": true
          },
          "mileage": {
            "type": "integer",
            "nullable": true
          },
          "mileageUnits": {
            "type": "string",
            "enum": [
              "mi",
              "km"
            ]
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingSpotId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingZoneId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "vendorId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isForSale": {
            "type": "boolean"
          },
          "declaredValueCents": {
            "type": "integer",
            "nullable": true
          }
        }
      },
      "V1CarsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1Car"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CarResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1Car"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1Customer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "deletedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "userId",
          "locationId",
          "firstName",
          "lastName",
          "companyName",
          "email",
          "phone",
          "address",
          "city",
          "state",
          "zip",
          "country",
          "isActive",
          "deletedAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1CustomerCreate": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "format": "email"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "firstName",
          "lastName"
        ]
      },
      "V1CustomerUpdate": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true,
            "format": "email"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          },
          "restore": {
            "type": "boolean"
          },
          "deletedAt": {
            "nullable": true
          }
        }
      },
      "V1CustomersResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1Customer"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CustomerResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1Customer"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1Contact": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "enum": [
              "primary",
              "spouse",
              "child",
              "son",
              "daughter",
              "family_member",
              "bookkeeper",
              "vehicle_handler",
              "family_office",
              "accountant",
              "assistant",
              "collection_manager",
              "other"
            ]
          },
          "roleDescription": {
            "type": "string",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean"
          },
          "canAccessPortal": {
            "type": "boolean"
          },
          "communicationPreferences": {
            "type": "object",
            "nullable": true,
            "properties": {
              "invoices": {
                "type": "boolean"
              },
              "estimates": {
                "type": "boolean"
              },
              "scheduling": {
                "type": "boolean"
              },
              "carUpdates": {
                "type": "boolean"
              },
              "contracts": {
                "type": "boolean"
              },
              "socialEvents": {
                "type": "boolean"
              },
              "marketing": {
                "type": "boolean"
              }
            },
            "required": [
              "invoices",
              "estimates",
              "scheduling",
              "carUpdates",
              "contracts",
              "socialEvents",
              "marketing"
            ]
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "customerId",
          "firstName",
          "lastName",
          "email",
          "phone",
          "role",
          "roleDescription",
          "isPrimary",
          "canAccessPortal",
          "communicationPreferences",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1ContactCreate": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "nullable": true,
            "format": "email"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "enum": [
              "primary",
              "spouse",
              "child",
              "son",
              "daughter",
              "family_member",
              "bookkeeper",
              "vehicle_handler",
              "family_office",
              "accountant",
              "assistant",
              "collection_manager",
              "other"
            ]
          },
          "roleDescription": {
            "type": "string",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean"
          },
          "canAccessPortal": {
            "type": "boolean"
          },
          "communicationPreferences": {
            "type": "object",
            "properties": {
              "invoices": {
                "type": "boolean"
              },
              "estimates": {
                "type": "boolean"
              },
              "scheduling": {
                "type": "boolean"
              },
              "carUpdates": {
                "type": "boolean"
              },
              "contracts": {
                "type": "boolean"
              },
              "socialEvents": {
                "type": "boolean"
              },
              "marketing": {
                "type": "boolean"
              }
            },
            "required": [
              "invoices",
              "estimates",
              "scheduling",
              "carUpdates",
              "contracts",
              "socialEvents",
              "marketing"
            ]
          }
        },
        "required": [
          "customerId",
          "firstName",
          "lastName"
        ]
      },
      "V1ContactUpdate": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "nullable": true,
            "format": "email"
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "enum": [
              "primary",
              "spouse",
              "child",
              "son",
              "daughter",
              "family_member",
              "bookkeeper",
              "vehicle_handler",
              "family_office",
              "accountant",
              "assistant",
              "collection_manager",
              "other"
            ]
          },
          "roleDescription": {
            "type": "string",
            "nullable": true
          },
          "isPrimary": {
            "type": "boolean"
          },
          "canAccessPortal": {
            "type": "boolean"
          },
          "communicationPreferences": {
            "type": "object",
            "properties": {
              "invoices": {
                "type": "boolean"
              },
              "estimates": {
                "type": "boolean"
              },
              "scheduling": {
                "type": "boolean"
              },
              "carUpdates": {
                "type": "boolean"
              },
              "contracts": {
                "type": "boolean"
              },
              "socialEvents": {
                "type": "boolean"
              },
              "marketing": {
                "type": "boolean"
              }
            },
            "required": [
              "invoices",
              "estimates",
              "scheduling",
              "carUpdates",
              "contracts",
              "socialEvents",
              "marketing"
            ]
          }
        }
      },
      "V1ContactsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1Contact"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1ContactResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1Contact"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1Location": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "name",
          "address",
          "city",
          "state",
          "zip",
          "phone",
          "timezone",
          "isActive",
          "sortOrder",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1LocationCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          }
        },
        "required": [
          "name"
        ]
      },
      "V1LocationUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zip": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "timezone": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          }
        }
      },
      "V1LocationsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1Location"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1LocationResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1Location"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1ParkingZone": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "additionalCapacity": {
            "type": "integer",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "locationId",
          "name",
          "description",
          "additionalCapacity",
          "color",
          "isActive",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1ParkingZoneCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "additionalCapacity": {
            "type": "integer",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ]
      },
      "V1ParkingZoneUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "additionalCapacity": {
            "type": "integer",
            "nullable": true
          },
          "color": {
            "type": "string",
            "nullable": true
          },
          "isActive": {
            "type": "boolean"
          }
        }
      },
      "V1ParkingZonesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1ParkingZone"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1ParkingZoneResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1ParkingZone"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1ParkingSpot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "reservedCarId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "reservedCustomerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "isLiftSpot": {
            "type": "boolean",
            "nullable": true
          },
          "liftHeight": {
            "type": "integer",
            "nullable": true
          },
          "isMotorcycleSpot": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "locationId",
          "name",
          "description",
          "customerId",
          "reservedCarId",
          "reservedCustomerId",
          "isActive",
          "sortOrder",
          "tags",
          "isLiftSpot",
          "liftHeight",
          "isMotorcycleSpot",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1ParkingSpotCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "reservedCarId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "reservedCustomerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isLiftSpot": {
            "type": "boolean"
          },
          "liftHeight": {
            "type": "integer",
            "nullable": true
          },
          "isMotorcycleSpot": {
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ]
      },
      "V1ParkingSpotUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "reservedCarId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "reservedCustomerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "isActive": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isLiftSpot": {
            "type": "boolean"
          },
          "liftHeight": {
            "type": "integer",
            "nullable": true
          },
          "isMotorcycleSpot": {
            "type": "boolean"
          }
        }
      },
      "V1ParkingSpotsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1ParkingSpot"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1ParkingSpotResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1ParkingSpot"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1ParkingAssignment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingSpotId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingZoneId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "vendorId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "carId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "startDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "assignmentType": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "locationId",
          "parkingSpotId",
          "parkingZoneId",
          "vendorId",
          "customerId",
          "carId",
          "startDate",
          "endDate",
          "assignmentType",
          "notes",
          "status",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1ParkingAssignmentCreate": {
        "type": "object",
        "properties": {
          "parkingSpotId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingZoneId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "vendorId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "carId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "assignmentType": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "startDate"
        ]
      },
      "V1ParkingAssignmentUpdate": {
        "type": "object",
        "properties": {
          "parkingSpotId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingZoneId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "vendorId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "carId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "assignmentType": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          }
        }
      },
      "V1ParkingAssignmentsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1ParkingAssignment"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1ParkingAssignmentResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1ParkingAssignment"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1MarketingTemplate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean",
            "nullable": true
          },
          "designJson": {
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "name",
          "subject",
          "body",
          "isDefault",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1MarketingTemplateCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean"
          },
          "designJson": {
            "nullable": true
          }
        },
        "required": [
          "name"
        ]
      },
      "V1MarketingTemplateUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean"
          },
          "designJson": {
            "nullable": true
          }
        }
      },
      "V1MarketingTemplatesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1MarketingTemplate"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1MarketingTemplateResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1MarketingTemplate"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1Campaign": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "socialEventId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "metadata": {
            "nullable": true
          },
          "lastRunAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "name",
          "description",
          "status",
          "type",
          "channel",
          "startDate",
          "endDate",
          "socialEventId",
          "lastRunAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1CampaignCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms",
              "push"
            ]
          },
          "startDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "socialEventId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "goal": {
                "type": "string"
              },
              "targetAudienceSize": {
                "type": "number"
              }
            }
          }
        },
        "required": [
          "name"
        ]
      },
      "V1CampaignUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms",
              "push"
            ]
          },
          "startDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "socialEventId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "goal": {
                "type": "string"
              },
              "targetAudienceSize": {
                "type": "number"
              }
            }
          }
        }
      },
      "V1CampaignSchedule": {
        "type": "object",
        "properties": {
          "scheduledAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "scheduledAt"
        ]
      },
      "V1CampaignDuplicate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "scheduledAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "V1CampaignAudienceBulkCreate": {
        "type": "object",
        "properties": {
          "customerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1
          }
        },
        "required": [
          "customerIds"
        ]
      },
      "V1SocialPost": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "campaignId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "platform": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "mediaUrls": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "linkUrl": {
            "type": "string",
            "nullable": true
          },
          "scheduledFor": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "status": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "providerId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "campaignId",
          "platform",
          "content",
          "mediaUrls",
          "hashtags",
          "linkUrl",
          "scheduledFor",
          "status",
          "publishedAt",
          "providerId",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1SocialPostCreate": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1
          },
          "accountIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1
          },
          "mediaUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scheduledAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "publishNow": {
            "type": "boolean"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "hashtags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "body",
          "accountIds"
        ]
      },
      "V1SocialPostUpdate": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "minLength": 1
          },
          "accountIds": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "mediaUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scheduledAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "publishNow": {
            "type": "boolean"
          },
          "title": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "V1SocialPostsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1SocialPost"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1SocialPostResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1SocialPost"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignTestEmail": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "format": "email"
          },
          "subject": {
            "type": "string",
            "minLength": 1
          },
          "html": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "to",
          "subject",
          "html"
        ]
      },
      "V1CampaignTestSms": {
        "type": "object",
        "properties": {
          "to": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          },
          "mediaUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "to",
          "body"
        ]
      },
      "V1CampaignTestPush": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string"
          },
          "userId": {
            "type": "string",
            "minLength": 1
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "title",
          "body"
        ]
      },
      "V1CampaignsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1Campaign"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CampaignResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1Campaign"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignStep": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "campaignId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "nullable": true
          },
          "order": {
            "type": "integer"
          },
          "scheduledAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "templateId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "campaignId",
          "type",
          "name",
          "order",
          "scheduledAt",
          "templateId",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1CampaignStepCreate": {
        "type": "object",
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "email",
                  "sms",
                  "push",
                  "social"
                ]
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            }
          },
          "order": {
            "type": "integer"
          },
          "scheduledAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "templateId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        },
        "required": [
          "type",
          "content"
        ]
      },
      "V1CampaignStepUpdate": {
        "type": "object",
        "properties": {
          "type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "email",
                  "sms",
                  "push",
                  "social"
                ]
              },
              {
                "type": "string",
                "minLength": 1
              }
            ]
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            }
          },
          "order": {
            "type": "integer"
          },
          "scheduledAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "templateId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        }
      },
      "V1CampaignStepsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1CampaignStep"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CampaignStepResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1CampaignStep"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignAudience": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "campaignId": {
            "type": "string",
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "currentStepOrder": {
            "type": "integer",
            "nullable": true
          },
          "nextStepAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "joinedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "completedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "unsubscribedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "campaignId",
          "customerId",
          "status",
          "currentStepOrder",
          "nextStepAt",
          "joinedAt",
          "completedAt",
          "unsubscribedAt"
        ]
      },
      "V1CampaignAudienceCreate": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "customerId"
        ]
      },
      "V1CampaignAudiencesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1CampaignAudience"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CampaignAudienceResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1CampaignAudience"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignAudienceBulkResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "added": {
                "type": "integer"
              },
              "removed": {
                "type": "integer"
              },
              "audience": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/V1CampaignAudience"
                }
              }
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignPreview": {
        "type": "object",
        "properties": {
          "canPublish": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          },
          "recipientCount": {
            "type": "integer"
          },
          "stepCount": {
            "type": "integer"
          },
          "scheduledAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "channel": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "canPublish",
          "recipientCount",
          "stepCount",
          "scheduledAt"
        ]
      },
      "V1CampaignPreviewResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1CampaignPreview"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignActivityItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerName": {
            "type": "string",
            "nullable": true
          },
          "recipientAddress": {
            "type": "string",
            "nullable": true
          },
          "scheduledFor": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "sentAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "deliveredAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "openCount": {
            "type": "integer"
          },
          "clickCount": {
            "type": "integer"
          },
          "error": {
            "type": "string",
            "nullable": true
          },
          "stepId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "stepName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "channel",
          "status",
          "customerId",
          "customerName",
          "recipientAddress",
          "scheduledFor",
          "sentAt",
          "deliveredAt",
          "openCount",
          "clickCount",
          "error",
          "stepId",
          "stepName",
          "createdAt"
        ]
      },
      "V1CampaignActivityResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1CampaignActivityItem"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CampaignTestEmailResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "email": {
                "type": "string",
                "format": "email"
              }
            },
            "required": [
              "success",
              "email"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignTestSmsResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "to": {
                "type": "string"
              },
              "messageSid": {
                "type": "string"
              }
            },
            "required": [
              "success",
              "to"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CampaignTestPushResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "sent": {
                "type": "integer"
              }
            },
            "required": [
              "success",
              "sent"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1SocialAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "platform",
          "username",
          "name"
        ]
      },
      "V1SocialAccountsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "profileId": {
                "type": "string",
                "nullable": true
              },
              "accounts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/V1SocialAccount"
                }
              }
            },
            "required": [
              "profileId",
              "accounts"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CommunicationThread": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "channel": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "externalPhone": {
            "type": "string",
            "nullable": true
          },
          "assignedUserId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "lastMessageAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "lastMessagePreview": {
            "type": "string",
            "nullable": true
          },
          "unreadCount": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "channel",
          "customerId",
          "externalPhone",
          "assignedUserId",
          "status",
          "lastMessageAt",
          "lastMessagePreview",
          "unreadCount",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1CommunicationThreadCreate": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "sms",
              "email"
            ],
            "default": "sms"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "externalPhone": {
            "type": "string",
            "nullable": true
          },
          "assignedUserId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          }
        }
      },
      "V1CommunicationThreadUpdate": {
        "type": "object",
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "sms",
              "email"
            ],
            "default": "sms"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "externalPhone": {
            "type": "string",
            "nullable": true
          },
          "assignedUserId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          }
        }
      },
      "V1CommunicationThreadsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1CommunicationThread"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CommunicationThreadResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1CommunicationThread"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CommunicationMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "threadId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "channel": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "from": {
            "type": "string",
            "nullable": true
          },
          "to": {
            "type": "string",
            "nullable": true
          },
          "body": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "htmlBody": {
            "type": "string",
            "nullable": true
          },
          "textBody": {
            "type": "string",
            "nullable": true
          },
          "mediaUrls": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "providerMessageSid": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "threadId",
          "customerId",
          "channel",
          "direction",
          "from",
          "to",
          "body",
          "subject",
          "htmlBody",
          "textBody",
          "mediaUrls",
          "status",
          "provider",
          "providerMessageSid",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1CommunicationMessageCreate": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string"
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "htmlBody": {
            "type": "string",
            "nullable": true
          },
          "textBody": {
            "type": "string",
            "nullable": true
          },
          "mediaUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "send": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "V1CommunicationMessageUpdate": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "nullable": true
          },
          "subject": {
            "type": "string",
            "nullable": true
          },
          "htmlBody": {
            "type": "string",
            "nullable": true
          },
          "textBody": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          }
        }
      },
      "V1CommunicationMessagesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1CommunicationMessage"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1CommunicationMessageResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1CommunicationMessage"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1Appointment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "appointmentTypeId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "optionId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "pending_approval",
              "accepted",
              "declined",
              "checked_in",
              "in_progress",
              "completed",
              "cancelled",
              "no_show"
            ]
          },
          "carId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "secondaryCarId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "startAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "recurrenceFrequency": {
            "type": "string",
            "nullable": true,
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "quarterly",
              "yearly",
              null
            ]
          },
          "recurrenceInterval": {
            "type": "integer",
            "nullable": true
          },
          "recurrenceDaysOfWeek": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "integer"
            }
          },
          "recurrenceDayOfMonth": {
            "type": "integer",
            "nullable": true
          },
          "recurrenceEndDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "recurrenceCount": {
            "type": "integer",
            "nullable": true
          },
          "recurrenceSeriesId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "locationId",
          "appointmentTypeId",
          "optionId",
          "status",
          "carId",
          "secondaryCarId",
          "customerId",
          "startAt",
          "endAt",
          "title",
          "notes",
          "recurrenceFrequency",
          "recurrenceInterval",
          "recurrenceDaysOfWeek",
          "recurrenceDayOfMonth",
          "recurrenceEndDate",
          "recurrenceCount",
          "recurrenceSeriesId",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1AppointmentCreate": {
        "type": "object",
        "properties": {
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "pending_approval",
              "accepted",
              "declined",
              "checked_in",
              "in_progress",
              "completed",
              "cancelled",
              "no_show"
            ]
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "appointmentTypeId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "optionId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "carId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "secondaryCarId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "recurrenceFrequency": {
            "type": "string",
            "nullable": true,
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "quarterly",
              "yearly",
              null
            ]
          },
          "recurrenceInterval": {
            "type": "integer",
            "nullable": true,
            "minimum": 1
          },
          "recurrenceDaysOfWeek": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "recurrenceDayOfMonth": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 31
          },
          "recurrenceEndDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "recurrenceCount": {
            "type": "integer",
            "nullable": true,
            "minimum": 1
          },
          "recurrenceSeriesId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "eventTypeId": {
            "type": "string",
            "format": "uuid",
            "description": "Event type id from GET /event-types. Alternative to appointmentTypeId."
          },
          "eventType": {
            "type": "string",
            "minLength": 1,
            "description": "Event type `value` (e.g. `vehicle_pick_up`). Alternative to eventTypeId."
          }
        },
        "required": [
          "startAt",
          "endAt"
        ]
      },
      "V1AppointmentUpdate": {
        "type": "object",
        "properties": {
          "startAt": {
            "type": "string",
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "format": "date-time"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "pending_approval",
              "accepted",
              "declined",
              "checked_in",
              "in_progress",
              "completed",
              "cancelled",
              "no_show"
            ]
          },
          "locationId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "appointmentTypeId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "optionId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "carId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "secondaryCarId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "recurrenceFrequency": {
            "type": "string",
            "nullable": true,
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "quarterly",
              "yearly",
              null
            ]
          },
          "recurrenceInterval": {
            "type": "integer",
            "nullable": true,
            "minimum": 1
          },
          "recurrenceDaysOfWeek": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "recurrenceDayOfMonth": {
            "type": "integer",
            "nullable": true,
            "minimum": 1,
            "maximum": 31
          },
          "recurrenceEndDate": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "recurrenceCount": {
            "type": "integer",
            "nullable": true,
            "minimum": 1
          },
          "recurrenceSeriesId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        }
      },
      "V1AppointmentsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1Appointment"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1AppointmentResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1Appointment"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1Form": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "visibility": {
            "type": "string"
          },
          "inviteCode": {
            "type": "string",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "nullable": true
              }
            }
          },
          "settings": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            }
          },
          "themePrimaryColor": {
            "type": "string",
            "nullable": true
          },
          "themeBackgroundColor": {
            "type": "string",
            "nullable": true
          },
          "successMessage": {
            "type": "string",
            "nullable": true
          },
          "closeAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "maxResponses": {
            "type": "integer",
            "nullable": true
          },
          "responseCount": {
            "type": "integer"
          },
          "requireEmail": {
            "type": "boolean"
          },
          "requireName": {
            "type": "boolean"
          },
          "requirePhone": {
            "type": "boolean"
          },
          "allowMultipleSubmissions": {
            "type": "boolean"
          },
          "publishedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "name",
          "slug",
          "description",
          "status",
          "visibility",
          "inviteCode",
          "fields",
          "settings",
          "themePrimaryColor",
          "themeBackgroundColor",
          "successMessage",
          "closeAt",
          "maxResponses",
          "responseCount",
          "requireEmail",
          "requireName",
          "requirePhone",
          "allowMultipleSubmissions",
          "publishedAt",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1FormCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "purpose": {
            "type": "string",
            "enum": [
              "default",
              "event_questionnaire"
            ]
          }
        },
        "required": [
          "name"
        ]
      },
      "V1FormUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "slug": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "published",
              "closed"
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "invite_only",
              "customers_only"
            ]
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "nullable": true
              }
            }
          },
          "settings": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            }
          },
          "themePrimaryColor": {
            "type": "string",
            "nullable": true
          },
          "themeBackgroundColor": {
            "type": "string",
            "nullable": true
          },
          "successMessage": {
            "type": "string",
            "nullable": true
          },
          "closeAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "maxResponses": {
            "type": "integer",
            "nullable": true
          },
          "requireEmail": {
            "type": "boolean"
          },
          "requireName": {
            "type": "boolean"
          },
          "requirePhone": {
            "type": "boolean"
          },
          "allowMultipleSubmissions": {
            "type": "boolean"
          },
          "regenerateInviteCode": {
            "type": "boolean"
          }
        }
      },
      "V1FormSubmission": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "formId": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "respondentEmail": {
            "type": "string",
            "nullable": true
          },
          "respondentName": {
            "type": "string",
            "nullable": true
          },
          "respondentPhone": {
            "type": "string",
            "nullable": true
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            }
          },
          "fieldSnapshot": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {
                "nullable": true
              }
            }
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "nullable": true
            }
          },
          "submittedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "formId",
          "teamId",
          "customerId",
          "respondentEmail",
          "respondentName",
          "respondentPhone",
          "values",
          "fieldSnapshot",
          "metadata",
          "submittedAt"
        ]
      },
      "V1FormSubmissionPatch": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        },
        "required": [
          "customerId"
        ]
      },
      "V1FormsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1Form"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1FormResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1Form"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1FormSubmissionsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1FormSubmission"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1FormSubmissionResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1FormSubmission"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1SocialEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "startTime": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "maxAttendees": {
            "type": "integer",
            "nullable": true
          },
          "enableWaitlist": {
            "type": "boolean"
          },
          "allowMultiOptionRsvp": {
            "type": "boolean"
          },
          "allowRsvpNotes": {
            "type": "boolean"
          },
          "rsvpEnabled": {
            "type": "boolean"
          },
          "ticketsEnabled": {
            "type": "boolean"
          },
          "cost": {
            "type": "integer",
            "nullable": true
          },
          "photoUrl": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "type": "string"
          },
          "inviteAccessMode": {
            "type": "string"
          },
          "isPublished": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "questionnaireFormId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "name",
          "description",
          "location",
          "startTime",
          "endTime",
          "maxAttendees",
          "enableWaitlist",
          "allowMultiOptionRsvp",
          "allowRsvpNotes",
          "rsvpEnabled",
          "ticketsEnabled",
          "cost",
          "photoUrl",
          "visibility",
          "inviteAccessMode",
          "isPublished",
          "status",
          "questionnaireFormId",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1SocialEventCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "maxAttendees": {
            "type": "integer",
            "nullable": true
          },
          "enableWaitlist": {
            "type": "boolean"
          },
          "allowMultiOptionRsvp": {
            "type": "boolean"
          },
          "allowRsvpNotes": {
            "type": "boolean"
          },
          "rsvpEnabled": {
            "type": "boolean"
          },
          "ticketsEnabled": {
            "type": "boolean"
          },
          "cost": {
            "type": "integer"
          },
          "photoUrl": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "customers_only",
              "invite_only"
            ]
          },
          "inviteAccessMode": {
            "type": "string",
            "enum": [
              "link",
              "customer_list"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "questionnaireFormId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "questionnaireTiming": {
            "type": "string",
            "enum": [
              "none",
              "during_rsvp",
              "after_rsvp"
            ]
          },
          "questionnaireRequired": {
            "type": "boolean"
          }
        },
        "required": [
          "name",
          "startTime"
        ]
      },
      "V1SocialEventUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "maxAttendees": {
            "type": "integer",
            "nullable": true
          },
          "enableWaitlist": {
            "type": "boolean"
          },
          "allowMultiOptionRsvp": {
            "type": "boolean"
          },
          "allowRsvpNotes": {
            "type": "boolean"
          },
          "rsvpEnabled": {
            "type": "boolean"
          },
          "ticketsEnabled": {
            "type": "boolean"
          },
          "cost": {
            "type": "integer"
          },
          "photoUrl": {
            "type": "string",
            "nullable": true
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "customers_only",
              "invite_only"
            ]
          },
          "inviteAccessMode": {
            "type": "string",
            "enum": [
              "link",
              "customer_list"
            ]
          },
          "isPublished": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "questionnaireFormId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "questionnaireTiming": {
            "type": "string",
            "enum": [
              "none",
              "during_rsvp",
              "after_rsvp"
            ]
          },
          "questionnaireRequired": {
            "type": "boolean"
          }
        }
      },
      "V1SocialEventRsvpOption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "socialEventId": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": "string"
          },
          "amount": {
            "type": "integer"
          },
          "isPublic": {
            "type": "boolean"
          },
          "maxAttendees": {
            "type": "integer",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "socialEventId",
          "label",
          "amount",
          "isPublic",
          "maxAttendees",
          "sortOrder",
          "isActive",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1SocialEventRsvpOptionsPut": {
        "type": "object",
        "properties": {
          "options": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "amount": {
                  "type": "integer",
                  "minimum": 0,
                  "default": 0
                },
                "isPublic": {
                  "type": "boolean"
                },
                "maxAttendees": {
                  "type": "integer",
                  "nullable": true
                },
                "sortOrder": {
                  "type": "integer"
                },
                "isActive": {
                  "type": "boolean"
                }
              },
              "required": [
                "label"
              ]
            }
          }
        },
        "required": [
          "options"
        ]
      },
      "V1SocialEventInvitesCreate": {
        "type": "object",
        "properties": {
          "customerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1
          }
        },
        "required": [
          "customerIds"
        ]
      },
      "V1SocialEventRsvp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "socialEventId": {
            "type": "string",
            "format": "uuid"
          },
          "customerId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "rsvpOptionId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "socialEventId",
          "customerId",
          "rsvpOptionId",
          "status",
          "notes",
          "createdAt"
        ]
      },
      "V1SocialEventOptionAudiencePut": {
        "type": "object",
        "properties": {
          "tagIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "customerIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "V1SocialEventsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1SocialEvent"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1SocialEventResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1SocialEvent"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1SocialEventRsvpOptionsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1SocialEventRsvpOption"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1SocialEventRsvpOptionsItemResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1SocialEventRsvpOption"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "V1SocialEventRsvpsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1SocialEventRsvp"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1SocialEventInvite": {
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "format": "uuid"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "customerId",
          "createdAt"
        ]
      },
      "V1SocialEventInvitesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1SocialEventInvite"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1SocialEventInvitesCreateResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "added": {
                "type": "integer"
              }
            },
            "required": [
              "added"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1SocialEventOptionAudienceResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "success"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1DeletedOk": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "deleted": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "id",
              "deleted"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1InviteDeletedOk": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "customerId": {
                "type": "string",
                "format": "uuid"
              },
              "deleted": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "customerId",
              "deleted"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1MarketingAssetsLinkPhotosResult": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "added": {
                "type": "integer"
              },
              "skipped": {
                "type": "integer"
              }
            },
            "required": [
              "added",
              "skipped"
            ]
          }
        },
        "required": [
          "data"
        ]
      },
      "V1AssetFolder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "parentId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "parentId",
          "name",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1AssetFolderCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "parentId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        },
        "required": [
          "name"
        ]
      },
      "V1AssetFolderUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "parentId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        }
      },
      "V1MarketingAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "teamId": {
            "type": "string"
          },
          "folderId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "mediaId": {
            "type": "string",
            "format": "uuid"
          },
          "sourcePhotoId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "proxyUrl": {
            "type": "string",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "size": {
            "type": "integer",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "teamId",
          "folderId",
          "mediaId",
          "sourcePhotoId",
          "name",
          "description",
          "proxyUrl",
          "contentType",
          "size",
          "createdAt",
          "updatedAt"
        ]
      },
      "V1MarketingAssetCreate": {
        "type": "object",
        "properties": {
          "mediaProxyUrl": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "folderId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "mediaProxyUrl",
          "name"
        ]
      },
      "V1MarketingAssetUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "folderId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        }
      },
      "V1MarketingAssetsLinkPhotos": {
        "type": "object",
        "properties": {
          "photoIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1
          },
          "folderId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          }
        },
        "required": [
          "photoIds"
        ]
      },
      "V1AssetFoldersResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1AssetFolder"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1AssetFolderResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1AssetFolder"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1MarketingAssetsResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1MarketingAsset"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      },
      "V1MarketingAssetResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1MarketingAsset"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CalendarItem": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "campaign",
              "social_event",
              "social_post"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "startAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "endAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "channel": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "kind",
          "id",
          "title",
          "startAt",
          "endAt",
          "status",
          "channel"
        ]
      },
      "V1CalendarResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1CalendarItem"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "V1EventTypeConfig": {
        "type": "object",
        "properties": {
          "hasChecklist": {
            "type": "boolean"
          },
          "hasPhotoRules": {
            "type": "boolean"
          },
          "requiresSignature": {
            "type": "boolean"
          },
          "odometerRequired": {
            "type": "boolean"
          },
          "fuelLevelRequired": {
            "type": "boolean"
          },
          "requiresParkingSpot": {
            "type": "boolean"
          },
          "removesParkingSpotOnComplete": {
            "type": "boolean"
          },
          "hasVinScanning": {
            "type": "boolean"
          },
          "allowCreateCarOnVin": {
            "type": "boolean"
          },
          "isTransportWorkflow": {
            "type": "boolean"
          },
          "allowsCustomerScheduling": {
            "type": "boolean"
          }
        },
        "required": [
          "hasChecklist",
          "hasPhotoRules",
          "requiresSignature",
          "odometerRequired",
          "fuelLevelRequired",
          "requiresParkingSpot",
          "removesParkingSpotOnComplete",
          "hasVinScanning",
          "allowCreateCarOnVin",
          "isTransportWorkflow",
          "allowsCustomerScheduling"
        ]
      },
      "V1EventType": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "scope": {
            "type": "string",
            "enum": [
              "vehicle",
              "customer",
              "facility"
            ]
          },
          "vehicleRequired": {
            "type": "boolean"
          },
          "config": {
            "$ref": "#/components/schemas/V1EventTypeConfig"
          }
        },
        "required": [
          "id",
          "name",
          "value",
          "description",
          "scope",
          "vehicleRequired",
          "config"
        ]
      },
      "V1EventTypesResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1EventType"
            }
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CarEventCreate": {
        "type": "object",
        "properties": {
          "eventTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "activityType": {
            "type": "string",
            "minLength": 1
          },
          "parkingSpotId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "parkingZoneId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "uploaded",
              "completed"
            ]
          }
        }
      },
      "V1CarEvent": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "appointmentId": {
            "type": "string",
            "nullable": true,
            "format": "uuid"
          },
          "eventTypeName": {
            "type": "string"
          },
          "activityType": {
            "type": "string",
            "nullable": true
          },
          "carLabel": {
            "type": "string",
            "nullable": true
          },
          "spotName": {
            "type": "string",
            "nullable": true
          },
          "zoneName": {
            "type": "string",
            "nullable": true
          },
          "navigationUrl": {
            "type": "string"
          }
        },
        "required": [
          "sessionId",
          "appointmentId",
          "eventTypeName",
          "activityType",
          "navigationUrl"
        ]
      },
      "V1CarEventResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1CarEvent"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CarPhotoCreate": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "contentType": {
            "type": "string",
            "minLength": 1
          },
          "dataBase64": {
            "type": "string",
            "minLength": 1
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri"
          },
          "photoRuleLocation": {
            "type": "string",
            "nullable": true
          },
          "photoRuleNotes": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "filename",
          "contentType"
        ]
      },
      "V1CarPhoto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sessionId": {
            "type": "string",
            "format": "uuid"
          },
          "blobUrl": {
            "type": "string"
          },
          "filename": {
            "type": "string",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "size": {
            "type": "integer",
            "nullable": true
          },
          "photoRuleLocation": {
            "type": "string",
            "nullable": true
          },
          "photoRuleNotes": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true,
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "sessionId",
          "blobUrl",
          "filename",
          "contentType",
          "size",
          "photoRuleLocation",
          "photoRuleNotes",
          "createdAt"
        ]
      },
      "V1CarPhotoResponse": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/V1CarPhoto"
          }
        },
        "required": [
          "data"
        ]
      },
      "V1CarPhotosResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/V1CarPhoto"
            }
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "total": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "data",
          "page",
          "limit",
          "total"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/api/v1/cars": {
      "get": {
        "summary": "List cars",
        "description": "Requires `read:cars`. List cars. For facility intake (drop-off + photos), use `GET /event-types`, then `POST /cars/{id}/events`, then `POST /cars/{id}/photos` — not marketing assets or appointments alone.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "cars returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CarsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create car",
        "description": "Requires `write:cars`. Create a car record.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CarCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cars/{id}": {
      "get": {
        "summary": "Get car",
        "description": "Requires `read:cars`.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update car",
        "description": "Requires `write:cars`.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CarUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete car",
        "description": "Requires `write:cars`.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/event-types": {
      "get": {
        "summary": "List event types",
        "description": "Requires `read:cars` or `read:appointments`. List active facility event types (Vehicle Drop Off, Pickup, Interior Cleaning, etc.) — the reusable events your team does now or schedules for later. Do one now with `POST /cars/{id}/events` (`eventTypeId` or `activityType`), or schedule it with `POST /appointments` (`eventTypeId` or `eventType`). Check `config.requiresParkingSpot` before drop-off — agents must resolve a spot/zone via parking endpoints first.",
        "tags": [
          "Event types"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "vehicle",
                "customer",
                "facility"
              ]
            },
            "required": false,
            "name": "scope",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Event types.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1EventTypesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cars/{id}/events": {
      "post": {
        "summary": "Create car event (drop-off / intake)",
        "description": "Requires `write:cars`. Creating a facility photo-session event (not a calendar-only appointment). Pass `activityType` (e.g. `vehicle_drop_off`) or `eventTypeId`. For drop-off, provide exactly one of `parkingSpotId` or `parkingZoneId` — the caller must also hold the write:parking scope when assigning parking. Optional `occurredAt` backdates the event. Default status is `uploaded` so photos can still be attached via `POST /cars/{id}/photos`.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CarEventCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Event created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CarEventResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/cars/{id}/photos": {
      "get": {
        "summary": "List car photos",
        "description": "Requires `read:cars`. List photos attached to the car's event sessions (facility gallery), newest first. Optional `sessionId` filter.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "sessionId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Photos.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CarPhotosResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upload car photo",
        "description": "Requires `write:cars`. Attach one image to a car event session (JSON body — MCP-compatible). Provide `dataBase64` or `sourceUrl` (SSRF-guarded), plus `filename` and `contentType`. Prefer `sessionId` from create-event; if omitted, an open session is reused or a documentation session is created. Max ~3MB decoded per request; loop for multiple chat images. Do not use marketing asset upload for car gallery photos.",
        "tags": [
          "Cars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CarPhotoCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Photo attached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CarPhotoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers": {
      "get": {
        "summary": "List customers",
        "description": "Requires `read:customers`.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "includeDeleted",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "customers returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CustomersResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create customer",
        "description": "Requires `write:customers`.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CustomerCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CustomerResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/customers/{id}": {
      "get": {
        "summary": "Get customer",
        "description": "Requires `read:customers`.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CustomerResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update customer",
        "description": "Requires `write:customers`.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CustomerUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CustomerResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete customer",
        "description": "Requires `write:customers`. Soft-deletes the customer (`deletedAt`). Restore with PATCH `{ \"restore\": true }` or `{ \"deletedAt\": null }`.",
        "tags": [
          "Customers"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts": {
      "get": {
        "summary": "List contacts",
        "description": "Requires `read:contacts`.",
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "customerId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "contacts returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ContactsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create contact",
        "description": "Requires `write:contacts`.",
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ContactCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ContactResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/contacts/{id}": {
      "get": {
        "summary": "Get contact",
        "description": "Requires `read:contacts`.",
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ContactResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update contact",
        "description": "Requires `write:contacts`.",
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ContactUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ContactResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete contact",
        "description": "Requires `write:contacts`. Hard-deletes the record after team ownership checks.",
        "tags": [
          "Contacts"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/locations": {
      "get": {
        "summary": "List locations",
        "description": "Requires `read:locations`.",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "includeInactive",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "locations returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1LocationsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create location",
        "description": "Requires `write:locations`.",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1LocationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1LocationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/locations/{id}": {
      "get": {
        "summary": "Get location",
        "description": "Requires `read:locations`.",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1LocationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update location",
        "description": "Requires `write:locations`.",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1LocationUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1LocationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete location",
        "description": "Requires `write:locations`. Soft-deactivates by default (`isActive: false`). Pass `hard=true` to hard-delete.",
        "tags": [
          "Locations"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "hard",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/parking-zones": {
      "get": {
        "summary": "List parking zones",
        "description": "Requires `read:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "parking zones returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingZonesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create parking zone",
        "description": "Requires `write:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ParkingZoneCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingZoneResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/parking-zones/{id}": {
      "get": {
        "summary": "Get parking zone",
        "description": "Requires `read:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingZoneResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update parking zone",
        "description": "Requires `write:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ParkingZoneUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingZoneResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete parking zone",
        "description": "Requires `write:parking`. Soft-deactivates by default (`isActive: false`). Pass `hard=true` to hard-delete.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "hard",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/parking-spots": {
      "get": {
        "summary": "List parking spots",
        "description": "Requires `read:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "parking spots returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingSpotsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create parking spot",
        "description": "Requires `write:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ParkingSpotCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingSpotResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/parking-spots/{id}": {
      "get": {
        "summary": "Get parking spot",
        "description": "Requires `read:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingSpotResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update parking spot",
        "description": "Requires `write:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ParkingSpotUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingSpotResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete parking spot",
        "description": "Requires `write:parking`. Soft-deactivates by default (`isActive: false`). Pass `hard=true` to hard-delete.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "hard",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/parking-assignments": {
      "get": {
        "summary": "List parking assignments",
        "description": "Requires `read:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "carId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "parkingSpotId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "parking assignments returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingAssignmentsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create parking assignment",
        "description": "Requires `write:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ParkingAssignmentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingAssignmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/parking-assignments/{id}": {
      "get": {
        "summary": "Get parking assignment",
        "description": "Requires `read:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingAssignmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update parking assignment",
        "description": "Requires `write:parking`.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ParkingAssignmentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ParkingAssignmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete parking assignment",
        "description": "Requires `write:parking`. Hard-deletes the record after team ownership checks.",
        "tags": [
          "Parking"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/templates": {
      "get": {
        "summary": "List marketing templates",
        "description": "Requires `read:templates`. Team-wide reusable email template library (not per-campaign content).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "marketing templates returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingTemplatesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create marketing template",
        "description": "Requires `write:templates`. Create a library template (`name`, `subject`, `body`, optional `designJson` / `isDefault`).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1MarketingTemplateCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingTemplateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/templates/{id}": {
      "get": {
        "summary": "Get marketing template",
        "description": "Requires `read:templates`. Includes `designJson` when present.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingTemplateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update marketing template",
        "description": "Requires `write:templates`. Patch library template fields.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1MarketingTemplateUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingTemplateResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete marketing template",
        "description": "Requires `write:templates`. Permanently deletes the library template.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns": {
      "get": {
        "summary": "List campaigns",
        "description": "Requires `read:campaigns`. Filter with `status`, `channel`, `ids`, `updatedAfter`, `page`, `limit`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "channel",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "campaigns returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create campaign",
        "description": "Requires `write:campaigns`. Creates a **draft** email/sms/push campaign only. Use `/content`, `/audience`, then `/schedule` or `/send` to go live. Social posts use `/marketing/social-posts`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}": {
      "get": {
        "summary": "Get campaign",
        "description": "Requires `read:campaigns`. Campaign detail plus a `stats` summary (sent/failed/queued counts).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update campaign",
        "description": "Requires `write:campaigns`. Updates draft fields only. Rejects lifecycle statuses (`active`/`scheduled`/`paused`) — use `/schedule`, `/send`, `/cancel`, `/pause`, `/resume`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete campaign",
        "description": "Requires `write:campaigns`. Cancels pending provider messages, then hard-deletes the campaign (and cascaded steps/audience).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/content": {
      "get": {
        "summary": "List campaign content steps",
        "description": "Requires `read:campaigns`. Ordered campaign steps (email/sms/push body). Single-channel wizards usually have one step.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List campaign content steps",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignStepsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create campaign content step",
        "description": "Requires `write:campaigns`. Body: `type`, channel `content`, optional `templateId` (copies/links a library template), `order`, `scheduledAt`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignStepCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Create campaign content step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignStepResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/content/{stepId}": {
      "get": {
        "summary": "Get campaign content step",
        "description": "Requires `read:campaigns`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "stepId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Get campaign content step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignStepResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update campaign content step",
        "description": "Requires `write:campaigns`. Patch step type/content/order/schedule/templateId.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "stepId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignStepUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Update campaign content step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignStepResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete campaign content step",
        "description": "Requires `write:campaigns`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "stepId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Delete campaign content step",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/audience": {
      "get": {
        "summary": "List campaign audience",
        "description": "Requires `read:campaigns`. Enrolled customers for the campaign.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "List campaign audience",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignAudiencesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add campaign audience members",
        "description": "Requires `write:campaigns`. Body `{ customerIds }`. On an active campaign, only newly added members are scheduled.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignAudienceBulkCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Add campaign audience members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignAudienceBulkResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/audience/{audienceId}": {
      "delete": {
        "summary": "Remove campaign audience member",
        "description": "Requires `write:campaigns`. Removes one enrollment by audience row id.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "audienceId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Remove campaign audience member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/audience/remove": {
      "post": {
        "summary": "Bulk remove audience members",
        "description": "Requires `write:campaigns`. Body `{ customerIds }` — bulk unenroll (matches UI bulk remove).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignAudienceBulkCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bulk remove audience members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignAudienceBulkResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/schedule": {
      "post": {
        "summary": "Schedule campaign send",
        "description": "Requires `write:campaigns`. Body `{ scheduledAt }` (~30m lead time). Validates readiness then publishes as scheduled. Do not PATCH status.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignSchedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Schedule campaign send",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/send": {
      "post": {
        "summary": "Send campaign now",
        "description": "Requires `write:campaigns`. Publishes immediately (SendGrid/Twilio/push). Validates content + audience first.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Send campaign now",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/cancel": {
      "post": {
        "summary": "Cancel scheduled campaign",
        "description": "Requires `write:campaigns`. Cancels a queued send (≥15 minutes before send when enforced).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Cancel scheduled campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/pause": {
      "post": {
        "summary": "Pause campaign",
        "description": "Requires `write:campaigns`. Pauses an active campaign and cancels scheduled provider messages.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Pause campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/resume": {
      "post": {
        "summary": "Resume campaign",
        "description": "Requires `write:campaigns`. Resumes a paused campaign after readiness checks.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Resume campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/duplicate": {
      "post": {
        "summary": "Duplicate campaign",
        "description": "Requires `write:campaigns`. Clones campaign + steps into a new draft (no audience, no send).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "201": {
            "description": "Duplicate campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/preview": {
      "get": {
        "summary": "Preview campaign readiness",
        "description": "Requires `read:campaigns`. Publish readiness without sending — audience size, validation errors, step count.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Preview campaign readiness",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignPreviewResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/{id}/activity": {
      "get": {
        "summary": "Campaign activity",
        "description": "Requires `read:campaigns`. Paginated delivery activity (status/channel filters). No provider ids or full message bodies.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "channel",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Campaign activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignActivityResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-posts": {
      "get": {
        "summary": "List social posts",
        "description": "Requires `read:campaigns`. Late-backed Instagram/Facebook/etc posts stored for the team.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "social posts returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialPostsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create social post",
        "description": "Requires `write:campaigns`. Body: `body`, `accountIds`, optional `mediaUrls`, `scheduledAt`, `publishNow`. Creates/schedules via Late (not an email/sms/push campaign).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1SocialPostCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialPostResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-posts/{id}": {
      "get": {
        "summary": "Get social post",
        "description": "Requires `read:campaigns`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialPostResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update social post",
        "description": "Requires `write:campaigns`. Update draft content or reschedule via Late.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1SocialPostUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialPostResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete social post",
        "description": "Requires `write:campaigns`. Deletes the Late post and local row.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-accounts": {
      "get": {
        "summary": "List connected social accounts",
        "description": "Requires `read:campaigns`. Connected Late accounts for the team (`id`, `platform`, `username`) — use account ids when creating social posts.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Accounts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialAccountsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/test/email": {
      "post": {
        "summary": "Send test email",
        "description": "Requires `write:campaigns`. One-off test email (`to`, `subject`, `html`). Does not publish a campaign. `to` must be a team member or customer email for this facility.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignTestEmail"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignTestEmailResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/test/sms": {
      "post": {
        "summary": "Send test SMS",
        "description": "Requires `write:campaigns`. One-off test SMS (`to`, `body`, optional `mediaUrls` as team `/api/media/{uuid}` paths only). Does not publish a campaign. `to` must be a team member or customer phone for this facility.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignTestSms"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignTestSmsResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/campaigns/test/push": {
      "post": {
        "summary": "Send test push notification",
        "description": "Requires `write:campaigns`. One-off test push (`title`, `body`, optional `url`). Provide `customerId` (portal-linked) or `userId`. Does not publish a campaign.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CampaignTestPush"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CampaignTestPushResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/forms": {
      "get": {
        "summary": "List forms",
        "description": "Requires `read:forms`. Staff form definitions. Public submit stays on `/api/forms/...` (not this surface).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "forms returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1FormsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create form",
        "description": "Requires `write:forms`. Create a staff-managed form definition.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1FormCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1FormResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/forms/{id}": {
      "get": {
        "summary": "Get form",
        "description": "Requires `read:forms`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1FormResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update form",
        "description": "Requires `write:forms`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1FormUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1FormResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete form",
        "description": "Requires `write:forms`. Deletes the form definition (submissions may cascade).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/forms/{id}/submissions": {
      "get": {
        "summary": "List form submissions",
        "description": "Requires `read:forms`. Paginated submissions for a form.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Submissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1FormSubmissionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/forms/{id}/submissions/{submissionId}": {
      "get": {
        "summary": "Get form submission",
        "description": "Requires `read:forms`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "submissionId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Submission.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1FormSubmissionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Link or unlink submission customer",
        "description": "Requires `write:forms`. Body `{ customerId }` only — link or unlink a customer on the submission (`null` to unlink).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "submissionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1FormSubmissionPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1FormSubmissionResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events": {
      "get": {
        "summary": "List social events",
        "description": "Requires `read:social-events`. Staff RSVP events. Filter with `status`, `upcomingOnly`, pagination.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false,
            "name": "upcomingOnly",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "social events returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create social event",
        "description": "Requires `write:social-events`. Create a staff social event (RSVP party). Public RSVP/checkout stay on public routes.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1SocialEventCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events/{id}": {
      "get": {
        "summary": "Get social event",
        "description": "Requires `read:social-events`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update social event",
        "description": "Requires `write:social-events`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1SocialEventUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete social event",
        "description": "Requires `write:social-events`. Deletes the event and related staff data.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events/{id}/duplicate": {
      "post": {
        "summary": "Duplicate social event",
        "description": "Requires `write:social-events`. Clones the event (and options where applicable) into a new draft.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "201": {
            "description": "Duplicated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events/{id}/rsvp-options": {
      "get": {
        "summary": "List RSVP options",
        "description": "Requires `read:social-events`. Ticket/RSVP options for the event (includes inactive).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventRsvpOptionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Replace RSVP options",
        "description": "Requires `write:social-events`. Body `{ options: [...] }` replaces/sets RSVP options (mirrors setSocialEventRsvpOptions).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1SocialEventRsvpOptionsPut"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventRsvpOptionsItemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events/{id}/invites": {
      "get": {
        "summary": "List event invites",
        "description": "Requires `read:social-events`. Allowed customers for invite-only events.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Invites.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventInvitesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Add event invites",
        "description": "Requires `write:social-events`. Body `{ customerIds }` adds allowed invitees.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1SocialEventInvitesCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventInvitesCreateResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events/{id}/invites/{customerId}": {
      "delete": {
        "summary": "Remove event invite",
        "description": "Requires `write:social-events`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "customerId",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1InviteDeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events/{id}/rsvps": {
      "get": {
        "summary": "List event RSVPs",
        "description": "Requires `read:social-events`. Read-only RSVP roster (no attendee-facing mutate from API keys).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "RSVPs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventRsvpsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/social-events/{id}/rsvp-options/{optionId}/audience": {
      "put": {
        "summary": "Set RSVP option audience",
        "description": "Requires `write:social-events`. Body optional `tagIds` / `customerIds` — replaces allowed tags/customers for that option.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "optionId",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1SocialEventOptionAudiencePut"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1SocialEventOptionAudienceResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/asset-folders": {
      "get": {
        "summary": "List asset folders",
        "description": "Requires `read:marketing-assets`. Browse folders (optional parent filter via query when supported).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "asset folders returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AssetFoldersResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create asset folder",
        "description": "Requires `write:marketing-assets`. Body `{ name, parentId? }`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1AssetFolderCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AssetFolderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/asset-folders/{id}": {
      "get": {
        "summary": "Get asset folder",
        "description": "Requires `read:marketing-assets`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AssetFolderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update asset folder",
        "description": "Requires `write:marketing-assets`. Rename or move (`parentId`).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1AssetFolderUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AssetFolderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete asset folder",
        "description": "Requires `write:marketing-assets`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/assets": {
      "get": {
        "summary": "List marketing assets",
        "description": "Requires `read:marketing-assets`. List assets (folder/search filters when supported).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "marketing assets returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingAssetsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create marketing asset",
        "description": "Requires `write:marketing-assets`. Create from an existing media proxy URL (`mediaProxyUrl`, `name`, optional `folderId`).",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1MarketingAssetCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingAssetResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/assets/{id}": {
      "get": {
        "summary": "Get marketing asset",
        "description": "Requires `read:marketing-assets`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingAssetResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update marketing asset",
        "description": "Requires `write:marketing-assets`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1MarketingAssetUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingAssetResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete marketing asset",
        "description": "Requires `write:marketing-assets`.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/assets/upload": {
      "post": {
        "summary": "Upload marketing asset",
        "description": "Requires `write:marketing-assets`. Multipart form with `file` (optional `folderId`, `name`, `description`). Stores blob + media + asset row.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Uploaded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingAssetResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/assets/link-photos": {
      "post": {
        "summary": "Link platform photos as assets",
        "description": "Requires `write:marketing-assets`. Body `{ photoIds, folderId? }` links existing platform photos into the asset library.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1MarketingAssetsLinkPhotos"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Linked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MarketingAssetsLinkPhotosResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/marketing/calendar": {
      "get": {
        "summary": "Marketing calendar aggregate",
        "description": "Requires `read:campaigns` or `read:social-events`. Query `from`/`to` (ISO). Returns typed items `{ kind: campaign|social_event|social_post, ... }` for the date range. Either read scope is enough; each kind is included only when that scope is present.",
        "tags": [
          "Marketing"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": true,
            "name": "from",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": true,
            "name": "to",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Calendar items.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CalendarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/communication-threads": {
      "get": {
        "summary": "List communication threads",
        "description": "Requires `read:communications`.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "communication threads returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationThreadsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create communication thread",
        "description": "Requires `write:communications`. `externalPhone` (or `customerId`) must match a facility customer contact — arbitrary phone/email addresses are rejected.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CommunicationThreadCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationThreadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/communication-threads/{id}": {
      "get": {
        "summary": "Get communication thread",
        "description": "Requires `read:communications`.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationThreadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update communication thread",
        "description": "Requires `write:communications`. Changing recipient fields re-validates against team customers.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CommunicationThreadUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationThreadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete communication thread",
        "description": "Requires `write:communications`. Hard-deletes the record after team ownership checks.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/communication-threads/{id}/messages": {
      "get": {
        "summary": "List thread messages",
        "description": "Requires `read:communications`.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Messages returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationMessagesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create (and optionally send) outbound message",
        "description": "Requires `write:communications`. Defaults to draft (`send: false`). Pass `send: true` to deliver via Twilio/SendGrid. `mediaUrls` must be https:// or team-owned `/api/media/{uuid}` paths.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CommunicationMessageCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationMessageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/communication-messages/{id}": {
      "get": {
        "summary": "Get message",
        "description": "Requires `read:communications`.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationMessageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update message",
        "description": "Requires `write:communications`.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1CommunicationMessageUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1CommunicationMessageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete message",
        "description": "Requires `write:communications`.",
        "tags": [
          "Communications"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "deleted": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "deleted"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments": {
      "get": {
        "summary": "List appointments",
        "description": "Requires `read:appointments`. Calendar bookings only — for facility drop-off/intake with photos use `POST /cars/{id}/events` instead.",
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "required": false,
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            },
            "required": false,
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false,
            "name": "updatedAfter",
            "in": "query"
          },
          {
            "schema": {
              "type": "string"
            },
            "required": false,
            "name": "ids",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "scheduled",
                "pending_approval",
                "accepted",
                "declined",
                "checked_in",
                "in_progress",
                "completed",
                "cancelled",
                "no_show"
              ]
            },
            "required": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "customerId",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": false,
            "name": "carId",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "appointments returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AppointmentsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create appointment",
        "description": "Requires `write:appointments`. Schedule an event for later: pass `eventTypeId` or `eventType` (the event type `value`) from `GET /event-types`, or an `appointmentTypeId`. Typed appointments get their event session created right away. No parking sync — to do an event now (e.g. Vehicle Drop Off into a spot), use `POST /cars/{id}/events`.",
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1AppointmentCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AppointmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/appointments/{id}": {
      "get": {
        "summary": "Get appointment",
        "description": "Requires `read:appointments`.",
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AppointmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update appointment",
        "description": "Requires `write:appointments`.",
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1AppointmentUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1AppointmentResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete appointment",
        "description": "Requires `write:appointments`.",
        "tags": [
          "Appointments"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1DeletedOk"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, revoked, or expired API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "API key missing required scope, or API disabled for team.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  }
}
