OAuth connections ignore these headers. When an AI app connects by
signing in with Sendforsign, the grant the user approved on the
consent screen is the source of truth: account, user (tenant) if one was picked, mode (drafts only by default) and
allowed domains.
Headers such as
X-Sendforsign-Client-Key, X-Sendforsign-User-Key, X-Sendforsign-Agent-Mode,
X-Sendforsign-Allowed-Domains and X-Sendforsign-On-Behalf-Of have no effect there, so an app cannot change the
approved account, user, mode or allowed domains. X-Sendforsign-Agent, if sent, is only appended to the app’s name in the
audit log. Header authentication works as described below.Examples
A production agent in a multi-tenant product, acting for one of your customers’ employees, allowed to prepare and send contracts only to that customer’s domain and its client’s domain:Notes
- Header names are case-insensitive. Values for the mode are case-insensitive too (
DRAFT,read-onlyandread_onlyall work); an unknown value falls back tosend, so spell it carefully when you mean to restrict. - For an allowlist, a leading
@is ignored (@customer.com=customer.com), and subdomains are not included: listeu.customer.comseparately if needed. - Call the
get_connection_infotool to see how the server read your headers. - The REST API ignores these MCP headers. Use userKey and
clientKeyin the request body there.