openapi: 3.0.3
info:
version: 1.66.0
title: FusionAuth Api Key Logout 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: Logout
paths:
/api/logout:
post:
description: The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token stored. This API takes the refresh token in the JSON body. OR The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token stored. This API does nothing if the request does not contain an access token or refresh token cookies.
operationId: createLogout
parameters:
- name: global
in: query
schema:
type: string
description: When this value is set to true all the refresh tokens issued to the owner of the provided token will be revoked.
- name: refreshToken
in: query
schema:
type: string
description: The refresh_token as a request parameter instead of coming in via a cookie. If provided this takes precedence over the cookie.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LogoutRequest'
responses:
'200':
description: Success
default:
description: Error
tags:
- Logout
components:
schemas:
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
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
LogoutRequest:
description: Request for the Logout API that can be used as an alternative to URL parameters.
type: object
properties:
global:
type: boolean
refreshToken:
type: string
eventInfo:
$ref: '#/components/schemas/EventInfo'
securitySchemes:
ApiKeyAuth:
type: apiKey
name: Authorization
in: header
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT