curl --request PUT \
--url https://api.smokeball.com/staff/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"title": "Mr",
"firstName": "John",
"middleName": "",
"lastName": "Smith",
"initials": "JS",
"phone": {
"areaCode": "555",
"number": "1234567"
},
"cell": {
"areaCode": "555",
"number": "1234567"
},
"email": "john.smith@brown.com",
"role": "Bookkeeper",
"avatar": "https://example-avatar-url.com/image",
"former": false,
"colorFill": "#797d85",
"colorStroke": "#64666a"
}
'import requests
url = "https://api.smokeball.com/staff/{id}"
payload = {
"userId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"title": "Mr",
"firstName": "John",
"middleName": "",
"lastName": "Smith",
"initials": "JS",
"phone": {
"areaCode": "555",
"number": "1234567"
},
"cell": {
"areaCode": "555",
"number": "1234567"
},
"email": "john.smith@brown.com",
"role": "Bookkeeper",
"avatar": "https://example-avatar-url.com/image",
"former": False,
"colorFill": "#797d85",
"colorStroke": "#64666a"
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
userId: 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
title: 'Mr',
firstName: 'John',
middleName: '',
lastName: 'Smith',
initials: 'JS',
phone: {areaCode: '555', number: '1234567'},
cell: {areaCode: '555', number: '1234567'},
email: 'john.smith@brown.com',
role: 'Bookkeeper',
avatar: 'https://example-avatar-url.com/image',
former: false,
colorFill: '#797d85',
colorStroke: '#64666a'
})
};
fetch('https://api.smokeball.com/staff/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smokeball.com/staff/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'userId' => 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
'title' => 'Mr',
'firstName' => 'John',
'middleName' => '',
'lastName' => 'Smith',
'initials' => 'JS',
'phone' => [
'areaCode' => '555',
'number' => '1234567'
],
'cell' => [
'areaCode' => '555',
'number' => '1234567'
],
'email' => 'john.smith@brown.com',
'role' => 'Bookkeeper',
'avatar' => 'https://example-avatar-url.com/image',
'former' => false,
'colorFill' => '#797d85',
'colorStroke' => '#64666a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smokeball.com/staff/{id}"
payload := strings.NewReader("{\n \"userId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"title\": \"Mr\",\n \"firstName\": \"John\",\n \"middleName\": \"\",\n \"lastName\": \"Smith\",\n \"initials\": \"JS\",\n \"phone\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"cell\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"email\": \"john.smith@brown.com\",\n \"role\": \"Bookkeeper\",\n \"avatar\": \"https://example-avatar-url.com/image\",\n \"former\": false,\n \"colorFill\": \"#797d85\",\n \"colorStroke\": \"#64666a\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.smokeball.com/staff/{id}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"userId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"title\": \"Mr\",\n \"firstName\": \"John\",\n \"middleName\": \"\",\n \"lastName\": \"Smith\",\n \"initials\": \"JS\",\n \"phone\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"cell\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"email\": \"john.smith@brown.com\",\n \"role\": \"Bookkeeper\",\n \"avatar\": \"https://example-avatar-url.com/image\",\n \"former\": false,\n \"colorFill\": \"#797d85\",\n \"colorStroke\": \"#64666a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/staff/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"userId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"title\": \"Mr\",\n \"firstName\": \"John\",\n \"middleName\": \"\",\n \"lastName\": \"Smith\",\n \"initials\": \"JS\",\n \"phone\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"cell\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"email\": \"john.smith@brown.com\",\n \"role\": \"Bookkeeper\",\n \"avatar\": \"https://example-avatar-url.com/image\",\n \"former\": false,\n \"colorFill\": \"#797d85\",\n \"colorStroke\": \"#64666a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Update firm staff member
Updates a staff member in the firm associated with the authenticated client.
curl --request PUT \
--url https://api.smokeball.com/staff/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"title": "Mr",
"firstName": "John",
"middleName": "",
"lastName": "Smith",
"initials": "JS",
"phone": {
"areaCode": "555",
"number": "1234567"
},
"cell": {
"areaCode": "555",
"number": "1234567"
},
"email": "john.smith@brown.com",
"role": "Bookkeeper",
"avatar": "https://example-avatar-url.com/image",
"former": false,
"colorFill": "#797d85",
"colorStroke": "#64666a"
}
'import requests
url = "https://api.smokeball.com/staff/{id}"
payload = {
"userId": "b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2",
"title": "Mr",
"firstName": "John",
"middleName": "",
"lastName": "Smith",
"initials": "JS",
"phone": {
"areaCode": "555",
"number": "1234567"
},
"cell": {
"areaCode": "555",
"number": "1234567"
},
"email": "john.smith@brown.com",
"role": "Bookkeeper",
"avatar": "https://example-avatar-url.com/image",
"former": False,
"colorFill": "#797d85",
"colorStroke": "#64666a"
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
userId: 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
title: 'Mr',
firstName: 'John',
middleName: '',
lastName: 'Smith',
initials: 'JS',
phone: {areaCode: '555', number: '1234567'},
cell: {areaCode: '555', number: '1234567'},
email: 'john.smith@brown.com',
role: 'Bookkeeper',
avatar: 'https://example-avatar-url.com/image',
former: false,
colorFill: '#797d85',
colorStroke: '#64666a'
})
};
fetch('https://api.smokeball.com/staff/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.smokeball.com/staff/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'userId' => 'b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2',
'title' => 'Mr',
'firstName' => 'John',
'middleName' => '',
'lastName' => 'Smith',
'initials' => 'JS',
'phone' => [
'areaCode' => '555',
'number' => '1234567'
],
'cell' => [
'areaCode' => '555',
'number' => '1234567'
],
'email' => 'john.smith@brown.com',
'role' => 'Bookkeeper',
'avatar' => 'https://example-avatar-url.com/image',
'former' => false,
'colorFill' => '#797d85',
'colorStroke' => '#64666a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.smokeball.com/staff/{id}"
payload := strings.NewReader("{\n \"userId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"title\": \"Mr\",\n \"firstName\": \"John\",\n \"middleName\": \"\",\n \"lastName\": \"Smith\",\n \"initials\": \"JS\",\n \"phone\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"cell\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"email\": \"john.smith@brown.com\",\n \"role\": \"Bookkeeper\",\n \"avatar\": \"https://example-avatar-url.com/image\",\n \"former\": false,\n \"colorFill\": \"#797d85\",\n \"colorStroke\": \"#64666a\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.smokeball.com/staff/{id}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"userId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"title\": \"Mr\",\n \"firstName\": \"John\",\n \"middleName\": \"\",\n \"lastName\": \"Smith\",\n \"initials\": \"JS\",\n \"phone\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"cell\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"email\": \"john.smith@brown.com\",\n \"role\": \"Bookkeeper\",\n \"avatar\": \"https://example-avatar-url.com/image\",\n \"former\": false,\n \"colorFill\": \"#797d85\",\n \"colorStroke\": \"#64666a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/staff/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"userId\": \"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2\",\n \"title\": \"Mr\",\n \"firstName\": \"John\",\n \"middleName\": \"\",\n \"lastName\": \"Smith\",\n \"initials\": \"JS\",\n \"phone\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"cell\": {\n \"areaCode\": \"555\",\n \"number\": \"1234567\"\n },\n \"email\": \"john.smith@brown.com\",\n \"role\": \"Bookkeeper\",\n \"avatar\": \"https://example-avatar-url.com/image\",\n \"former\": false,\n \"colorFill\": \"#797d85\",\n \"colorStroke\": \"#64666a\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Path Parameters
Body
Unique identifier of the associated user. Used to map staff member to the specified user id and ignored if left blank. Use the FirmUsers API to remove a staff/user mapping.
"b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2"
Staff member's title.
"Mr"
Staff member's first name.
"John"
Staff member's middle name (if applicable).
""
Staff member's last name.
"Smith"
Staff member's initials.
"JS"
Staff member's phone number.
Show child attributes
Show child attributes
Staff member's cell number.
Show child attributes
Show child attributes
Staff member's email address.
"john.smith@brown.com"
Staff member's role.
"Bookkeeper"
Staff member's avatar.
"https://example-avatar-url.com/image"
Whether he/she is a former member.
Caution: Setting a staff member to former staff will also deregister them from the firm.
false
Staff member's fill color hex code.
"#797d85"
Staff member's stroke color hex code.
"#64666a"