[api] - Add logic to update the foreignId on an identity's application. Foreign id is a nullable field and a read_only one as well