I’m having an issue with DocuSign Connect hitting our WCF endpoint.
We have the following WCF endpoint which accepts a Stream parameter.
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/PBSAPI")]
Stream PBSAPI(Stream data);
DocuSign Connect webhook sends JSON to our endpoint, but the headers Content-Type is set to application/json.
Because we are accepting a Stream parameter the header content type must be application/x-www-form-urlencoded.
We are using "per-envelope" webhooks. Is it possible to configure the eventNotification object to specify the content-type to use? Similar to passing custom_fields in the webhook body?
I’ve tried using a different parameter such as string to accept the payload, but it does not seem to work when content-type = application/json.
2
Answers
No. DocuSign Connect specifically sends only "application/Json". DocuSign Connect is mainly used for sending status updates on envelopes (which is done as a JSON).
If you have a specific use-case you’re looking to implement, please reach out to DocuSign support to discuss this further.
Today, DocuSign webhooks are only sent as JSON. Previously they were sent as JSON or XML.
You can create your own serverless function from AWS, Azure or other suppliers to transform the JSON to form-encoded. However, you’ll need to create a mapping table since JSON is a richer format (it includes objects (associative arrays)) and form-encoded format does not.