[api] implement `put`