Below are a list of all our Partner enabled API methods. Please bear in mind that to use any of the methods below, you must have a partner enabled API key. If you wish to become a partner of Signable, which gives you access to the methods below, please contact us.

List all sub company accounts

Arguments

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

Example Request

cURL

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

PHP


// Start the call
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.signable.co.uk/v1/companies?offset=0&limit=10 ');
// Set your API key
curl_setopt($curl, CURLOPT_USERPWD, "d41d8cd98f00b204e9800998ecf8427e:x");
// Signable is a safe peer
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Don't output the content right away
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Place the result into a variable to work with.
$response = curl_exec($curl);
// Close the cURL request.
curl_close($curl);
// Output the response
var_dump($response);
			

Example Response

{
    "http": 200,
    "offset": 0,
    "limit": 3,
    "total_companies": "10",
    "next": "https://api.signable.co.uk/v1/companies?offset=3&limit=7",
    "companies": [
        {
            "company_id": "1000",
            "company_name": "Test Company 1",
            "company_email": "john@smith.com",
            "company_api_key": "d41d8cd98f00b204e9800998ecf8427e",
            "company_created": "2012-10-07T13:35:30+0000"
        },
        {
            "company_id": "1001",
            "company_name": "Test Company 1",
            "company_email": "jane@smith.com",
            "company_api_key": "d41d8cd98f00b204e9800998ecf8427e",
            "company_created": "2012-10-07T13:35:30+0000"
        },
        {
            "company_id": "1002",
            "company_name": "Joe Smith",
            "company_email": "joe@smith.com",
            "company_api_key": "d41d8cd98f00b204e9800998ecf8427e",
            "company_created": "2012-10-07T13:35:30+0000"
        }
]
}


Get a sub account

Arguments

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

Example Request

cURL

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

PHP


// Start the call
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.signable.co.uk/v1/companies/1000');
// Set your API key
curl_setopt($curl, CURLOPT_USERPWD, "d41d8cd98f00b204e9800998ecf8427e:x");
// Signable is a safe peer
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Don't output the content right away
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Place the result into a variable to work with.
$response = curl_exec($curl);
// Close the cURL request.
curl_close($curl);
// Output the response
var_dump($response);
			

Example Response

{
	"http":200,
	"company_id":1000,
	"company_name":"Test Company 1",
	"company_email":"john@smith.com",
	"contact_created":"2012-10-07T13:34:53+0000",
}


Create a sub company account

Arguments

Argument Required/optional Description
company_name required A string of the name of the new company
user_name required A string of the name of the first user of the company
user_email required A string of the email of the first user of the company

Example Request

cURL

curl https://api.signable.co.uk/v1/companies 
   -u d41d8cd98f00b204e9800998ecf8427e:x 
   -X POST 
   -d "company_name=Test Company 1" 
   -d "user_name=John Smith"
   -d "user_email=john@smith.com"
		

PHP

// Set variables to be used in POST. They have to be urlencoded.
$company_name = urlencode("Test Company 1");
$user_name = urlencode("John Smith");
$user_email = urlencode('john@smith.com');

// Start the call
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.signable.co.uk/v1/companies');
// Set your API key
curl_setopt($curl, CURLOPT_USERPWD, "d41d8cd98f00b204e9800998ecf8427e:x");
// Signable is a safe peer
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Don't output the content right away
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Send request as a POST.
curl_setopt($curl, CURLOPT_POST, true);
// Set the POST parameters.
curl_setopt($curl, CURLOPT_POSTFIELDS, 'company_name='.$company_name.'&user_name='.$user_name.'&user_email='.$user_email);
// Place the result into a variable to work with.
$response = curl_exec($curl);
// Close the cURL request.
curl_close($curl);
// Output the response
var_dump($response);
			

Example Response

{
    "http": 200,
    "message": "Test Company 1 has been added as a company",
    "href": "https://api.signable.co.uk/v1/companies/1000",
    "company_id": "1000",
    "company_name": "Test Company 1",
    "company_email": "john@smith.com",
    "api_key": "c4ca4238a0b923820dcc509a6f75849b",
    "user_id": "1000",
    "user_name": "John Smith",
    "user_email": "john@smith.com",
    "user_href": "https://api.signable.co.uk/v1/users/1000",
    "company_added": "2013-10-24T15:05:05+0000"
}


Update a sub account

Arguments

Argument Required/optional Description
id required A positive integer representing the company_id of the sub account you want to update
company_name optional A string of the new name of the sub account.
company_email optional A string representing the new main company email address for the sub account

Example Request

cURL

curl https:/api.signable.co.uk/v1/companies/1000 \
   -u d41d8cd98f00b204e9800998ecf8427e:x \
   -X PUT \
   -d "company_name=New Company" \
   -d "company_email=john@newcompany.com"
		

PHP


// Set variables to be used in PUT (update). They have to be urlencoded.
$name = urlencode("New Company");
$email = urlencode("john@newcompany.com");

// Start the call
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.signable.co.uk/v1/companies/1000');
// Set your API key
curl_setopt($curl, CURLOPT_USERPWD, "d41d8cd98f00b204e9800998ecf8427e:x");
// Signable is a safe peer
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Don't output the content right away
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Set it as a PUT request
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT");
// Set the PUT parameters.
curl_setopt($curl, CURLOPT_POSTFIELDS, 'company_name='.$name.'&company_email='.$email);
// Place the result into a variable to work with.
$response = curl_exec($curl);
// Close the cURL request.
curl_close($curl);
// Output the response
var_dump($response);
			

Example Response


{
	"http":200,
	"message":"New Company has been updated.",
	"href":"https://api.signable.co.uk/v1/companies/1000",
	"company_id": 1000,
	"company_name": "New Company",
	"company_email": "john@newcompany.com",
	"company_updated": "2015-01-21T11:57:29+0000"
}


Delete a sub company account

Arguments

Argument Required/optional Description
id required A positive integer representing the company_id of the sub account you want to delete

Example Request

cURL

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

PHP


// Start the call
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.signable.co.uk/v1/companies/1000 ');
// Set your API key
curl_setopt($curl, CURLOPT_USERPWD, "d41d8cd98f00b204e9800998ecf8427e:x");
// Signable is a safe peer
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Don't output the content right away
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Set it as a DELETE request
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "DELETE");
// Place the result into a variable to work with.
$response = curl_exec($curl);
// Close the cURL request.
curl_close($curl);
// Output the response
var_dump($response);
			

Example Response

{
	"http":200,
	"message":"Test Company 1 has been removed.",
	"company_id":1000,
	"company_name":"Test Company 1",
	"company_email":"john@smith.com"
}