use WebService::ValidSign;
use WebService::ValidSign::Object::DocumentPackage;
use WebService::ValidSign::Object::Document;

my $client = WebService::ValidSign->new(
    secret   => 'my very secret API key',
    endpoint => ''
    lwp      => LWP::UserAgent->new(), # optional

my $documentpackage = WebService::ValidSign::Object::DocumentPackage->new(
    name => "Document package name"

my $senders = $client->account->senders(search => $sender);
if (!@$senders) {
    die "Unable to find sender $opts{senders}\n";
elsif (@$senders > 1) {
    die "Multiple senders found for $opts{senders}\n";

my $signers = $client->account->senders(search => $signer);
if (!@$signers) {
    die "Unable to find sender $signer\n";
# at this moment only one signer is supported
elsif (@$signers > 1) {
    die "Multiple senders found for $signer}\n";
$documentpackage->add_signer('rolename' => signers->[0]);

my @documents = qw(
foreach (@documents) {
    my $document = WebService::ValidSign::Object::Document->new(
        name => "$_",
        path => $_,

my $id = $client->package->create($documentpackage);
print "Created package with ID $id", $/;
my $details = $client->package->details($documentpackage);


A module that uses the ValidSign API to create/upload and sign documents. This module is in ALPHA state and is subject to change at any given moment without notice.


This module extends WebService::ValidSign::API::Constructor and all of its attributes.


JSON::XS 4.01 has a bug that causes JSON serialization errors. Please upgrade or downgrade JSON::XS where needed.


This module has been made possible by my employer Mintlab B.V. who uses this module in their open source product Zaaksysteem.