In one of our existing .net core web api (REST) end point, one of its property value in response payload is email address which will be changed to alphanumeric id shortly. This change in response payload will break existing integration.
This breaking change impact can be addressed by introducing version to api saying that only v2 version will alphanumeric id in its response payload otherwise v1 version will keep rendering email address in its response payload but is there any other alternative solution to avoid broken existing integration even after introducing the change in existing response payload structure
Existing response payload structure:
{
customerid: [email protected]
}
Future response payload structure:
{
customerid: 1123acbd56
}

customerid!= email. This is a problem for the client if they are doing that. You will have to evaluate the weight of trying to support a client doing this. There are several possible solutions, several of which have already been provided.v1andv2as you've described. Both versions have thecustomeridand both are of type string. However, if one or more clients are making an assumption about it being an email address, it may be a problem. That is a judgement call. It would be no different than ifcustomeridwere a GUID. In the strictest sense, the contract can only specify that it's a string.