Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Name
Type
Description

Authorization

string

API Key

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": "codecept_user@trustswiftly.dev",
            "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"
        }
    ]
}

Get User

GET https://{sub-domain}.trustswiftly.com/api/users/{id}

Retrieve a specific users profile.

Headers

Name
Type
Description

Authorization

string

API Key

is used for server-to-server communication to fetch sensitive data that you already have access to.

Create User

POST https://{sub-domain}.trustswiftly.com/api/users

Create a given users profile.

Headers

Name
Type
Description

Authorization

string

API Key

is used for server-to-server communication to fetch sensitive data that you already have access to.

Request Body

Name
Type
Description

notice

string

Display a notice on the dashboard for users such as custom instructions.

email

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.

phone

string

Phone including international code. Example +13129450121. It must be in E164 format.

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.

Update User

PATCH https://{sub-domain}.trustswiftly.com/api/users/{id}

Update a provided user.

Headers

Name
Type
Description

Authorization

string

API Key

is used for server-to-server communication to fetch sensitive data that you already have access to.

Request Body

Name
Type
Description

email

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.

Update Verification

PATCH https://{sub-domain}.trustswiftly.com/api/users/{id}/verifications

Update a status of a verification

Headers

Name
Type
Description

Authorization

string

API Key

is used for server-to-server communication to fetch sensitive data that you already have access to.

Request Body

Name
Type
Description

verification_id

string

The ID corresponding to the verification name.

status

string

The status to update the verification

current_workflow_id

string

Optional unless verification_id = 3

Fetch verification mappings

The response includes stable key values and numeric id values for verification methods and statuses. API requests accept either form.

Common method keys:

Key
ID
Name

document_id

3

Document / ID

secure_card

7

Secure Card

geolocation

8

Geolocation

biometric_id

13

Biometric ID

liveness

20

Liveness

knowledge

21

Knowledge

Common status keys:

Key
ID

assigned

0

processing

1

complete

2

rejected

3

complete_in_review

4

reset

5

removed

6

Update a verification status

The legacy numeric form still works:

Mark a document workflow complete

For Document / ID, include current_workflow_id. Fetch workflow IDs from:

That endpoint returns:

  • id: legacy public ID, accepted by the update API.

  • encoded_id: stable encoded ID, accepted by the update API.

  • raw_id: internal workflow ID.

The API marks the selected user workflow complete. The overall document_id verification is marked complete once all of the user's assigned document workflows are complete or complete in review.

Remove an assigned verification method

Example:

This removes a method only while it is still assigned. Completed or rejected methods return verification_not_removable so historical verification evidence is not deleted accidentally. For Document / ID, assigned document workflows are also removed when the method is removed.

Delete User

DELETE https://{sub-domain}.trustswiftly.com/api/users/{id}

Delete a provided user.

Headers

Name
Type
Description

Authorization

string

API Key

is used for server-to-server communication to fetch sensitive data that you already have access to

POST https://{sub-domain}.trustswiftly.com/api/users/{id}/verify-url

Generate a verify link used for user authentication

Headers

Name
Type
Description

Authorization

string

API Key

is used for server-to-server communication to fetch sensitive data that you already have access to.

Request Body

Name
Type
Description

expiration_hours

integer

Hour(s) in which the magic link will remain alive before expiring.

Last updated