SellGate API

Blacklist API

Manage customer blacklist entries

Blacklist API

Block customers from making purchases based on email or IP address.

Endpoints Overview

MethodEndpointDescription
GET/v1/blacklistList blacklist entries
POST/v1/blacklistAdd to blacklist
DELETE/v1/blacklistRemove from blacklist

List Blacklist

GET /v1/blacklist

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 25, max: 100)
typestringFilter by type: email or ip

Response

{
  "data": [
    {
      "id": "bl_abc123",
      "type": "email",
      "value": "spammer@example.com",
      "email": "spammer@example.com",
      "ip_address": null,
      "reason": "Fraudulent orders",
      "created_at": "2025-01-15T10:00:00Z",
      "updated_at": "2025-01-15T10:00:00Z"
    },
    {
      "id": "bl_def456",
      "type": "ip",
      "value": "192.168.1.100",
      "email": null,
      "ip_address": "192.168.1.100",
      "reason": "Multiple chargebacks",
      "created_at": "2025-01-16T14:30:00Z",
      "updated_at": "2025-01-16T14:30:00Z"
    }
  ],
  "meta": {
    "total": 15,
    "limit": 25,
    "offset": 0
  }
}

Example Request

curl -X GET "https://api.sellgate.cc/v1/blacklist?type=email" \
  -H "Authorization: Bearer sg_live_your_api_key"

Add to Blacklist

POST /v1/blacklist

Request Body (Option 1 - Email)

{
  "email": "badactor@example.com",
  "reason": "Attempted fraud"
}

Request Body (Option 2 - IP)

{
  "ip_address": "192.168.1.100",
  "reason": "Multiple chargebacks"
}

Request Body (Option 3 - Type/Value format)

{
  "type": "email",
  "value": "badactor@example.com",
  "reason": "Attempted fraud"
}

Example Request

curl -X POST "https://api.sellgate.cc/v1/blacklist" \
  -H "Authorization: Bearer sg_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "badactor@example.com",
    "reason": "Attempted fraud"
  }'

Response (201 Created)

{
  "success": true,
  "id": "bl_new123",
  "type": "email",
  "value": "badactor@example.com"
}

If the entry already exists, it will be updated with the new reason instead of creating a duplicate.


Remove from Blacklist

DELETE /v1/blacklist

Query Parameters

Provide one of the following to identify the entry:

ParameterTypeDescription
idstringBlacklist entry ID
emailstringEmail to unblock
ip_addressstringIP address to unblock

Example Requests

# By ID
curl -X DELETE "https://api.sellgate.cc/v1/blacklist?id=bl_abc123" \
  -H "Authorization: Bearer sg_live_your_api_key"

# By email
curl -X DELETE "https://api.sellgate.cc/v1/blacklist?email=customer@example.com" \
  -H "Authorization: Bearer sg_live_your_api_key"

# By IP
curl -X DELETE "https://api.sellgate.cc/v1/blacklist?ip_address=192.168.1.100" \
  -H "Authorization: Bearer sg_live_your_api_key"

Response

{
  "success": true
}

Blacklist Types

TypeDescriptionExample
emailBlock by email addressspam@example.com
ipBlock by IP address192.168.1.100

Blacklist Object

FieldTypeDescription
idstringEntry identifier
typestringemail or ip
valuestringThe blocked value
emailstringEmail (if type is email)
ip_addressstringIP address (if type is ip)
reasonstringReason for blocking
created_atstringCreation timestamp
updated_atstringLast update timestamp

On this page