Delete an OpenFGA instance
const url = 'http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/openfga-instances/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';
const options = {
method: 'DELETE',
headers: {'API-Version': '2026-06-01.beta', 'API-Key': '<API-Key>'}
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}curl --request DELETE \
--url http://localhost:8000/clusters/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/openfga-instances/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'API-Key: <API-Key>' \
--header 'API-Version: 2026-06-01.beta'Removes the instance’s deployment, route and database, and all of its authorization data. This cannot be undone. Works without OpenFGA access.
Returns 202 while the instance is being removed and 204 when it is already gone.
Required scope: openfga:write
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”OpenFGA instance identifier.
Header Parameters
Section titled “Header Parameters”Responses
Section titled “Responses”The instance is being removed and status is deleting.
object
OpenFGA instance identifier.
The realm the instance is bound to. Chosen when the instance is created and never changed.
The reason the instance is failed.
Where the instance’s OpenFGA API answers.
The issuer the instance trusts. Only tokens from this issuer are accepted.
The audience a token must carry. Add an audience mapper for this value to the realm’s client.
Example
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"cluster_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"realm": "my-service",
"status": "ready",
"api_url": "https://openfga-7c9e6679.eu.skycloak.io",
"issuer": "https://auth.example.com/realms/my-service",
"audience": "https://openfga-7c9e6679.eu.skycloak.io",
"created_at": "2026-11-05T10:00:00Z",
"updated_at": "2026-11-05T10:02:10Z"
}There is no content to send for this request, but the headers may be useful.
Access is unauthorized.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Access is forbidden.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}The server cannot find the requested resource.
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Client error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Headers
Section titled “Headers”Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}Server error
RFC 9457 Problem Details object.
object
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com"
}