Use this interface to purge a specific user’s comments from our database in phoenix.

This Endpoint requires an ToS;DR Issued API Key!

Authentication is done through the apikey Header.

Endpoint
https://api.tosdr.org/spam/v1/
CODE

URL Parameters

Parameter

Type

Description

user

Integer

The User ID to purge

dryrun

Boolean

If defined, execution is done without deleting anything


Repository

https://github.com/tosdr/API/tree/master/functions/Spam/DELETE/v1

Implemented Error codes

Error

HTTP Status

Bitmask

An invalid user id has been supplied, the user is protected

400

INVALID_PARAMETER

The user does not exist

404

INVALID_PARAMETER

The user id parameter is missing

400

MISSING_PARAMETER

JSON Schema
{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "$ref": "#/definitions/Welcome",
    "definitions": {
        "Welcome": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "error": {
                    "type": "integer"
                },
                "message": {
                    "type": "string"
                },
                "parameters": {
                    "$ref": "#/definitions/Parameters"
                }
            },
            "required": [
                "error",
                "message",
                "parameters"
            ],
            "title": "Welcome"
        },
        "Parameters": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "dryrun": {
                  "type": "boolean"
                },
                "user": {
                    "$ref": "#/definitions/User"
                },
                "comments": {
                    "$ref": "#/definitions/Comments"
                }
            },
            "required": [
                "dryrun"
                "comments",
                "user"
            ],
            "title": "Parameters"
        },
        "Comments": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "total": {
                    "type": "integer"
                },
                "case": {
                    "$ref": "#/definitions/Case"
                },
                "document": {
                    "$ref": "#/definitions/Case"
                },
                "point": {
                    "$ref": "#/definitions/Case"
                },
                "service": {
                    "$ref": "#/definitions/Case"
                },
                "topic": {
                    "$ref": "#/definitions/Case"
                }
            },
            "required": [
                "case",
                "document",
                "point",
                "service",
                "topic",
                "total"
            ],
            "title": "Comments"
        },
        "Case": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "total": {
                    "type": "integer"
                },
                "success": {
                    "type": "integer"
                },
                "failed": {
                    "type": "integer"
                }
            },
            "required": [
                "failed",
                "success",
                "total"
            ],
            "title": "Case"
        },
        "User": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "deactivated": {
                    "type": "boolean"
                },
                "username": {
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                }
            },
            "required": [
                "deactivated",
                "username",
                "id"
            ],
            "title": "User"
        }
    }
}
JS