I have this .puml code:
@startuml
class ClassName {
// Class members (attributes and methods)
}
participant Object1
participant Object2
participant Object3
participant Object4
participant Object5
participant Object6
control Object7
note left of Object6
This is a note about the Customer class.
end note
title Sequence Diagram with Decision Blocks
@enduml
and I get this error:
anybody know why I can't declare a class there?

Your diagram is a sequence diagram, and not a class diagram. In UML, the lifelines of a sequence diagram correspond to instances of classifiers and not to classes.
Moreover, it's not a commonly accepted UML practice to model the full details of a class with all its internals in a sequence diagram. So plantuml would not know how to render such a mixture. Therefore it is not accepted in the plantuml language, which only allow a limited number of participant types (e.g. Entity-Boundary-Control which are popular non-standard stereotype), see the online reference in section "Declaring participant"
Here how to relate objects to classes, with
ObjectZwithout specified class,ObjectXas instance of a given class, and an anonymous object of a given class:The problem with the quotes, is that it is later difficult to use for modelling the messages exchanged, since you alway need to spell the full quote content:
So a practical tip is to make full use of alias enabled by plantuml, to use only a shorter object name later on: