Create User
curl --request POST \
--url https://staging.debt-wise.com/api/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "John",
"last_name": "Smith",
"phone_number": "9891231230",
"email": "john_smith@debt-wise.com",
"ssn": "12345678",
"date_of_birth": "1993-03-03"
}
'import requests
url = "https://staging.debt-wise.com/api/users"
payload = {
"first_name": "John",
"last_name": "Smith",
"phone_number": "9891231230",
"email": "john_smith@debt-wise.com",
"ssn": "12345678",
"date_of_birth": "1993-03-03"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'John',
last_name: 'Smith',
phone_number: '9891231230',
email: 'john_smith@debt-wise.com',
ssn: '12345678',
date_of_birth: '1993-03-03'
})
};
fetch('https://staging.debt-wise.com/api/users', 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://staging.debt-wise.com/api/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'John',
'last_name' => 'Smith',
'phone_number' => '9891231230',
'email' => 'john_smith@debt-wise.com',
'ssn' => '12345678',
'date_of_birth' => '1993-03-03'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://staging.debt-wise.com/api/users"
payload := strings.NewReader("{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"9891231230\",\n \"email\": \"john_smith@debt-wise.com\",\n \"ssn\": \"12345678\",\n \"date_of_birth\": \"1993-03-03\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.debt-wise.com/api/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"9891231230\",\n \"email\": \"john_smith@debt-wise.com\",\n \"ssn\": \"12345678\",\n \"date_of_birth\": \"1993-03-03\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.debt-wise.com/api/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"9891231230\",\n \"email\": \"john_smith@debt-wise.com\",\n \"ssn\": \"12345678\",\n \"date_of_birth\": \"1993-03-03\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"first_name": "John",
"last_name": "Smith",
"phone_number": "9891231230",
"email": "john_smith@debt-wise.com",
"date_of_birth": "1993-03-03",
"ssn": "12345678"
}{
"error": {
"code": "validation_error",
"message": "Phone number can't be blank"
}
}{
"error": {
"code": "internal_server_error",
"message": "We've notified our engineers and hope to address this issue shortly."
}
}Users
Create User
Create a user from given parameters
POST
/
api
/
users
Create User
curl --request POST \
--url https://staging.debt-wise.com/api/users \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"first_name": "John",
"last_name": "Smith",
"phone_number": "9891231230",
"email": "john_smith@debt-wise.com",
"ssn": "12345678",
"date_of_birth": "1993-03-03"
}
'import requests
url = "https://staging.debt-wise.com/api/users"
payload = {
"first_name": "John",
"last_name": "Smith",
"phone_number": "9891231230",
"email": "john_smith@debt-wise.com",
"ssn": "12345678",
"date_of_birth": "1993-03-03"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: 'John',
last_name: 'Smith',
phone_number: '9891231230',
email: 'john_smith@debt-wise.com',
ssn: '12345678',
date_of_birth: '1993-03-03'
})
};
fetch('https://staging.debt-wise.com/api/users', 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://staging.debt-wise.com/api/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'John',
'last_name' => 'Smith',
'phone_number' => '9891231230',
'email' => 'john_smith@debt-wise.com',
'ssn' => '12345678',
'date_of_birth' => '1993-03-03'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://staging.debt-wise.com/api/users"
payload := strings.NewReader("{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"9891231230\",\n \"email\": \"john_smith@debt-wise.com\",\n \"ssn\": \"12345678\",\n \"date_of_birth\": \"1993-03-03\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.debt-wise.com/api/users")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"9891231230\",\n \"email\": \"john_smith@debt-wise.com\",\n \"ssn\": \"12345678\",\n \"date_of_birth\": \"1993-03-03\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.debt-wise.com/api/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"phone_number\": \"9891231230\",\n \"email\": \"john_smith@debt-wise.com\",\n \"ssn\": \"12345678\",\n \"date_of_birth\": \"1993-03-03\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"first_name": "John",
"last_name": "Smith",
"phone_number": "9891231230",
"email": "john_smith@debt-wise.com",
"date_of_birth": "1993-03-03",
"ssn": "12345678"
}{
"error": {
"code": "validation_error",
"message": "Phone number can't be blank"
}
}{
"error": {
"code": "internal_server_error",
"message": "We've notified our engineers and hope to address this issue shortly."
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
We can compress a response with gzip.
Example:
"gzip deflate"
API API Version. See Versioning page for more details.
Example:
"2024-07-01"
Body
application/json
User's first name
Example:
"John"
User's last name
Example:
"Smith"
User's US phone number. 10 digits without +
Example:
"9891231230"
User's email
Example:
"john_smith@debt-wise.com"
User's social security number. From 8 to 9 digits
Example:
"12345678"
User's date of birth
Example:
"1993-03-03"
Response
Returns a created user
User's id
Example:
1
User's first name
Example:
"John"
User's last name
Example:
"Smith"
User's US phone number. 10 digits without +
Example:
"9891231230"
User's email
Example:
"john_smith@debt-wise.com"
User's date of birth
Example:
"1993-03-03"
User's social security number. From 8 to 9 digits
Example:
"12345678"