  Context. HCN is the most abundant molecule after H$_{2}$ and CO in the
circumstellar envelopes (CSEs) of carbon-rich asymptotic giant branch (AGB)
stars. Its rotational lines within vibrationally excited states are exceptional
tracers of the innermost region of C-rich CSEs. Aims. We aim to constrain the
physical conditions of CSEs of C-rich stars using thermal lines of the HCN
molecule. Additionally, we also search for new HCN masers and probe the
temporal variations for HCN masers, which should shed light on their pumping
mechanisms. Methods. We observed 16 C-rich AGB stars in various HCN rotational
transitions within the ground and 12 vibrationally excited states with the APEX
12 m submillimeter telescope. Results. We detect 68 vibrationally excited HCN
lines from 13 C-rich stars, including 39 thermal transitions and 29 maser
lines, which suggests that vibrationally excited HCN lines are ubiquitous in
C-rich stars. Population diagrams constructed, for two objects from the sample,
for thermal transitions from different vibrationally excited states give
excitation temperature around 800-900 K, confirming that they arise from the
hot innermost regions of CSEs (i.e., r<20$R_{*}$). Among the detected masers,
23 are newly detected, and the results expand the total number of known HCN
masers lines toward C-rich stars by 47%. In particular, the J=2-1 (0, 3$^{1e}$,
0), J=3-2 (0, 2, 0), J=4-3 (0, 1$^{1f}$, 0) masers are detected in an
astronomical source for the first time. Our observations confirm temporal
variations of the 2-1 (0, 1$^{1e}$, 0) maser on a timescale of a few years. Our
analysis of the data suggests that all detected HCN masers are unsaturated. A
gas kinetic temperature of ${\gtrsim}$700K and an H$_{2}$ number density of
>10$^{8}$cm$^{-3}$ are required to excite the HCN masers. In some ways, HCN
masers in C-rich stars might be regarded as an analogy of SiO masers in O-rich
stars.
