insert instance using api