Users
The API Key can be generated within your developer settings.
Get Users
GET
https://{sub-domain}.trustswiftly.com/api/users
List all the users currently assigned a profile.
Headers
Authorization
string
is used for server-to-server communication to fetch sensitive data that you already have access to.
{
"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/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 --location --request GET 'https://{sub-domain}.trustswiftly.com/api/users' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--header 'User-Agent: TrustSwiftly/1.0'
Get User
GET
https://{sub-domain}.trustswiftly.com/api/users/{id}
Retrieve a specific users profile.
Headers
Authorization
string
API Key
is used for server-to-server communication to fetch sensitive data that you already have access to.
{
"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 --location --request GET 'https://{sub-domain}.trustswiftly.com/api/users/2' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--header 'User-Agent: TrustSwiftly/1.0'
Create User
POST
https://{sub-domain}.trustswiftly.com/api/users
Create a given users profile.
Headers
Authorization
string
is used for server-to-server communication to fetch sensitive data that you already have access to.
Request Body
notice
string
Display a notice on the dashboard for users such as custom instructions.
string
Required. Customer's email address.
send_link
boolean
Send a verify link to the user via email.
template_id
string
ID of the verification template you wish to assign to this user.
reference_id
string
An ID you can pass that correlates to your own system's user ID.
last_name
string
Users last name.
first_name
string
Users first name.
username
string
A unique username for the given user.
send_sms
boolean
Send a verify link to the user via SMS.
custom_verify_data
json string
A json string listing any data validation requirements for a user during document verification. i.e. "custom_verify_data": {"last_name": "Smith"}
order_id
string
If the user is associated with a specific order or transaction.
completion_url
string
Optional custom URL unique per user to redirect to when verifications are completed. Otherwise in General Settings a URL can be set as default.
deaNumber
string
Optional DEA Number for validating a registration with the government data source.
{
"status": "success",
"id": 69,
"magic_link": "https:\/\/test.trustswiftly.com\\/security-verify?expires=1325603631&key=16RWTtJRKTwjFIQCGWDEZrWkW4Qq2DdvfUQhdadug3AVwWu5mbZht&signature=768898ec51b20a623ba813969215f23785b784f213d04c0046265b3c6"
}
curl --location --request POST 'https://{sub-domain}.trustswiftly.com/api/users' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw '{
"email": "[email protected]",
"template_id": "tmpl_MQ"
}'
Update User
PATCH
https://{sub-domain}.trustswiftly.com/api/users/{id}
Update a provided user.
Headers
Authorization
string
is used for server-to-server communication to fetch sensitive data that you already have access to.
Request Body
string
Customers email address.
username
string
A unique username for the given user.
first_name
string
Users first name
last_name
string
Users last name
status
string
The user's status. Accepted values: Unconfirmed, Active, Verified, Banned, Review.
phone
string
Phone including international code.
reference_id
string
An ID you can pass that correlates to your own systems user ID.
template_id
string
ID of the verification template you wish to assign to this user.
custom_verify_data
String
A json string listing any data validation requirements for a user during document verification.
order_id
string
If the user is associated with a specific order or transaction.
curl --location --request PATCH 'https://{sub-domain}.trustswiftly.com/api/users/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw '{
"first_name": "New",
"last_name": "Name",
"template_id": "tmpl_MQ"
}'
Update Verification
PATCH
https://{sub-domain}.trustswiftly.com/api/users/{id}/verifications
Update a status of a verification
Headers
Authorization
string
is used for server-to-server communication to fetch sensitive data that you already have access to.
Request Body
verification_id
string
The ID corresponding to the verification name
status
string
The status to update the verification
curl --location --request PATCH 'https://{sub-domain}.trustswiftly.com/api/users/1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw '{
"verification_id": "7",
"status": "2"
}
Delete User
DELETE
https://{sub-domain}.trustswiftly.com/api/users/{id}
Delete a provided user.
Headers
Authorization
string
is used for server-to-server communication to fetch sensitive data that you already have access to
{
"success": true
}
curl --location --request DELETE 'https://{sub-domain}.trustswiftly.com/api/users/1' \
--header 'Authorization: Bearer {api_key}' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw ''
Get Verify Link
POST
https://{sub-domain}.trustswiftly.com/api/users/{id}/verify-url
Generate a verify link used for user authentication
Headers
Authorization
string
is used for server-to-server communication to fetch sensitive data that you already have access to.
Request Body
expiration_hours
integer
Hour(s) in which the magic link will remain alive before expiring.
{
"short_url": "https://tinyurl.com/y32d35rf",
"full_url": "https://{sub-domain}.trustswiftly.com/security-verify?expires=1610753625&key=7&signature=3949637e17906a42bd3d0254af80a825f2696b9ba948cdf3654f0e354a2f6cef"
}
curl --location --request POST 'https://{sub-domain}.trustswiftly.com/api/users/1/verify-url' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_key}' \
--header 'User-Agent: TrustSwiftly/1.0' \
--data-raw '{
"expiration_hours": 24
}'
Last updated