Create a contact

Arguments

Argument Required/optional Description
contact_name required A string of the name of the new contact
contact_email required A string of the email of the new contact

Example Request

cURL

curl https://api.signable.co.uk/v1/contacts \
   -u d41d8cd98f00b204e9800998ecf8427e:x \
   -X POST \
   -d "contact_name=John Smith" \
   -d "contact_email=john@smith.com"
		

PHP

// Download our PHP SDK Library here: https://github.com/Signable/signable-sdk-php
$response = Signable\Contacts::createNew('John Smith','john@smith.com');
// Output the response
var_dump($response);
			

Example Response

{
    "http": 200,
    "message": "John Smith has been added to your contact list.",
    "href": "https://api.signable.co.uk/v1/contacts/1000",
    "contact_id": "1000",
    "contact_name": "John Smith",
    "contact_email": "john@smith.com",
    "contact_created": "2013-10-24T15:05:05+0000"
}


Get a contact

Arguments

Argument Required/optional Description
id required A positive integer representing the contact_id

Example Request

cURL

curl https://api.signable.co.uk/v1/contacts/1000
-u d41d8cd98f00b204e9800998ecf8427e:x
		

PHP


// Download our PHP SDK Library here: https://github.com/Signable/signable-sdk-php
$response = Signable\Contacts::getSingle(1000);
// Output the response
var_dump($response);
			

Example Response

{
	"http":200,
	"contact_id":1000,
	"contact_name":"John Smith",
	"contact_email":"john@smith.com",
	"contact_outstanding_documents":"0",
	"contact_created":"2012-10-07T13:34:53+0000",
	"contact_apps":
	{
		"capsule_id":"0",
		"kashflow_id":"123456"
	}
}


List contacts

Arguments

Argument Required/optional Description
offset optional A positive integer indicating the first record to retrieve. Defaults to the first contact.
limit optional A positive integer indicating the maximum number of contacts to return. Defaults to 10.

Example Request

cURL

curl https://api.signable.co.uk/v1/contacts?offset=0&limit=10
-u d41d8cd98f00b204e9800998ecf8427e:x
		

PHP


// Download our PHP SDK Library here: https://github.com/Signable/signable-sdk-php
$response = Signable\Contacts::getMultiple( 0, 10 );
// Output the response
var_dump($response);
			

Example Response

{
    "http": 200,
    "offset": 0,
    "limit": 3,
    "total_contacts": "10",
    "next": "https://api.signable.co.uk/v1/contacts?offset=3&limit=7",
    "contacts": [
        {
            "contact_id": "1000",
            "contact_name": "John Smith",
            "contact_email": "john@smith.com",
            "contact_outstanding_documents": "0",
            "contact_created": "2012-10-07T13:35:30+0000",
            "contact_apps": {
                "capsule_id": "0",
                "kashflow_id": "123456"
            }
        },
        {
            "contact_id": "1001",
            "contact_name": "Jane Smith",
            "contact_email": "jane@smith.com",
            "contact_outstanding_documents": "3",
            "contact_created": "2012-10-07T13:37:13+0000",
            "contact_apps": {
                "capsule_id": "123456",
                "kashflow_id": "0"
            }
        },
        {
            "contact_id": "1002",
            "contact_name": "Jim Smith",
            "contact_email": "jim@smith.com",
            "contact_outstanding_documents": "0",
            "contact_created": "2012-10-07T13:37:13+0000",
            "contact_apps": {
                "capsule_id": "123456",
                "kashflow_id": "789012"
            }
        }
]
}


Update a contact

Arguments

Argument Required/optional Description
id required A positive integer representing the contact_id of the contact you want to update
contact_name optional A string of the new name of the content. Either contact_name or contact_email must be provided.
contact_email optional A string of the new email of the content. Either contact_name or contact_email must be provided.

Example Request

cURL

curl https:/api.signable.co.uk/v1/contacts/1000 \
   -u d41d8cd98f00b204e9800998ecf8427e:x \
   -X PUT \
   -d "contact_name=Joe Smith" \
   -d "contact_email=joe@smith.com"
		

PHP


// Download our PHP SDK Library here: https://github.com/Signable/signable-sdk-php
$response = Signable\Contacts::update( 1000, "Joe Smith", "joe@smith.com" );
// Output the response
var_dump($response);
			

Example Response

{
    "http": 200,
    "message": "Joe Smith has been updated in your contact list.",
    "href": "https://api.signable.co.uk/v1/contacts/1000",
    "contact_id": 1000,
    "contact_name": "Joe Smith",
    "contact_email": "joe@smith.com",
    "contact_updated": "2013-10-24T15:16:59+0000"
}


Delete a contact

Arguments

Argument Required/optional Description
id required A positive integer representing the contact_id of the contact you want to delete

Example Request

cURL

curl https://api.signable.co.uk/v1/contacts/1000
   -u d41d8cd98f00b204e9800998ecf8427e:x 
   -X DELETE
		

PHP


// Download our PHP SDK Library here: https://github.com/Signable/signable-sdk-php
$response Signable\Contacts::delete(1000);
// Output the response
var_dump($response);
			

Example Response

{
	"http":200,
	"message":"Joe Smith has been removed from your contact list.",
	"contact_id":1000,
	"contact_name":"Joe Smith",
	"contact_email":"joe@smith.com"
}


List envelopes for a contact

Arguments

Argument Required/optional Description
id required A positive integer representing the contact_id

Example Request

cURL

curl https://api.signable.co.uk/v1/contacts/1000/envelopes
-u d41d8cd98f00b204e9800998ecf8427e:x
		

PHP


// Download our PHP SDK Library here: https://github.com/Signable/signable-sdk-php
$response Signable\Contacts::listEnvelopes(1000):
// Output the response
var_dump($response);
			

Example Response

{
    "http": 200,
    "total_envelopes": "2",
    "envelopes": [
        {
            "envelope_fingerprint": "d41d8cd98f00b204e9800998ecf8427e",
            "envelope_title": "Test Envelope 1",
            "envelope_status": "sent",
            "envelope_created": "2012-03-09T17:12:40+0000",
            "envelope_sent": "2012-03-09T17:12:40+0000",
            "envelope_processed": null
        },
        {
            "envelope_fingerprint": "d41d8cd98f00b204e9800998ecf8427e",
            "envelope_title": "Test Envelope 2",
            "envelope_status": "signed",
            "envelope_created": "2012-03-09T17:11:34+0000",
            "envelope_sent": "2012-03-09T17:11:34+0000",
            "envelope_processed": "2012-03-10T17:11:34+0000",
            "envelope_signed_pdf": "https://app.signable.co.uk/contract/down/1000/1234/5678/d41d8cd98f00b204e9800998ecf8427e/d9729feb74992cc3482b350163a1a010"
        }
    ]
}