Create a user

Arguments

Argument Required/optional Description
user_name required A string of the name of the new user
user_email required A string of the email of the new user
team_id optional An integer representing a valid team_id. If left out, the default team_id is used. If passed in, it must be a valid team_id for the company.

Example Request

cURL

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

PHP

// Download our PHP SDK Library here: https://github.com/Signable/signable-sdk-php

$response =  Signable\Users::createNew("John Smith", "john@smith.com");
// Output the response
var_dump($response);
			

Example Response

{
	"http":200,
	"message":"John Smith has been added to your user list.",
	"href":"https://api.signable.co.uk/v1/users/1000",
	"user_id":1000,
        "team_id":1234,
	"user_name":"John Smith",
	"user_email":"john@smith.com",
	"user_added":"2013-10-25T12:07:52+0000"
}


Get a user

Arguments

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

Example Request

cURL

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

PHP


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

Example Response

{
	"http":200,
	"user_id":1000,
        "team_id":1234,
	"user_name":"John Smith",
	"user_email":"john@smith.com",
	"user_added":"2013-10-25T12:07:52+0000",
	"user_last_updated":null
}


List users

Arguments

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

Example Request

cURL

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

PHP


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

Example Response

{
    "http": 200,
    "offset": 0,
    "limit": 3,
    "total_users": "10",
    "next": "https://api.signable.co.uk/v1/users?offset=3&limit=7",
    "users": [
        {
            "user_id": 1000,
            "team_id": 1234,
            "user_name": "John Smith",
            "user_email": "john@smith.com",
            "user_added": "2010-01-07T10:24:59+0000",
            "user_last_updated": "2013-07-26T19:39:12+0000"
        },
		{
            "user_id": 1001,
            "team_id": 1234,
            "user_name": "Jane Smith",
            "user_email": "jane@smith.com",
            "user_added": "2010-01-07T10:24:59+0000",
            "user_last_updated": "2013-07-26T19:39:12+0000"
        },
		{
            "user_id": 1002,
            "team_id": 1235,
            "user_name": "Joe Smith",
            "user_email": "joe@smith.com",
            "user_added": "2010-01-07T10:24:59+0000",
            "user_last_updated": "2013-07-26T19:39:12+0000"
        },
]
}


Update a user

Arguments

Argument Required/optional Description
id required A positive integer representing the user_id of the user you want to update
user_name optional A string of the new name of the user. Either user_name or user_email must be provided.
user_email optional A string of the new email of the user. Either user_name or user_email must be provided.
team_id optional An integer representing a valid team_id. If passed in, it must be a valid team_id for the company.

Example Request

cURL

curl https:/api.signable.co.uk/v1/users/1000 
   -u d41d8cd98f00b204e9800998ecf8427e:x 
   -X PUT 
   -d "user_name=Jim Smith" 
   -d "user_email=jim@smith.com"
		

PHP


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

Example Response


{
	"http":200,
	"message":"Jim Smith has been updated in your user list.",
	"href":"https://api.signable.co.uk/v1/users/1000",
	"user_id":1000,
        "team_id":1234,
	"user_name":"Jim Smith",
	"user_email":"jim@smith.com",
	"user_password_changed":false,
	"user_updated":"2013-10-25T12:17:37+0000"
}


Delete a user

Arguments

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

Example Request

cURL

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

PHP


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

Example Response

{
    "http": 200,
    "message": "Jim Smith has been removed from your user list.",
    "user_id": 1000,
    "team_id": 1234,
    "user_email": "jim@smith.com",
    "user_name": "Jim Smith"
}