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.

View usage

This endpoint allows you to view the usage for all of your sub accounts. The dates correspond to your Signable billing date. You can view usage for the current billing period as well as the previous.

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/usage?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/usage?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": 10,
  "total_companies": "50",
  "current_start_date": "2020-01-01T16:31:02+0000",
  "current_end_date": "2020-02-01T16:31:02+0000",
  "previous_start_date": "2020-12-01T16:31:02+0000",
  "previous_end_date": "2020-01-01T16:31:02+0000",
  "next": "https://api.signable.co.uk/v1/usage?offset=10&limit=10",
  "companies": [
    {
      "company_id": "1000",
      "company_name": "Test Company 1",
      "current_usage": "50",
      "previous_usage": "150",
      "company_created": "2012-10-07T13:35:30+0000"
    },
    {
      "company_id": "1001",
      "company_name": "Test Company 2",
      "current_usage": "0",
      "previous_usage": "20",
      "company_created": "2012-10-07T13:35:30+0000"
    },
    {
      "company_id": "1002",
      "company_name": "Test Company 3",
      "current_usage": "1000",
      "previous_usage": "1500",
      "company_created": "2012-10-07T13:35:30+0000"
    }
]
}

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",
        "company_usage": [
          {
            "month": "March",
            "year": "2020",
            "sent": "28"
          },
          {
            "month": "February",
            "year": "2020",
            "sent": "24"
          },
          {
            "month": "January",
            "year": "2020",
            "sent": "25"
          }
        ]
}

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"
}