add constrant to api