Hello Timo,
to be compatible with next 1.8, I would suggest to look at geometry class from python API. In this class, shape.geometry.coordinates stores the shape coordinates. In case of polygon, use shape.geometry.coordinates[0] to access exterior_ring coordinates...For LineString or Point type just use shape.geometry.coordinates...
For example, for a given polygon shape, following code would modify its exterior_ring vertices z value to yourzvalue:
vertices = []
if shape.geometry.type == Metashape.Geometry.Type.PolygonType:
for vertex in shape.geometry.coordinates[0]:
vertices.append(Metashape.Vector((vertex.x, vertex.y, yourzvalue)))
shape.geometry = Metashape.Geometry.Polygon(vertices)
Hope this gets you going,