For 3d convolutions your input should have the dimensions [batch_size, channels, depth, height, width].
The convolution will be applied on the channels like in the two dimensional case.
I think it depends on your use case, what z exactly means. Are you working with medical images?