---
updatedAt: 2026-05-21T16:42:54.000Z
---

# Create a knowledge question enrollment.

Create a knowledge question enrollment. <br/><br/>If the number of answers submitted is fewer than the minimum required for a valid enrollment, then the enrollment is created but is considered incomplete. The 'validated' attribute value is 'false' and the enrollment is not available for productive runtime verifications.<br/><br/>If the authenticated user has the entitlement 'manageEnrollMFAMethodAnyUser', then the 'userId' attribute must be present in the request payload. Otherwise, the enrollment is associated with the authenticated user.<br/><br/><b>NB:</b> To have this feature installed on the tenant please contact support.<br/><br/><b>Entitlements:</b><br/> - manageEnrollMFAMethodAnyUser (Manage second-factor authentication enrollment for all users)<br/> - manageEnrollMFAMethod (Manage own second-factor authentication enrollment)<br/>

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "version": "1.0.0",
    "description": "Multi-factor authentication",
    "title": "Multi-factor authentication"
  },
  "servers": [
    {
      "url": "https://{tenanturl}",
      "variables": {
        "tenanturl": {
          "default": "{tenant_url}",
          "description": "URL of your IBM Security Verify tenant"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Knowledge Questions"
    }
  ],
  "paths": {
    "/v2.0/factors/questions": {
      "post": {
        "tags": [
          "Knowledge Questions"
        ],
        "summary": "Create a knowledge question enrollment.",
        "description": "Create a knowledge question enrollment. <br/><br/>If the number of answers submitted is fewer than the minimum required for a valid enrollment, then the enrollment is created but is considered incomplete. The 'validated' attribute value is 'false' and the enrollment is not available for productive runtime verifications.<br/><br/>If the authenticated user has the entitlement 'manageEnrollMFAMethodAnyUser', then the 'userId' attribute must be present in the request payload. Otherwise, the enrollment is associated with the authenticated user.<br/><br/><b>NB:</b> To have this feature installed on the tenant please contact support.<br/><br/><b>Entitlements:</b><br/> - manageEnrollMFAMethodAnyUser (Manage second-factor authentication enrollment for all users)<br/> - manageEnrollMFAMethod (Manage own second-factor authentication enrollment)<br/>",
        "operationId": "createKqEnrollment_2.0",
        "requestBody": {
          "description": "A JSON payload that specifies the enrollment data.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuestionsEnrollment_2.0"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The enrollment was created.",
            "headers": {
              "Location": {
                "description": "The URL of the newly created enrollment.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuestionsEnrollment_2.0"
                }
              }
            }
          },
          "400": {
            "description": "The request cannot be processed because the request body contains improperly structured JSON",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest_3"
                }
              }
            }
          },
          "401": {
            "description": "The unauthenticated user does not have the permissions to perform the requested operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Unauthorized_1"
                }
              }
            }
          },
          "403": {
            "description": "The authenticated user does not have the permissions to perform the requested operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forbidden_2"
                }
              }
            }
          },
          "409": {
            "description": "The request could not be processed due to a conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict"
                }
              }
            }
          },
          "501": {
            "description": "Access to the requested resource is disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotImplemented"
                }
              }
            }
          }
        },
        "x-category": "Multi-factor authentication",
        "x-publicAPI": "true",
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "QuestionAnswer_2.0": {
        "required": [
          "questionKey"
        ],
        "type": "object",
        "properties": {
          "questionKey": {
            "type": "string",
            "description": "The question identifier key",
            "readOnly": true,
            "example": "mothersMaidenName"
          },
          "answer": {
            "type": "string",
            "description": "The question answer",
            "example": "smith"
          }
        },
        "description": "A knowledge questions question."
      },
      "NotImplemented": {
        "required": [
          "messageDescription",
          "messageId"
        ],
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "The message key identifier",
            "readOnly": true,
            "example": "CSIXX1234X"
          },
          "messageDescription": {
            "type": "string",
            "description": "A requester locale-specific descriptive message",
            "readOnly": true,
            "example": "Access to the requested resource is disabled"
          }
        },
        "description": "The message response to the request."
      },
      "Conflict": {
        "required": [
          "messageDescription",
          "messageId"
        ],
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "The message key identifier",
            "readOnly": true,
            "example": "CSIXX1234X"
          },
          "messageDescription": {
            "type": "string",
            "description": "A requester locale-specific descriptive message",
            "readOnly": true,
            "example": "The request could not be processed due to a conflict"
          }
        },
        "description": "The message response to the request."
      },
      "QuestionKey_2.0": {
        "required": [
          "questionKey"
        ],
        "type": "object",
        "properties": {
          "questionKey": {
            "type": "string",
            "description": "The question identifier key",
            "readOnly": true,
            "example": "mothersMaidenName"
          }
        },
        "description": "A knowledge question."
      },
      "QuestionsEnrollment_2.0": {
        "required": [
          "attributes",
          "created",
          "enabled",
          "id",
          "references",
          "type",
          "updated",
          "userId",
          "validated"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the enrollment",
            "readOnly": true,
            "example": "1e5fa156-3754-4265-8796-1a2f0a6f036f"
          },
          "userId": {
            "type": "string",
            "description": "The unique identifier of the associated user",
            "readOnly": true,
            "example": "50CP15KFD3"
          },
          "type": {
            "type": "string",
            "description": "The type of authentication factor enrollment",
            "readOnly": true,
            "example": "<type>"
          },
          "created": {
            "type": "string",
            "description": "The creation time of the enrollment",
            "readOnly": true,
            "example": "2018-07-16T02:13:47.719Z"
          },
          "updated": {
            "type": "string",
            "description": "The time the enrollment was last updated",
            "readOnly": true,
            "example": "2018-07-16T02:13:47.719Z"
          },
          "attempted": {
            "type": "string",
            "description": "The time the enrollment was last used for verification",
            "readOnly": true,
            "example": "2018-07-16T02:13:47.719Z"
          },
          "enabled": {
            "type": "boolean",
            "description": "The enabled state of the enrollment to be used in runtime flows",
            "example": true
          },
          "validated": {
            "type": "boolean",
            "description": "The validation state of the enrollment",
            "readOnly": true,
            "example": true
          },
          "attributes": {
            "$ref": "#/components/schemas/QuestionsEnrollmentAttributes_2.0"
          },
          "references": {
            "$ref": "#/components/schemas/QuestionsEnrollmentIndvReferences_2.0"
          }
        },
        "description": "A knowledge questions enrollment."
      },
      "CreateQuestionsEnrollmentAttributes_2.0": {
        "required": [
          "questions"
        ],
        "type": "object",
        "properties": {
          "questions": {
            "type": "array",
            "description": "The list of questions with answers",
            "items": {
              "$ref": "#/components/schemas/QuestionAnswer_2.0"
            }
          }
        },
        "description": "A knowledge questions enrollment's attributes."
      },
      "QuestionsEnrollmentIndvReferences_2.0": {
        "required": [
          "profileId"
        ],
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "description": "The configuration profile identifier",
            "readOnly": true,
            "example": "1e5fa156-3754-4265-8796-1a2f0a6f036f"
          },
          "questions": {
            "type": "array",
            "description": "The list of available questions",
            "items": {
              "$ref": "#/components/schemas/QuestionQuestion_2.0"
            }
          }
        },
        "description": "A knowledge questions enrollment's references."
      },
      "CreateQuestionsEnrollment_2.0": {
        "required": [
          "attributes",
          "references"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The unique identifier of the associated user",
            "example": "50CP15KFD3"
          },
          "enabled": {
            "type": "boolean",
            "description": "The enabled state of the enrollment that is used in the runtime flows",
            "example": true
          },
          "attributes": {
            "$ref": "#/components/schemas/CreateQuestionsEnrollmentAttributes_2.0"
          },
          "references": {
            "$ref": "#/components/schemas/CreateQuestionsEnrollmentReferences_2.0"
          }
        },
        "description": "The creation data of a knowledge question enrollment."
      },
      "QuestionsEnrollmentAttributes_2.0": {
        "required": [
          "questions"
        ],
        "type": "object",
        "properties": {
          "questions": {
            "type": "array",
            "description": "The list of enrolled questions",
            "items": {
              "$ref": "#/components/schemas/QuestionKey_2.0"
            }
          }
        },
        "description": "A knowledge questions enrollment attributes."
      },
      "QuestionQuestion_2.0": {
        "required": [
          "question",
          "questionKey"
        ],
        "type": "object",
        "properties": {
          "questionKey": {
            "type": "string",
            "description": "The question identifier key",
            "readOnly": true,
            "example": "mothersMaidenName"
          },
          "question": {
            "type": "string",
            "description": "Question text",
            "readOnly": true,
            "example": "What is your mother's maiden name?"
          }
        },
        "description": "A knowledge question."
      },
      "CreateQuestionsEnrollmentReferences_2.0": {
        "required": [
          "profileId"
        ],
        "type": "object",
        "properties": {
          "profileId": {
            "type": "string",
            "description": "The configuration profile identifier",
            "example": "1e5fa156-3754-4265-8796-1a2f0a6f036f"
          }
        },
        "description": "A knowledge questions enrollment's references."
      },
      "Forbidden_2": {
        "required": [
          "messageDescription",
          "messageId"
        ],
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "The message key identifier",
            "readOnly": true,
            "example": "CSIXX1234X"
          },
          "messageDescription": {
            "type": "string",
            "description": "A requester locale-specific descriptive message",
            "readOnly": true,
            "example": "The access token included in the request is not valid"
          }
        },
        "description": "The message response to the request."
      },
      "BadRequest_3": {
        "required": [
          "messageDescription",
          "messageId"
        ],
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "The message key identifier",
            "readOnly": true,
            "example": "CSIXX1234X"
          },
          "messageDescription": {
            "type": "string",
            "description": "A requester locale-specific descriptive message",
            "readOnly": true,
            "example": "The request cannot be processed because the request body contains improperly structured JSON"
          }
        },
        "description": "The message response to the request."
      },
      "Unauthorized_1": {
        "required": [
          "messageDescription",
          "messageId"
        ],
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string",
            "description": "The message key identifier",
            "readOnly": true,
            "example": "CSIXX1234X"
          },
          "messageDescription": {
            "type": "string",
            "description": "A requester locale-specific descriptive message",
            "readOnly": true,
            "example": "The unauthenticated user does not have the permissions to perform the requested operation"
          }
        },
        "description": "The message response to the request."
      }
    }
  },
  "x-original-swagger-version": "2.0",
  "x-explorer-enabled": false
}
```