It depends on the client of your API. CSRF attacks are based on the fact that the client automatically sends the cookies (authorization) of the requested URL using an HTTP request. If your client does not (usually browsers do this automatically), you should be fine.
Reason: if your API user is not authenticated / authorized in your application using cookies (which are automatically stored in the browser), the attacker cannot use any other web page for a successful CSRF attack (send an HTTP request from another file page cookie of your API from the browser).
In other words, I canβt imagine that you will have an API client written in such a way that it can send requests to your API, store cookies (your authentication), and also can somehow show you content that is βstupidβ "user interacts - sends requests to your API using cookies (your authentication) from previous API requests.
source share