Resend works in function test but fails after calls: API key invalid

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?

Hey @morganlisterjosh Could you please share your Agent ID and the relevant Call ID? This will help us investigate the issue further.

Thank You

AGENT ID; agent_f1229a78d9086324c241ef9aa4

Hey @morganlisterjosh Could you please share any relevant Call IDs related to the issue?

Thank You

call_7cc7060c3006815bd5d61149970

Hey @morganlisterjosh I’m checking this with the team and will get back to you as soon as I have an update.

Thank You