OpenAPI Specification
openapi: 3.0.3
info:
title: Fake Store Auth Users API
description: Fake Store API exposes a sample REST API for e-commerce data including products, carts, users, and authentication. It is intended for prototyping, teaching, and integration testing — write operations return fabricated responses and do not persist data on the server.
version: 1.0.0
contact:
name: Fake Store API
url: https://fakestoreapi.com/
license:
name: MIT
servers:
- url: https://fakestoreapi.com
description: Production
tags:
- name: Users
description: User account operations.
paths:
/users:
get:
tags:
- Users
summary: List users
operationId: listUsers
parameters:
- $ref: '#/components/parameters/Limit'
- $ref: '#/components/parameters/Sort'
responses:
'200':
description: Array of users
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
post:
tags:
- Users
summary: Create a user
operationId: createUser
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserInput'
responses:
'200':
description: Created user (fabricated)
content:
application/json:
schema:
$ref: '#/components/schemas/User'
/users/{id}:
parameters:
- $ref: '#/components/parameters/UserId'
get:
tags:
- Users
summary: Get a user
operationId: getUser
responses:
'200':
description: User
content:
application/json:
schema:
$ref: '#/components/schemas/User'
put:
tags:
- Users
summary: Replace a user
operationId: replaceUser
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserInput'
responses:
'200':
description: Updated user (fabricated)
content:
application/json:
schema:
$ref: '#/components/schemas/User'
patch:
tags:
- Users
summary: Partially update a user
operationId: updateUser
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserInput'
responses:
'200':
description: Updated user (fabricated)
content:
application/json:
schema:
$ref: '#/components/schemas/User'
delete:
tags:
- Users
summary: Delete a user
operationId: deleteUser
responses:
'200':
description: Deleted user (fabricated)
content:
application/json:
schema:
$ref: '#/components/schemas/User'
components:
schemas:
User:
type: object
properties:
id:
type: integer
email:
type: string
format: email
username:
type: string
password:
type: string
name:
type: object
properties:
firstname:
type: string
lastname:
type: string
address:
type: object
properties:
city:
type: string
street:
type: string
number:
type: integer
zipcode:
type: string
geolocation:
type: object
properties:
lat:
type: string
long:
type: string
phone:
type: string
UserInput:
type: object
required:
- email
- username
- password
properties:
email:
type: string
format: email
username:
type: string
password:
type: string
name:
type: object
properties:
firstname:
type: string
lastname:
type: string
address:
type: object
properties:
city:
type: string
street:
type: string
number:
type: integer
zipcode:
type: string
geolocation:
type: object
properties:
lat:
type: string
long:
type: string
phone:
type: string
parameters:
Sort:
in: query
name: sort
schema:
type: string
enum:
- asc
- desc
description: Sort order for results
UserId:
in: path
name: id
required: true
schema:
type: integer
description: User ID
Limit:
in: query
name: limit
schema:
type: integer
minimum: 1
description: Maximum number of results to return