My agent uses a post-call custom function called send_call_summary to POST to https://api.resend.com/emails.
Entering the Authorization value in the function’s test window successfully sent an email. However, after saving the same value in the main function settings and reopening the test, it fails with HTTP 400: “API key is invalid.”
Actual call logs confirm the function runs and generates the summary, but receives the same error. Publishing the agent didn’t resolve it.
There is one Authorization header, formatted as Bearer followed by a space and the full key. The Resend key has Sending access for the correct domain.
How can I diagnose whether the saved Authorization header is being sent differently from the test override?