Skip to content

Errors

All API errors return a consistent JSON structure:

{
"error": {
"type": "not_found",
"message": "Signature request not found."
}
}

Validation errors include a details array:

{
"error": {
"type": "invalid_request",
"message": "Validation failed.",
"details": [
"Signers can't be blank",
"File must be a PDF"
]
}
}
StatusDescription
200Success
201Created
204No Content (successful deletion)
400Bad Request — missing or malformed parameters
401Unauthorized — invalid or missing API key
403Forbidden — insufficient permissions
404Not Found — resource doesn’t exist
422Unprocessable Entity — validation failed
429Too Many Requests — rate limit exceeded
500Internal Server Error
TypeStatusDescription
invalid_request400Required parameter missing or malformed
unauthorized401API key is missing, invalid, revoked, or expired
forbidden403API key doesn’t have permission for this action
not_found404The requested resource was not found
validation_error422One or more fields failed validation
rate_limited429Too many requests — back off and retry
internal_error500Something went wrong on our end

Check the HTTP status code first, then inspect the error.type for programmatic handling:

const response = await fetch("https://api.visisign.app/v1/signature_requests", {
headers: { Authorization: `Bearer ${apiKey}` },
});
if (!response.ok) {
const { error } = await response.json();
switch (error.type) {
case "unauthorized":
// Re-authenticate or check API key
break;
case "not_found":
// Resource doesn't exist
break;
case "validation_error":
// Check error.details for specific field errors
console.error(error.details);
break;
default:
console.error(error.message);
}
}