Users

The API Key can be generated within your account settings.

get
Get Users

https://{sub-domain}.trustswiftly.com/account/api/users
List all the users currently assigned a profile.
Request
Response
Request
Headers
Authorization
required
string
API Key is used for server-to-server communication to fetch sensitive data that you already have access to.
Response
200: OK
Succesful response
{
"data": [
{
"id": 5,
"first_name": "AutoTest",
"last_name": "User",
"username": "codecept_user",
"email": "[email protected]",
"verifications": [
{
"id": 1,
"name": "Email",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 2,
"name": "Phone / SMS",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 3,
"name": "Document / ID",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 4,
"name": "PayPal",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 5,
"name": "Video",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 6,
"name": "Voice",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 7,
"name": "Secure Card",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 8,
"name": "Geolocation",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 9,
"name": "Social Account",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 10,
"name": "Two-Step Authentication",
"status": {
"value": 0,
"friendly": "Pending"
}
}
],
"phone": null,
"avatar": "https://cdn.trustswiftly.com/account/assets/img/profile.png",
"address": null,
"country_id": null,
"role_id": 2,
"status": "Active",
"birthday": null,
"last_login": "2020-09-07 19:56:35",
"two_factor_country_code": 0,
"two_factor_phone": "",
"two_factor_options": null,
"email_verified_at": null,
"created_at": "2020-09-11 01:33:51",
"updated_at": "2020-09-11 01:33:51"
}
]
}
cURL
cURL
curl --location --request GET 'https://{sub-domain}.trustswiftly.com/account/api/users' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1|GqRQaD0nMBmGkIKLiPuOPLAckxhupWyjVEZKjsj1' \
--header 'User-Agent: TrustSwiftly/1.0'

get
Get User

https://{sub-domain}.trustswiftly.com/account/api/users/{id}
Retrieve a specific users profile.
Request
Response
Request
Headers
Authorization
required
string
API Key is used for server-to-server communication to fetch sensitive data that you already have access to.
Response
200: OK
{
"data": {
"id": 7,
"first_name": "New",
"last_name": "Name",
"username": "Verify_User2101131027492493",
"email": "[email protected]",
"verifications": [
{
"id": 1,
"name": "Email",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 2,
"name": "Phone / SMS",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 3,
"name": "Document / ID",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 4,
"name": "PayPal",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 5,
"name": "Video",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 6,
"name": "Voice",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 7,
"name": "Secure Card",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 8,
"name": "Geolocation",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 9,
"name": "Social Account",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 10,
"name": "Two-Step Authentication",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 11,
"name": "Bank",
"status": {
"value": 0,
"friendly": "Pending"
}
},
{
"id": 12,
"name": "Live Video",
"status": {
"value": 0,
"friendly": "Pending"
}
}
],
"phone": null,
"avatar": "https://images.trustswiftly.com/public/avatars/none.png",
"address": null,
"country_id": null,
"role_id": 2,
"status": "Active",
"birthday": null,
"last_login": "2021-01-14 03:33:33",
"two_factor_country_code": 0,
"two_factor_phone": "",
"two_factor_options": null,
"email_verified_at": null,
"created_at": "2021-01-13 22:27:49",
"updated_at": "2021-01-14 03:33:33"
}
}
cURL
cURL
curl --location --request GET 'https://{sub-domain}.trustswiftly.com/account/api/users/2' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1|GqRQaD0nMBmGkIKLiPuOPLAckxhupWyjVEZKjsj1' \
--header 'User-Agent: TrustSwiftly/1.0'

post
Create User

https://{sub-domain}.trustswiftly.com/account/api/users
Create a given users profile.
Request
Response
Request
Headers
Authorization
required
string
API Key is used for server-to-server communication to fetch sensitive data that you already have access to.
Body Parameters
email
required
string
Customer's email address.
send_link
optional
boolean
Send a magic link to the user.
template_id
optional
integer
ID of the verification template you wish to assign to this user.
reference_id
optional
string
An ID you can pass that correlates to your own system's user/account ID.
phone
optional
integer
Phone including international code.
last_name
optional
string
Users last name.
first_name
optional
string
Users first name.
username
optional
string
A unique username for the given user.
Response
200: OK
{
"status": "success",
"id": 7,
"token": "MnxMeUwxUUxUWXFQTFdObVhPTm1FYnFlU1cxZ2IwOElzcE9qUmdUN1Ra"
"magic_link": "https:\/\/www.trustswiftly.com\/account\/security-verify?email=1&expires=1616798987&key=13srgDmUj4hjySJAaaCi2d1hPx3ETvQHFDBfAgD1o5BsEaCsdzFc&signature=330beea028779412193ada9217f14b77e6a168c3d634afbf222418e1e5022f34"
}
cURL
cURL
curl --location --request POST 'https://{sub-domain}.trustswiftly.com/account/api/users' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1|GqRQaD0nMBmGkIKLiPuOPLAckxhupWyjVEZKjsj1' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw '{
"email": "[email protected]"
}'

patch
Update User

https://{sub-domain}.trustswiftly.com/account/api/users/{id}
Update a provided user.
Request
Response
Request
Headers
Authorization
required
string
API Key is used for server-to-server communication to fetch sensitive data that you already have access to.
Body Parameters
username
optional
string
A unique username for the given user.
first_name
optional
string
Users first name
last_name
optional
string
Users last name
phone
optional
integer
Phone including international code.
reference_id
optional
string
An ID you can pass that correlates to your own systems user/account ID.
template_id
optional
string
ID of the verification template you wish to assign to this user.
email
optional
string
Customers email address.
Response
200: OK
cURL
cURL
curl --location --request PATCH 'https://{sub-domain}.trustswiftly.com/account/api/users/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 2|GM2loELoTfc8rXC0PoC4WagW2eEQzE1AxhsqQ8Sn' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw '{
"first_name": "New",
"last_name": "Name",
"template_id": 3
}'

delete
Delete User

https://{sub-domain}.trustswiftly.com/account/api/users/{id}
Delete a provided user.
Request
Response
Request
Headers
Authorization
required
string
API Key is used for server-to-server communication to fetch sensitive data that you already have access to
Response
200: OK
cURL
cURL
curl --location --request DELETE 'https://{sub-domain}.trustswiftly.com/account/api/users/1' \
--header 'Authorization: Bearer 1|GqRQaD0nMBmGkIKLiPuOPLAckxhupWyjVEZKjsj1' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw ''
https://{sub-domain}.trustswiftly.com/account/api/users/{id}/verify-url
Generate a magic link used for user authentication
Request
Response
Request
Headers
Authorization
required
string
API Key is used for server-to-server communication to fetch sensitive data that you already have access to.
Body Parameters
expiration_hours
optional
integer
Hour(s) in which the magic link will remain alive before expiring.
Response
200: OK
{
"short_url": "https://tinyurl.com/y32d35rf",
"full_url": "https://{sub-domain}.trustswiftly.com/account/security-verify?expires=1610753625&key=7&signature=3949637e17906a42bd3d0254af80a825f2696b9ba948cdf3654f0e354a2f6cef"
}
cURL
cURL
curl --location --request POST 'https://{sub-domain}.trustswiftly.com/account/api/users/1/verify-url' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1|GM2loELoTfc8rXC0PoC4WagW2eEQzE1AxhsqQ8Sn' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw '{
"expiration_hours": 24
}'