openapi: 3.0.3 info: version: 1.66.0 title: FusionAuth Api Key System API description: This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls. license: name: Apache2 servers: - url: http://localhost:9011 - url: https://sandbox.fusionauth.io security: - ApiKeyAuth: [] tags: - name: System paths: /api/system/audit-log: post: description: Creates an audit log with the message and user name (usually an email). Audit logs should be written anytime you make changes to the FusionAuth database. When using the FusionAuth App web interface, any changes are automatically written to the audit log. However, if you are accessing the API, you must write the audit logs yourself. operationId: createAuditLogWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AuditLogRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/AuditLogResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/audit-log/search: post: description: Searches the audit logs with the specified criteria and pagination. operationId: searchAuditLogsWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AuditLogSearchRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/AuditLogSearchResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/audit-log/{auditLogId}: get: description: Retrieves a single audit log for the given Id. operationId: retrieveAuditLogWithId parameters: - name: auditLogId in: path schema: type: string required: true description: The Id of the audit log to retrieve. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/AuditLogResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/event-log/search: post: description: Searches the event logs with the specified criteria and pagination. operationId: searchEventLogsWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/EventLogSearchRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EventLogSearchResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/event-log/{eventLogId}: get: description: Retrieves a single event log for the given Id. operationId: retrieveEventLogWithId parameters: - name: eventLogId in: path schema: type: string required: true description: The Id of the event log to retrieve. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EventLogResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/login-record/search: post: description: Searches the login records with the specified criteria and pagination. operationId: searchLoginRecordsWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/LoginRecordSearchRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/LoginRecordSearchResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/reindex: post: description: Requests Elasticsearch to delete and rebuild the index for FusionAuth users or entities. Be very careful when running this request as it will increase the CPU and I/O load on your database until the operation completes. Generally speaking you do not ever need to run this operation unless instructed by FusionAuth support, or if you are migrating a database another system and you are not brining along the Elasticsearch index. You have been warned. operationId: reindexWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ReindexRequest' responses: '200': description: Success default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/version: get: description: Retrieves the FusionAuth version string. operationId: retrieveVersionWithId parameters: [] responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/VersionResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/webhook-attempt-log/{webhookAttemptLogId}: get: description: Retrieves a single webhook attempt log for the given Id. operationId: retrieveWebhookAttemptLogWithId parameters: - name: webhookAttemptLogId in: path schema: type: string required: true description: The Id of the webhook attempt log to retrieve. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/WebhookAttemptLogResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/webhook-event-log/search: post: description: Searches the webhook event logs with the specified criteria and pagination. operationId: searchWebhookEventLogsWithId parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/WebhookEventLogSearchRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/WebhookEventLogSearchResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System /api/system/webhook-event-log/{webhookEventLogId}: get: description: Retrieves a single webhook event log for the given Id. operationId: retrieveWebhookEventLogWithId parameters: - name: webhookEventLogId in: path schema: type: string required: true description: The Id of the webhook event log to retrieve. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/WebhookEventLogResponse' default: description: Error content: application/json: schema: $ref: '#/components/schemas/Errors' tags: - System components: schemas: Errors: description: Standard error domain object that can also be used as the response from an API call. type: object properties: fieldErrors: type: array items: $ref: '#/components/schemas/Error' generalErrors: type: array items: $ref: '#/components/schemas/Error' ZonedDateTime: description: 'The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.' example: '1659380719000' type: integer format: int64 WebhookEventLogSearchCriteria: description: Search criteria for the webhook event log. type: object properties: end: $ref: '#/components/schemas/ZonedDateTime' event: type: string eventResult: $ref: '#/components/schemas/WebhookEventResult' eventType: $ref: '#/components/schemas/EventType' start: $ref: '#/components/schemas/ZonedDateTime' numberOfResults: type: integer orderBy: type: string startRow: type: integer AuditLogResponse: description: Audit log response. type: object properties: auditLog: $ref: '#/components/schemas/AuditLog' WebhookEventLogSearchResponse: description: Webhook event log search response. type: object properties: total: type: integer format: int64 webhookEventLogs: type: array items: $ref: '#/components/schemas/WebhookEventLog' EventLog: description: Event log used internally by FusionAuth to help developers debug hooks, Webhooks, email templates, etc. type: object properties: id: type: integer format: int64 insertInstant: $ref: '#/components/schemas/ZonedDateTime' message: type: string type: $ref: '#/components/schemas/EventLogType' AuditLogSearchResponse: description: Audit log response. type: object properties: auditLogs: type: array items: $ref: '#/components/schemas/AuditLog' total: type: integer format: int64 EventInfo: description: Information about a user event (login, register, etc) that helps identify the source of the event (location, device type, OS, etc). type: object properties: data: type: object additionalProperties: type: object deviceDescription: type: string deviceName: type: string deviceType: type: string ipAddress: type: string location: $ref: '#/components/schemas/Location' os: type: string userAgent: type: string EventLogType: description: Event Log Type type: string enum: - Information - Debug - Error LoginRecordSearchCriteria: description: '' type: object properties: applicationId: type: string format: uuid end: $ref: '#/components/schemas/ZonedDateTime' start: $ref: '#/components/schemas/ZonedDateTime' userId: type: string format: uuid numberOfResults: type: integer orderBy: type: string startRow: type: integer WebhookEventLogSearchRequest: description: Webhook event log search request. type: object properties: search: $ref: '#/components/schemas/WebhookEventLogSearchCriteria' Location: description: Location information. Useful for IP addresses and other displayable data objects. type: object properties: city: type: string country: type: string latitude: type: number format: double longitude: type: number format: double region: type: string zipcode: type: string displayString: type: string EventRequest: description: Container for the event information. This is the JSON that is sent from FusionAuth to webhooks. type: object properties: event: $ref: '#/components/schemas/BaseEvent' WebhookEventLogResponse: description: Webhook event log response. type: object properties: webhookEventLog: $ref: '#/components/schemas/WebhookEventLog' WebhookAttemptLog: description: A webhook call attempt log. type: object properties: data: type: object additionalProperties: type: object endInstant: $ref: '#/components/schemas/ZonedDateTime' id: type: string format: uuid startInstant: $ref: '#/components/schemas/ZonedDateTime' webhookCallResponse: $ref: '#/components/schemas/WebhookCallResponse' webhookEventLogId: type: string format: uuid webhookId: type: string format: uuid attemptResult: $ref: '#/components/schemas/WebhookAttemptResult' DisplayableRawLogin: description: A displayable raw login that includes application name and user loginId. type: object properties: applicationName: type: string location: $ref: '#/components/schemas/Location' loginId: type: string loginIdType: $ref: '#/components/schemas/IdentityType' applicationId: type: string format: uuid instant: $ref: '#/components/schemas/ZonedDateTime' ipAddress: type: string userId: type: string format: uuid WebhookEventLog: type: object properties: attempts: type: array items: $ref: '#/components/schemas/WebhookAttemptLog' data: type: object additionalProperties: type: object event: $ref: '#/components/schemas/EventRequest' eventResult: $ref: '#/components/schemas/WebhookEventResult' eventType: $ref: '#/components/schemas/EventType' id: type: string format: uuid insertInstant: $ref: '#/components/schemas/ZonedDateTime' lastAttemptInstant: $ref: '#/components/schemas/ZonedDateTime' lastUpdateInstant: $ref: '#/components/schemas/ZonedDateTime' linkedObjectId: type: string format: uuid sequence: type: integer format: int64 failedAttempts: type: integer successfulAttempts: type: integer WebhookCallResponse: description: A webhook call response. type: object properties: exception: type: string statusCode: type: integer url: type: string format: URI EventLogSearchResponse: description: Event log response. type: object properties: eventLogs: type: array items: $ref: '#/components/schemas/EventLog' total: type: integer format: int64 Error: description: Defines an error. type: object properties: code: type: string data: type: object additionalProperties: type: object message: type: string ReindexRequest: description: Reindex API request type: object properties: index: type: string IdentityType: description: Model identity types provided by FusionAuth. type: object properties: name: type: string AuditLogRequest: description: '' type: object properties: auditLog: $ref: '#/components/schemas/AuditLog' eventInfo: $ref: '#/components/schemas/EventInfo' LoginRecordSearchRequest: description: '' type: object properties: retrieveTotal: type: boolean search: $ref: '#/components/schemas/LoginRecordSearchCriteria' AuditLogSearchRequest: description: '' type: object properties: search: $ref: '#/components/schemas/AuditLogSearchCriteria' AuditLogSearchCriteria: description: '' type: object properties: end: $ref: '#/components/schemas/ZonedDateTime' message: type: string newValue: type: string oldValue: type: string reason: type: string start: $ref: '#/components/schemas/ZonedDateTime' tenantId: type: string format: uuid user: type: string numberOfResults: type: integer orderBy: type: string startRow: type: integer EventLogSearchRequest: description: '' type: object properties: search: $ref: '#/components/schemas/EventLogSearchCriteria' WebhookEventResult: description: The possible result states of a webhook event. This tracks the success of the overall webhook transaction according to the {@link TransactionType} and configured webhooks. type: string enum: - Failed - Running - Succeeded EventLogResponse: description: Event log response. type: object properties: eventLog: $ref: '#/components/schemas/EventLog' WebhookAttemptResult: description: The possible states of an individual webhook attempt to a single endpoint. type: string enum: - Success - Failure - Unknown EventType: description: Models the event types that FusionAuth produces. type: string enum: - JWTPublicKeyUpdate - JWTRefreshTokenRevoke - JWTRefresh - AuditLogCreate - EventLogCreate - KickstartSuccess - GroupCreate - GroupCreateComplete - GroupDelete - GroupDeleteComplete - GroupMemberAdd - GroupMemberAddComplete - GroupMemberRemove - GroupMemberRemoveComplete - GroupMemberUpdate - GroupMemberUpdateComplete - GroupUpdate - GroupUpdateComplete - UserAction - UserBulkCreate - UserCreate - UserCreateComplete - UserDeactivate - UserDelete - UserDeleteComplete - UserEmailUpdate - UserEmailVerified - UserIdentityProviderLink - UserIdentityProviderUnlink - UserLoginIdDuplicateOnCreate - UserLoginIdDuplicateOnUpdate - UserLoginFailed - UserLoginNewDevice - UserLoginSuccess - UserLoginSuspicious - UserPasswordBreach - UserPasswordResetSend - UserPasswordResetStart - UserPasswordResetSuccess - UserPasswordUpdate - UserReactivate - UserRegistrationCreate - UserRegistrationCreateComplete - UserRegistrationDelete - UserRegistrationDeleteComplete - UserRegistrationUpdate - UserRegistrationUpdateComplete - UserRegistrationVerified - UserTwoFactorMethodAdd - UserTwoFactorMethodRemove - UserUpdate - UserUpdateComplete - Test - UserIdentityVerified - UserIdentityUpdate AuditLog: description: An audit log. type: object properties: data: type: object additionalProperties: type: object id: type: integer format: int64 insertInstant: $ref: '#/components/schemas/ZonedDateTime' insertUser: type: string message: type: string newValue: type: object oldValue: type: object reason: type: string tenantId: type: string format: uuid WebhookAttemptLogResponse: description: Webhook attempt log response. type: object properties: webhookAttemptLog: $ref: '#/components/schemas/WebhookAttemptLog' EventLogSearchCriteria: description: Search criteria for the event log. type: object properties: end: $ref: '#/components/schemas/ZonedDateTime' message: type: string start: $ref: '#/components/schemas/ZonedDateTime' type: $ref: '#/components/schemas/EventLogType' numberOfResults: type: integer orderBy: type: string startRow: type: integer VersionResponse: description: '' type: object properties: version: type: string BaseEvent: description: Base class for all FusionAuth events. type: object properties: createInstant: $ref: '#/components/schemas/ZonedDateTime' id: type: string format: uuid info: $ref: '#/components/schemas/EventInfo' tenantId: type: string format: uuid type: $ref: '#/components/schemas/EventType' LoginRecordSearchResponse: description: A raw login record response type: object properties: logins: type: array items: $ref: '#/components/schemas/DisplayableRawLogin' total: type: integer format: int64 securitySchemes: ApiKeyAuth: type: apiKey name: Authorization in: header BearerAuth: type: http scheme: bearer bearerFormat: JWT