Support custom headers and payloads in API