Hi Karine,
The only API endpoint I found which returns the Agent_name is the following : /api/v2/profiles/users
It takes the user ID as an input, and returns an array where you can find the agent name value.
Note that this endpoint is tagged as Deprecated ..
The other api endpoint they suggest to use instead doesn't return the agent_name ...
Below the agent name set on my profile:

The result under API Explorer :


Hope that helps,
Kind Regards,
Charaf
------------------------------
Charaf Eddine Chemlal
NTT France SASU
------------------------------