Skip to main content
POST
/
dispute
/
create
Create a dispute
curl --request POST \
  --url https://app.chainpatrol.io/api/v2/dispute/create \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "content": "<string>",
  "email": "jsmith@example.com",
  "description": "<string>"
}
'
import requests

url = "https://app.chainpatrol.io/api/v2/dispute/create"

payload = {
"content": "<string>",
"email": "jsmith@example.com",
"description": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({content: '<string>', email: 'jsmith@example.com', description: '<string>'})
};

fetch('https://app.chainpatrol.io/api/v2/dispute/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.chainpatrol.io/api/v2/dispute/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'email' => 'jsmith@example.com',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://app.chainpatrol.io/api/v2/dispute/create"

payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.chainpatrol.io/api/v2/dispute/create")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.chainpatrol.io/api/v2/dispute/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "content": "<string>",
  "message": "<string>"
}
{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}
{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}
{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}

Quick Start

Authentication

Include your API key in the X-API-KEY header:
X-API-KEY: <api-key>

Overview

The Dispute Create endpoint allows you to create a new dispute for an asset that has been reported or blocked. This is useful when you believe an asset has been incorrectly flagged or if you want to contest a blocking decision.

Request

const response = await fetch(
  "https://app.chainpatrol.io/api/v2/dispute/create",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-KEY": "YOUR_API_KEY_HERE",
    },
    body: JSON.stringify({
      content: "https://example-phishing-site.com",
      email: "contact@yourdomain.com", // Optional if the API key is associated with a user that has an email
      description:
        "This is not a phishing site, it's our legitimate marketing site.", // Optional
    }),
  }
);

const data = await response.json();
console.log(data);
const response = await fetch(
  "https://app.chainpatrol.io/api/v2/dispute/create",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-API-KEY": "YOUR_API_KEY_HERE",
    },
    body: JSON.stringify({
      content: "https://example-phishing-site.com",
      email: "contact@yourdomain.com", // Optional if the API key is associated with a user that has an email
      description:
        "This is not a phishing site, it's our legitimate marketing site.", // Optional
    }),
  }
);

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    "https://app.chainpatrol.io/api/v2/dispute/create",
    headers={
        "Content-Type": "application/json",
        "X-API-KEY": "YOUR_API_KEY_HERE",
    },
    json={
        "content": "https://example-phishing-site.com",
        "email": "contact@yourdomain.com", # Optional if the API key is associated with a user that has an email
        "description": "This is not a phishing site, it's our legitimate marketing site." # Optional
    },
)

data = response.json()
print(data)

Request Parameters

ParameterTypeRequiredDescription
contentstringYesThe URL or content identifier that you want to dispute
emailstringNo*Contact email for the dispute. Required if the API key is not associated with a user that has an email
descriptionstringNoAdditional details or explanation for the dispute

Response

{
  "id": "12345",
  "content": "https://example-phishing-site.com"
}

Response Parameters

ParameterTypeDescription
idstringThe unique identifier for the created dispute
contentstringThe content (URL) that was disputed
messagestringOptional message providing additional information

Errors

Status CodeError CodeDescription
400BAD_REQUESTInvalid input parameters or a dispute already exists for this asset with the provided email
401UNAUTHORIZEDMissing or invalid API key
404NOT_FOUNDThe specified asset does not exist

Notes

  • A dispute can only be created once per email address for a specific asset
  • If the asset is only blocked in EthPhishingDetect but not in ChainPatrol, a note will automatically be added to the dispute
  • All disputes created via the API will have a system note indicating they were created via the API

Authorizations

X-API-KEY
string
header
required

Your API key. This is required by most endpoints to access our API programatically. Reach out to us at support@chainpatrol.io to get an API key for your use.

Body

application/json
content
string
required
Minimum string length: 1
email
string<email>
description
string

Response

Successful response

id
string
required
content
string
required
message
string