Templates
Get available verification templates
List Verification Templates
Verification Templates define the specific sequence of checks a user must complete (e.g., "Email only", or "ID Document + Selfie Scan").
You can use this endpoint to programmatically fetch a list of all available templates configured in your account. This is essential for dynamically assigning the correct verification flow to a user when you create or update them via the API.
GET
https://{sub-domain}.trustswiftly.com/api/settings/templates/verifications
Authentication
Authentication is handled via the Authorization
header. There are no path or query parameters for this endpoint.
Authorization
string
Yes
Your secret API key, prefixed with Bearer
.
Accept
string
Yes
Must be application/json
.
Understanding the Response Body
The endpoint returns an array of your configured Verification Template objects. Each object contains the template's ID and the types of checks it includes.
id
number
The internal numeric identifier for the template.
name
string
The Template ID (e.g., tmpl_MQ
). This is the value you must use in the template_id
field when creating or updating users.
types
array
A list of the verification methods included in this template (e.g., "Email", "Document / ID").
Example Request & Response
Request
curl --request GET \
--url 'https://{sub-domain}.trustswiftly.com/api/settings/templates/verifications' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Accept: application/json'
Response
The response will be an array of all templates available in your account.
[
{
"id": 1,
"name": "tmpl_MQ",
"types": [
"Email"
]
},
{
"id": 2,
"name": "tmpl_Mg",
"types": [
"Phone / SMS",
"Document / ID"
]
},
{
"id": 3,
"name": "tmpl_Mw",
"types": [
"Phone / SMS",
"Document / ID",
"Selfie"
]
}
]
What's Next: Using a Template ID
After you've fetched your templates, you can use the value from the name
field to assign a verification flow to a user.
For example, if you want to assign the second template from the response above (tmpl_Mg
) to a new user, your API call to create the user would look like this:
# Example of using a template_id when creating a user
curl --request POST \
--url https://app.trustswiftly.com/api/users \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"reference_id": "user_12345",
"email": "[email protected]",
"template_id": "tmpl_Mg" // <-- The ID from the templates endpoint
}'
For more details, see the Create User API documentation.
Last updated