update certificate API