it is not necessary to implement Anti-Forgery Token protection against CSRF Attacks when building an API because how APIs are built and intended to be used, they require different methods of protection like:
- using API Keys.
- using Basic Authentication.
- using OpenID Connect.
because the goal is to prevent malicious clients from calling our API, we need to validate the identity of the client app that performs the request to the API.
and in order to perform a CSRF attack, one of the main conditions is to have a Cookie-based authentication session (have a look at this article where it explains in detail how CSRF attacks are performed), which is not the case with APIs.
however, if you're calling your API using Ajax from your website where the API is on the same origin as the website and you rely on Cookie to authenticate the user, it is possible to (and you should) integrate Anti-Forgery Token protection, you can check this Answer on StackOverflow for more details on how to implement it.
but since you are going to call the API from an external app just go with one of the above methods.
check this article on Microsoft docs for more details on CSRF Attacks and how Anti-Forgery Token protection is implemented.
also, check this article from RedHat to get more information about API security.