Submit Abuse Report

POST http://localhost/api/v1/reports scope: report.submit

Files an abuse report against an entity — fires the report.submitted Workflow Automation event.

Parameters

Field Type Optional Description
entity_type string Optional Defaults to ip.
value string Required
category string Optional Defaults to fraud.
notes string Optional Optional free text.

Example Request

curl -X POST http://localhost/api/v1/reports \
  -H "Authorization: Bearer wsk_xxx_xxx" \
  -d "entity_type=ip&value=103.148.154.174&category=fraud"
<?php
$ch = curl_init('http://localhost/api/v1/reports');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer wsk_xxx_xxx']);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(['entity_type' => 'ip', 'value' => '103.148.154.174', 'category' => 'fraud']));
$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
import requests

response = requests.post("http://localhost/api/v1/reports",
    headers={"Authorization": "Bearer wsk_xxx_xxx"},
    data={"entity_type": "ip", "value": "103.148.154.174", "category": "fraud"},
)

data = response.json()
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	client := &http.Client{}
	body := strings.NewReader("entity_type=ip&value=103.148.154.174&category=fraud")
	req, _ := http.NewRequest("POST", "http://localhost/api/v1/reports", body)
	req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	req.Header.Set("Authorization", "Bearer wsk_xxx_xxx")

	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	respBody, _ := io.ReadAll(resp.Body)
	fmt.Println(string(respBody))
}

Example Response

{
  "data": {
    "id": 42, "status": "pending"
  }
}