Unexplained 500 response when calling API

Hi there.

I’m modifying a working Signable posting system and I have a problem I’m hoping you may be able to help me with. The following post is returning a 500 error from the API. Can you tell from the following what might be causing it? We had it working when we were sending 3 documents to a single signer and one copier. We have just changed it to be a single document and up to 3 copiers, but getting a 500 error isn’t very helpful.

This is from my localhost, not a live website. I’ve redacted business names and email addys.

Request:

Method: POST, RequestUri: 'https://api.signable.co.uk/v1/envelopes', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
X-Signable-Mode: test
Authorization: Basic 000000000000000000000000000000000000000000000000000000000000000000000000000
Content-Type: application/json; charset=utf-8
Content-Length: 2282620
}

Response:

StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
Date: Fri, 21 Mar 2025 14:35:00 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Server: nginx
Content-Type: text/html; charset=UTF-8
}, Trailing Headers:
{
}

Envelope:

{
"envelope_title" : "Account setup document for Some Business Name",
"envelope_documents" : [ {
"document_title" : "Account setup document for Some Business Name",
"document_file_name" : "Account setup document for Some Business Name.docx",
"document_file_content" : "UEsDBBQAAAAIAFZ6dVqAHudmdAEAAOkCAAARAAAAZG9jUHJvcHMvY29yZS54bWyNUstOwzAQvPMVke+pnZQWsJpUKqhICCQkgkDcjLNtDY5j2W7T/.....
......EsBAhQDFAAAAAgAVnp1Wk6lcoefAQAAiQkAABMAAAAAAAAAAAAAAKSBJhgYAFtDb250ZW50X1R5cGVzXS54bWxQSwUGAAAAABoAGgCjBgAA9hkYAAAA"
} ],
"envelope_parties" : [ {
"party_name" : "Some Business Name",
"party_email" : ["info@incrediblyuseful.net"](mailto:info@incrediblyuseful.net),
"party_role" : "signer1"
}, {
"party_name" : "Some Body",
"party_email" : ["someonel@somewhere.co.uk"](mailto:someonel@somewhere.co.uk),
"party_role" : "copy"
} ]
}

It all looks fine to me, but not to Signable it would seem. If you can see anything obvious I’d be really interested to find out what might be at fault.

Thanks in anticipation.

Hi there - thanks for getting in touch!

Let me query this with our technical team for you - they have finished for the day, but I will get right back to you first thing tomorrow with what they find if that’s okay?

I have also edited your post to remove your authentication details for security reasons, however I have the full response here for the team.

Speak to you tomorrow!

Hi Etain,

That would be great thanks.

I’d already obscured the security details by replacing some random characters, but thanks anyway :wink:

Good morning Craig :blush: I can see that we replied to your email you sent in on the 24th, can you check your junk folder maybe to see if it landed in there please? Thanks!

Ah, yes, found it, thanks. It had been deleted for some reason. My turn to blush!

Thanks.

If I send the form and remove the document_file_content then I get a 200 back with a warning that the document is empty.

The document in question is written to disk during development so I can check all it’s fields were replaced with form values. Every time, it looks absolutely fine when I open it. So are there any known issues that I need to look for, or is there somewhere I can send the document to be checked over?

Thanks.

In the email we sent over, my colleague advised about just removing the ‘…’ in the document_file_content, the rest can stay. Have you tried just removing those dots?

Er… “those dots” were only a place holder for clarity for this post. I wasn’t going to post the whole document content here, both for clarity (2,108,312 chars when encoded) and privacy.

Is there some way to check the document for compatibility with your service? As far as I’m concerned, if it opens from disk, it should be fine.

Thanks

Hi Craig :blush: So the dots we saw were included in the request you emailed us, would you mind if we continued this query via email again? It will be easier for my colleagues on the technical team to look at and advise. Would you mind sending us the full request you have been using, it will be secure via email. Thank you!

Thanks Etain.

Email sent.

1 Like