1. Partner API v2
  2. Resources
  3. Users

Users

The people enrolled in a client's program.
4 endpointsScope readUserUserDetail
GET/v2/clients/{client_id}/users
RequiresreadscopeCursor-paginatedReturns Page of User

Defaults to active users. Each user carries a compact risk and training summary; use GET /users/{user_id} for the full breakdown.

Path parameters

client_idstringRequired

Client id (the client's INFIMA id).

Query parametersall optional unless marked

statusstring
One ofactiveinactiveall

Default "active"

rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
emailstring (email)

Exact, case-insensitive email match. The fastest way to look a user up.

qstring

Case-insensitive match on name or email.

collection_idstring

Only members of this collection.

group_idstring

Only members of this directory group. Not available yet (directory groups do not have ids in this version); sending it returns 400.

updated_sincestring (date-time)

Only objects whose updated_at is at or after this time. Use it for delta syncs.

sortstring
One ofemail-emaillast_name-last_namerisk_score-risk_scorecreated_at-created_at

Default "email"

limitinteger

Default 100min 1 · max 500

cursorstring

Opaque cursor from the previous page's page.next_cursor.

curl "https://app.infimasecapis.com/v2/clients/3f2a9c1e-7b44-5d2e-9a1f-0c6d8e4b2a10/users" \
  -H "X-API-Key: $INFIMA_API_KEY"
Response objectPage of User
dataarray of User
Show item properties(17)
idstring
client_idstring
emailstring (email)
first_namestring
last_namestring
departmentstringNullable
job_titlestringNullable
manager_emailstring (email)Nullable
statusstring
One ofactiveinactive
rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
preferred_languagestring
One ofenesfr-ca
sourcestring

Where the user record came from: a directory sync (microsoft, google), added in the dashboard (manual), or created through this API (api). A manual or API user that a directory sync later picks up reports the directory.

One ofmicrosoftgooglemanualapi
groupobjectNullable

The directory group or manual group the user belongs to.

Show properties(2)
idstring
namestring
riskobject
Show properties(2)
scoreinteger
gradestring

Letter grade derived from the score. A is 800 and above, B 700, C 600, D 400, F below 400.

One ofABCDF
trainingobject
Show properties(3)
on_trackboolean
overdue_countinteger
next_courseobjectNullable
Show properties(3)
course_idstring
titlestring
due_onstring (date)
created_atstring (date-time)
updated_atstring (date-time)
pageobject
Show properties(2)
next_cursorstringNullable

Pass as cursor to fetch the next page. Null on the last page.

has_moreboolean
POST/v2/clients/{client_id}/users
RequireswritescopeReturns User

Adds a single user to the client outside directory sync, the same as adding a user in the dashboard. The user lands in the client's Manual group, is classified into a risk role from job title, department, and email (or takes the role you send, which is kept as a manual override), and picks up any framework-required courses within a few minutes. Users created here report source: api.

collection_ids places the user in a collection of the same client. A user belongs to at most one collection, so send at most one id.

Welcome email. With send_welcome_email false (the default) the user never gets a welcome email. With true the user is left for the client's scheduled welcome-email run, which sends it once, honoring the client's welcome-email settings (it must be enabled for the client, and the business-day delay and first-send date apply). Nothing is sent from this request.

An email that already belongs to a user of the client (active or inactive) returns 409 CONFLICT; update that user instead. If the client uses directory sync, prefer letting sync create users; a manually created user with the same email is merged on the next sync and then reports the directory as its source.

Path parameters

client_idstringRequired

Client id (the client's INFIMA id).

Request bodyapplication/json · UserCreate

emailstring (email)Required
first_namestring
last_namestring
departmentstring
job_titlestring
manager_emailstring (email)
rolestring

Omit to let INFIMA classify from job title, department, and email.

One ofadminexecutivehrfinancestandard
preferred_languagestring
One ofenesfr-ca
collection_idsarray of string

Collections of the same client to add the user to. A user belongs to at most one collection.

max 1 items

send_welcome_emailboolean

Leave the user for the client's scheduled welcome email. When false the user is never sent one.

Default false

curl -X POST "https://app.infimasecapis.com/v2/clients/3f2a9c1e-7b44-5d2e-9a1f-0c6d8e4b2a10/users" \
  -H "X-API-Key: $INFIMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "maria.lopez@acme-mfg.com",
    "first_name": "Maria",
    "last_name": "Lopez",
    "department": "Finance",
    "job_title": "Accounts Payable Specialist",
    "manager_email": "sam.ortiz@acme-mfg.com",
    "role": "admin",
    "preferred_language": "en",
    "collection_ids": [
      "6f1c2a7e-3b9d-4c1a-9e8f-0a1b2c3d4e5f"
    ],
    "send_welcome_email": false
  }'
Response objectUser
idstring
client_idstring
emailstring (email)
first_namestring
last_namestring
departmentstringNullable
job_titlestringNullable
manager_emailstring (email)Nullable
statusstring
One ofactiveinactive
rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
preferred_languagestring
One ofenesfr-ca
sourcestring

Where the user record came from: a directory sync (microsoft, google), added in the dashboard (manual), or created through this API (api). A manual or API user that a directory sync later picks up reports the directory.

One ofmicrosoftgooglemanualapi
groupobjectNullable

The directory group or manual group the user belongs to.

Show properties(2)
idstring
namestring
riskobject
Show properties(2)
scoreinteger
gradestring

Letter grade derived from the score. A is 800 and above, B 700, C 600, D 400, F below 400.

One ofABCDF
trainingobject
Show properties(3)
on_trackboolean
overdue_countinteger
next_courseobjectNullable
Show properties(3)
course_idstring
titlestring
due_onstring (date)
created_atstring (date-time)
updated_atstring (date-time)
Errors400Invalid request404Not found within the key's access409The object already existsError envelope →
GET/v2/users/{user_id}
RequiresreadscopeReturns UserDetail

Full user record including the risk breakdown and current training position.

Path parameters

user_idstringRequired

User id (the user's INFIMA id).

curl "https://app.infimasecapis.com/v2/users/b7e1c0d2-44aa-5f9e-8c33-1a2b3c4d5e6f" \
  -H "X-API-Key: $INFIMA_API_KEY"
Response objectUserDetail
idstring
client_idstring
emailstring (email)
first_namestring
last_namestring
departmentstringNullable
job_titlestringNullable
manager_emailstring (email)Nullable
statusstring
One ofactiveinactive
rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
preferred_languagestring
One ofenesfr-ca
sourcestring

Where the user record came from: a directory sync (microsoft, google), added in the dashboard (manual), or created through this API (api). A manual or API user that a directory sync later picks up reports the directory.

One ofmicrosoftgooglemanualapi
groupobjectNullable

The directory group or manual group the user belongs to.

Show properties(2)
idstring
namestring
riskUserRisk
Show properties(7)
scoreinteger
gradestring

Letter grade derived from the score. A is 800 and above, B 700, C 600, D 400, F below 400.

One ofABCDF
baselineinteger

The starting score for the user's role before signals are applied.

rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
talliesobject

Raw counts over the trailing 12 months. The score applies recency weighting internally.

Show properties(11)
courses_completedinteger
phishing_clicksinteger
phishing_reportsinteger
credential_submissionsinteger
attachments_openedinteger
real_phish_reportedinteger
password_breaches_activeinteger
password_breaches_resolvedinteger
pii_breachesinteger
basic_breachesinteger
dormant_on_trainingboolean
factorsarray of object

Each signal's signed contribution, role multiplier applied.

Show item properties(3)
keystring
labelstring
deltainteger
computed_atstring (date-time)
trainingobject
Show properties(3)
on_trackboolean
overdue_countinteger
next_courseobjectNullable
Show properties(3)
course_idstring
titlestring
due_onstring (date)
created_atstring (date-time)
updated_atstring (date-time)
collectionsarray of object
Show item properties(2)
idstring
namestring
dark_webobjectNullable

Null when Dark Web Monitoring is not enabled for the client.

Show properties(3)
unresolved_exposuresinteger
resolved_exposuresinteger
highest_severitystring

critical = passwords exposed; high = sensitive personal data; medium = basic account data; low = spam lists.

One ofcriticalhighmediumlow
Errors404Not found within the key's accessError envelope →
PATCH/v2/users/{user_id}
RequireswritescopeReturns UserDetail

Partial update: only the fields present are changed, and a body that changes nothing is 400. Returns the updated user.

Directory sync. role, preferred_language and manager_email are kept as manual overrides, the same as editing them in the dashboard: the next directory sync does not overwrite them. first_name, last_name, department and job_title have no override; for a directory-synced user the next sync writes the directory's values back, so change those in the directory. manager_email: null removes the manager (also kept as an override).

Status. inactive deactivates the user exactly as the dashboard does: they stop receiving training and simulations, and their open training assignments are cleared (completions are kept). active reactivates them. If they have completed training before, their history is restored from the day they were added (completed courses and original due dates count again; unfinished ones come back overdue), which is the dashboard's default; otherwise they start fresh from today. A directory-synced user's status follows the directory on the next sync.

Path parameters

user_idstringRequired

User id (the user's INFIMA id).

Request bodyapplication/json · UserUpdate

statusstring
One ofactiveinactive
first_namestring
last_namestring
departmentstring
job_titlestring
manager_emailstring (email)Nullable
rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
preferred_languagestring
One ofenesfr-ca
curl -X PATCH "https://app.infimasecapis.com/v2/users/b7e1c0d2-44aa-5f9e-8c33-1a2b3c4d5e6f" \
  -H "X-API-Key: $INFIMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "active",
    "first_name": "Maria",
    "last_name": "Lopez",
    "department": "Finance",
    "job_title": "Accounts Payable Specialist",
    "manager_email": "sam.ortiz@acme-mfg.com",
    "role": "admin",
    "preferred_language": "en"
  }'
Response objectUserDetail
idstring
client_idstring
emailstring (email)
first_namestring
last_namestring
departmentstringNullable
job_titlestringNullable
manager_emailstring (email)Nullable
statusstring
One ofactiveinactive
rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
preferred_languagestring
One ofenesfr-ca
sourcestring

Where the user record came from: a directory sync (microsoft, google), added in the dashboard (manual), or created through this API (api). A manual or API user that a directory sync later picks up reports the directory.

One ofmicrosoftgooglemanualapi
groupobjectNullable

The directory group or manual group the user belongs to.

Show properties(2)
idstring
namestring
riskUserRisk
Show properties(7)
scoreinteger
gradestring

Letter grade derived from the score. A is 800 and above, B 700, C 600, D 400, F below 400.

One ofABCDF
baselineinteger

The starting score for the user's role before signals are applied.

rolestring

The role used to weight a user's risk signals.

One ofadminexecutivehrfinancestandard
talliesobject

Raw counts over the trailing 12 months. The score applies recency weighting internally.

Show properties(11)
courses_completedinteger
phishing_clicksinteger
phishing_reportsinteger
credential_submissionsinteger
attachments_openedinteger
real_phish_reportedinteger
password_breaches_activeinteger
password_breaches_resolvedinteger
pii_breachesinteger
basic_breachesinteger
dormant_on_trainingboolean
factorsarray of object

Each signal's signed contribution, role multiplier applied.

Show item properties(3)
keystring
labelstring
deltainteger
computed_atstring (date-time)
trainingobject
Show properties(3)
on_trackboolean
overdue_countinteger
next_courseobjectNullable
Show properties(3)
course_idstring
titlestring
due_onstring (date)
created_atstring (date-time)
updated_atstring (date-time)
collectionsarray of object
Show item properties(2)
idstring
namestring
dark_webobjectNullable

Null when Dark Web Monitoring is not enabled for the client.

Show properties(3)
unresolved_exposuresinteger
resolved_exposuresinteger
highest_severitystring

critical = passwords exposed; high = sensitive personal data; medium = basic account data; low = spam lists.

One ofcriticalhighmediumlow
Errors400Invalid request404Not found within the key's accessError envelope →