https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi Retell Support,I'm trying to use the REST API t...
# ❓・ai-evy-support
m
@AI Evy Hi Retell Support, I'm trying to use the REST API to create an agent programmatically, but all my API keys return "403 Forbidden" when calling /v2/list-agents. Account email: [YOUR_EMAIL] Workspace: [YOUR_WORKSPACE_NAME] I've tried creating multiple API keys but they all fail authentication. Can you help me understand: 1. Do I have REST API access enabled? 2. Are my keys webhook-only? 3. What permissions do I need? Thank you!
a
Thanks for tagging me @Max_Strong. I'll look through relevant sources and get back to you shortly.
### Answer API Key Authentication for REST API Based on the available documentation, here's what you need to know about API key authentication: Authentication Format To authenticate REST API requests, include your API key in the request headers using this format [(1) ]() :
Copy code
Authorization: Bearer YOUR_API_KEY
API Key Permissions All API keys within a workspace share the same permission level . They are used to authenticate requests to REST API endpoints, SDK integrations, and webhook endpoints . Troubleshooting Steps From a similar issue reported in the community [(2) ]() , here are recommended steps: 1. Ensure you're using the correct base URL: ` 2. Verify you're using the correct Authorization header format:
Authorization: Bearer YOUR_API_KEY
3. Try creating a new API key from the dashboard Managing API Keys You can manage your API keys in the System Settings under the "API Keys" section [(3) ]() : - Create new API keys by clicking the "Add" button - Delete compromised keys immediately - One key is designated as the webhook API key (which cannot be deleted) [(1) ]() Note on Webhook Keys While one API key is designated for webhook authentication , this doesn't restrict other keys from REST API access. All keys should work for REST API endpoints . If the issue persists after trying these steps, you may need to contact Retell AI support directly at the [Contact Sales]() page or visit [) .
​ To learn more, see the sources I considered: [[1] API Key Overview](https://docs.retellai.com/accounts/api-keys-overview) [[2] API Key Permissions Issue - All Endpoints Return 404](https://discord.com/channels/1186424376300679209/1401947384803754086) [[3] Manage API Keys](https://docs.retellai.com/accounts/manage-api-keys) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.