OnlyFans API

Update Blocked Countries

Updates the countries blocked from viewing the account.

PUT
/api/{account}/settings/blocked-countries
AuthorizationBearer <token>

Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys

In: header

Path Parameters

account*string

The Account ID

Request Body

application/json

blockedCountries*array<string>

List of all ISO 3166-1 alpha-2 country codes to block including existing ones. If you want to unblock all countries, set this to an empty array or null.

blockedStates?array<string>

Blocked states payload forwarded to OnlyFans. Defaults to an empty array.

Response Body

application/json

curl -X PUT "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/settings/blocked-countries" \  -H "Content-Type: application/json" \  -d '{    "blockedCountries": [      "RU"    ]  }'
{
  "data": {
    "success": true
  },
  "_meta": {
    "_credits": {
      "used": 1,
      "balance": 999999969,
      "note": "Always"
    },
    "_cache": {
      "is_cached": false,
      "note": "Cache disabled for this endpoint"
    },
    "_rate_limits": {
      "limit_minute": 10000000,
      "limit_day": 50000,
      "remaining_minute": 9999998,
      "remaining_day": 49970
    }
  }
}