Many replies mentioned 304. It might be worth than 304 is intended to help the client manage the local state (e.g. cache) of a resource.
Since you're talking about sync, it all depends if your request is getting the trying to get the data (sync from server to client) or pushing some data to the server (which then respond telling you nothing changed). The former use case is a valid 304. The later is not.
Furthermore, 304 is OK if the request is a GET or HEAD, and the server returns a cache-control related header like Cache-Control, Content-Location, Date, ETag, Expires, and Vary. Otherwise, intermediate layers (proxies, ...) could not correctly deal with that request (remember 304 are really targeted at managing cache)
Ref (and links to RFCs): https://httpstatuses.com/304
The correct answer to your question really depends on the logic of your sync:
304 is perfect for no change, otherwise it's a 200 to which your client sends the data to perform the sync201 for the very first sync, letting know the client this is a new resource (which might triggers some additional validation/local ref storage)200 any other successful time, with a few fields in the body: the diff, and eventually some meta-data (depending on the business logic and use cases. Maybe a csrf token too, that kind of decorating data not directly related to the content of the sync)409 is it's a no-op because the operation cannot be performed (users connected from 2 different clients, both trying to sync and ending with a merge conflict for the later oneFinally, whenever I wonder which one I should use, I very often coming back to these 2 resources:
Hope this helps