Most of the API responses for blocks and transactions also return the number of confirmations. This is the number of blocks that are ontop of the block that contains your transaction. The number of confirmation required to be confident in the chain depends on whether the transaction was send via FAST transaction or SLOW transaction.