API Overview

1. Overview

The core of FusionAuth is a set of RESTful APIs that allow you to quickly integrate login, registration and advanced User management features into your application. The FusionAuth web UI is built upon these APIs, with the exception of managing API keys everything in the UI is available through an API.

On this page you will find links to each of the API groups and a general overview of the API status codes you can expect back from each API. Each API will also document specific status codes and the specific meaning of the status code.

2. APIs

Unless stated otherwise, all of the FusionAuth APIs will expect to receive a JSON request body. Ensure you have added this Content-Type HTTP header to your request.

Content-Type Header
Content-Type: application/json

 
The APIs are grouped into the following categories.

  • Actioning Users - These APIs allow you to take actions on Users or modify previous actions (CRUD operations).

  • Applications - Create, Retrieve, Update and Delete Applications and Application Roles

  • Audit Logs - These APIs allow you create, retrieve, search and export the Audit Log.

  • Consent - These APIs allow you to manage Consent (CRUD operations).

  • Email - These APIs allow you both manage Email Templates (CRUD operations) as well as send emails to Users.

  • Event Logs - These APIs allow you retrieve and search event logs.

  • Families - These APIs allow you to manage Families (CRUD operations).

  • Groups - These APIs allow you to manage Groups (CRUD operations) as well Group membership.

  • Identity Providers - These APIs allow you manage Identity Providers for federating logins.

  • Integrations - These APIs allow you to manage FusionAuth integrations such as Kafka, Twilio and CleanSpeak.

  • JSON Web Tokens - These APIs allow you to manage Refresh Tokens, verify Access Tokens and retrieve public keys used for verifying JWT signatures.

  • Keys - These APIs allow you to manage cryptographic keys (CRUD operations).

  • Lambdas - These APIs allow you to manage Lambdas (CRUD operations).

  • Login - These APIs allow you authenticate Users.

  • Passwordless - These APIs allow you authenticate Users without a password.

  • Registration - These APIs allow you to manage the relationship between Users and Applications, also known as Registrations (CRUD operations).

  • Reports - These APIs allow you retrieve reporting information from FusionAuth.

  • System - These APIs allow you to retrieve and update the system configuration and retrieve system status.

  • Tenants - These APIs allow you to manage Tenants (CRUD operations).

  • Themes - These APIs allow you to manage Themes (CRUD operations).

  • Two Factor - This API provides allow you to enable and disable Two Factor on a user.

  • Users - Create, Retrieve, Update and Delete Users, Search for Users, Bulk Import and Password Management

  • User Actions - These APIs allow you to manage User Actions which are the definitions of actions that can be taken on Users (CRUD operations).

  • User Action Reasons - These APIs allow you to manage User Action Reasons which are used when you action Users (CRUD operations).

  • User Comments - These APIs allow retrieve or create comments on Users.

  • Webhooks - These APIs allow you manage Webhooks (CRUD operations).

 

Note: Null values in JSON are not allowed on any of the FusionAuth APIs. If you are looking to pass in a null value, simply omit it from your request instead. This will allow FusionAuth to handle default values correctly.

3. Status Codes

Each API may document specific status codes and provide a specific reason for returning that status code. This is a general overview of the status codes you may expect from an API and what they will mean to you.

Table 1. Response Codes
Code Description

200

The request was successful. Generally the response body will contain JSON unless documented otherwise.

400

The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors.

401

The request authentication failed. This request requires authentication and the API key was either omitted or invalid. In some cases this may also be returned if you are not authorized to make the request. See Authentication for additional information on API authentication.

404

The object you requested doesn’t exist. The response will be empty.

405

The HTTP method you requested is not allowed for the URI. This is a user error in making the HTTP request to the API. For example, if POST is the only supported way to call a particular API and you make the HTTP request with GET, you will receive a 405 status code. No body will be returned.

500

There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. This is generally a FusionAuth error condition. If possible open a GitHub Issue so we can help you resolve the issue.

501

The HTTP method you requested is not implemented. This is a user error in making the HTTP request to the API.

503

The requested action cannot be completed due the current rate of requests. Retry the request later.

512

A lambda invocation failed during this API request. An event log will have been created with details of the exception. See System Event Log.