{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Monkeytype", "termsOfService": "http://monkeytype.com/terms-of-service", "contact": { "name": "Developer", "email": "jack@monkeytype.com" } }, "host": "api.monkeytype.com", "basePath": "/", "schemes": ["https"], "consumes": ["application/json"], "produces": ["application/json"], "tags": [ { "name": "users", "description": "" }, { "name": "tags", "description": "" }, { "name": "psas", "description": "" }, { "name": "presets", "description": "" }, { "name": "configs", "description": "" }, { "name": "index", "description": "" } ], "paths": { "/": { "get": { "tags": ["index"], "responses": { "default": { "description": "", "schema": { "type": "object", "properties": { "uptime": { "type": "number" }, "requestsProcessed": { "type": "number" } } } } } }, "delete": { "tags": ["users"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users": { "get": { "tags": ["users"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } }, "delete": { "tags": ["users"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/name": { "patch": { "tags": ["users"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "name": { "type": "string" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/signup": { "post": { "tags": ["users"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "uid": { "type": "string" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/checkName/{name}": { "get": { "tags": ["users"], "parameters": [ { "name": "name", "in": "path", "description": "", "required": true, "type": "string" } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/leaderboardMemory": { "patch": { "tags": ["users"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "mode": { "type": "string" }, "mode2": { "type": "string" }, "language": { "type": "string" }, "rank": { "type": "number" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/discord/link": { "post": { "tags": ["users"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "tokenType": { "type": "string" }, "accessToken": { "type": "string" }, "uid": { "type": "string" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/discord/unlink": { "post": { "tags": ["users"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/email": { "patch": { "tags": ["users"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "newEmail": { "type": "string" }, "previousEmail": { "type": "string" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/personalBests": { "delete": { "tags": ["users"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/tags": { "get": { "tags": ["tags"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } }, "post": { "tags": ["tags"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "tagName": { "type": "string" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } }, "patch": { "tags": ["tags"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "tagId": { "type": "string" }, "newName": { "type": "string" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/tags/{tagId}": { "delete": { "tags": ["tags"], "parameters": [ { "in": "path", "name": "tagId", "required": true, "type": "string" } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/users/tags/{tagId}/personalBest": { "delete": { "tags": ["tags"], "parameters": [ { "in": "path", "name": "tagId", "required": true, "type": "string" } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/psas": { "get": { "tags": ["psas"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/presets": { "get": { "tags": ["presets"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } }, "post": { "tags": ["presets"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "name": { "type": "string" }, "config": { "type": "object" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } }, "patch": { "tags": ["presets"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "_id": { "type": "string" }, "name": { "type": "string" }, "config": { "type": "object" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/presets/{presetId}": { "delete": { "tags": ["presets"], "parameters": [ { "in": "path", "name": "presetId", "required": true, "type": "string" } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } }, "/configs": { "get": { "tags": ["configs"], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } }, "patch": { "tags": ["configs"], "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { "type": "object", "properties": { "config": { "type": "object" } } } } ], "responses": { "default": { "description": "", "schema": { "$ref": "#/definitions/Response" } } } } } }, "definitions": { "Response": { "type": "object", "required": ["error", "message"], "properties": { "error": { "type": "string" }, "message": { "type": "string" }, "data": { "type": "object" } } } } }