1. Partner API v2
  2. Resources
  3. Frameworks

Frameworks

Compliance frameworks assigned to a client and how the client measures against them.
4 endpointsScope readFrameworkFrameworkAssignment
GET/v2/frameworks
RequiresreadscopeCursor-paginatedReturns Page of Framework

The compliance frameworks that can be assigned to a client, with their requirements. Returns every framework in a single page.

No parameters. Send the request with your API key.

curl "https://app.infimasecapis.com/v2/frameworks" \
  -H "X-API-Key: $INFIMA_API_KEY"
Response objectPage of Framework
dataarray of Framework
Show item properties(6)
idstring
namestring
categorystring
standard_refstringNullable
descriptionstring
requirementsarray of FrameworkRequirement
Show item properties(5)
keystring
typestring

Open enum.

One ofcourse_completiontraining_windowphishing_activephishing_coveragephishing_fail_ratedocument_acknowledgedreporting
namestring
descriptionstring
requiredboolean
pageobject
Show properties(2)
next_cursorstringNullable

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

has_moreboolean
GET/v2/clients/{client_id}/frameworks
RequiresreadscopeCursor-paginatedReturns Page of FrameworkAssignment

Each framework assigned to the client, the audience it applies to, and how the client currently measures against each requirement. Returns every assignment in a single page. This is the data behind the Compliance report.

Path parameters

client_idstringRequired

Client id (the client's INFIMA id).

curl "https://app.infimasecapis.com/v2/clients/3f2a9c1e-7b44-5d2e-9a1f-0c6d8e4b2a10/frameworks" \
  -H "X-API-Key: $INFIMA_API_KEY"
Response objectPage of FrameworkAssignment
dataarray of FrameworkAssignment
Show item properties(6)
idstring
frameworkobject
Show properties(3)
idstring
namestring
categorystring
audienceobject
Show properties(3)
typestring
One ofallgroupcollection
idstringNullable
namestringNullable
modulesobject
Show properties(4)
trainingboolean
phishingboolean
policiesboolean
reportingboolean
evaluationobject
Show properties(5)
metinteger
totalinteger
percentageinteger
requirementsarray of object
Show item properties(6)
keystring
namestring
metboolean
valuenumberNullable

The measured value where the requirement is numeric (for example completion percentage).

targetnumberNullable
detailstring
evaluated_atstring (date-time)
created_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}/frameworks
Requireswritescope

Assigns a framework to the whole client or to a collection, the way the dashboard's Compliance page does. Assigning a framework schedules its required courses for the audience, so this is a heavy action: send dry_run: true first to see what would be scheduled without changing anything, the same preview an admin sees.

  • framework_id is an id from GET /frameworks. A framework the client cannot take (one owned by another organization) returns 400.
  • audience is the whole client (all, the default) or one collection; users is not accepted here.
  • A framework already assigned to that audience returns 409.
  • modules.training: false records the assignment without scheduling courses.

Send an Idempotency-Key on the real call: a retried request replays the original 201 instead of assigning twice.

Returns 201: Assigned (or previewed when `dry_run` is true)

Path parameters

client_idstringRequired

Client id (the client's INFIMA id).

Request bodyapplication/json

framework_idstringRequired
audienceAudience

The whole client (all, default) or one collection. users is not accepted.

Show properties(3)
typestringRequired
One ofallcollectionusers
collection_idstring

Required when type is collection.

user_idsarray of string

Required when type is users.

modulesobject

Which parts of the framework to enforce. All true by default except policies.

Show properties(4)
trainingboolean

Default true

phishingboolean

Default true

policiesboolean

Default false

reportingboolean

Default true

dry_runboolean

Preview only. Nothing is assigned or scheduled; the response lists the courses that would be.

Default false

curl -X POST "https://app.infimasecapis.com/v2/clients/3f2a9c1e-7b44-5d2e-9a1f-0c6d8e4b2a10/frameworks" \
  -H "X-API-Key: $INFIMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "framework_id": "hipaa",
    "audience": {
      "type": "all",
      "collection_id": "6f1c2a7e-3b9d-4c1a-9e8f-0a1b2c3d4e5f",
      "user_ids": [
        "b7e1c0d2-44aa-5f9e-8c33-1a2b3c4d5e6f"
      ]
    },
    "modules": {
      "training": true,
      "phishing": true,
      "policies": false,
      "reporting": true
    },
    "dry_run": false
  }'
Response objectObject
dry_runboolean
assignmentFrameworkAssignmentNullable

The new assignment, as GET /clients/{client_id}/frameworks lists it, without evaluation (nothing has been measured yet; read it from that list). Null when dry_run is true.

Show properties(6)
idstring
frameworkobject
Show properties(3)
idstring
namestring
categorystring
audienceobject
Show properties(3)
typestring
One ofallgroupcollection
idstringNullable
namestringNullable
modulesobject
Show properties(4)
trainingboolean
phishingboolean
policiesboolean
reportingboolean
evaluationobject
Show properties(5)
metinteger
totalinteger
percentageinteger
requirementsarray of object
Show item properties(6)
keystring
namestring
metboolean
valuenumberNullable

The measured value where the requirement is numeric (for example completion percentage).

targetnumberNullable
detailstring
evaluated_atstring (date-time)
created_atstring (date-time)
courses_to_schedulearray of object

The framework's required courses that were (or would be) scheduled for the audience, with the number of active users each reaches. Empty when modules.training is false.

Show item properties(3)
course_idstring
titlestring
user_countinteger
Errors400Invalid request404Not found within the key's access409The object already existsError envelope →
DELETE/v2/clients/{client_id}/frameworks/{assignment_id}
Requireswritescope

Removes the assignment, the way the dashboard's Compliance page does. Its courses whose start date is today or later are withdrawn; courses that started on an earlier day stay on users' plans as regular assignments, and completions stay on their records.

Partner-wide assignments (audience name "All clients") belong to the partner, not the client, so their ids answer 404 here.

Path parameters

client_idstringRequired

Client id (the client's INFIMA id).

assignment_idstringRequired

Framework assignment id, as returned in the client's framework list.

curl -X DELETE "https://app.infimasecapis.com/v2/clients/3f2a9c1e-7b44-5d2e-9a1f-0c6d8e4b2a10/frameworks/5e6f7a8b-9c0d-4e1f-9a2b-3c4d5e6f7a8b" \
  -H "X-API-Key: $INFIMA_API_KEY"
Errors404Not found within the key's accessError envelope →