Skip to main content

API Key Authentication

How to configure Payloads to authenticate using API keys

Updated over 2 months ago

API Key authentication in Payloads adds a static header to outbound requests.

This guide shows how to configure an API Key Credential, assign it to a Payload, and verify the header is sent correctly.

Who this guide is for

This guide is for Salesforce admins and integration builders who need to authenticate outbound payload requests using a fixed API key header.

Before you begin

Make sure you already have:

  • a Payload record which calls out to another system

  • an API Key Credential

  • an external endpoint you can inspect (for example, Beeceptor)

How to configure & test the Credential

Review the API Key Credential

Open your API Key Credential and confirm Header Name and Header Value are set.

x-api-key is a common default header name, but you can change it to match your target API.

Review the generated header preview

After saving, check the Generated Headers section on the Credential record.

This preview shows the exact header Payloads will attach when the Credential is used.

Attach the Credential to the Payload

Open your Payload, click Edit, then set the Credential field to your API Key Credential.

Run the Payload

From the Payload record, click Run Payload. If the Payload has no inputs, run it immediately.

After execution, confirm the Job completes successfully.

Confirm headers in your Job

Open the completed Job, go to Webhook and then Headers.

Confirm the configured API key header is present and includes the expected value.

Confirm headers in the external system

In your external endpoint tool, open the received request and view request headers.

Confirm the external API key header value

Confirm the external request includes the same API key header name and value used in Payloads.

This final check is intentionally zoomed in so the exact header value is clearly legible.

What "done" looks like

Your setup is correct when:

  • the Payload runs successfully

  • Job headers include the configured API key header and value

  • the external system shows the same header and value on the received request

Summary

With API Key authentication in Payloads, you configure the Credential once, assign it to the Payload, and Payloads applies the API key header on each run.

Did this answer your question?