API Docs Help

Introduction

Verisys Antivirus API provides authorised API consumers with the ability to scan files for malware and NSFW (Not Safe for Work) content. REST API endpoints are provided for performing both synchronous and asynchronous scans.

You can find the OpenAPI Specification for our API here: openapi.yaml. The spec can be used to auto-generate API clients for many popular programming languages.

Endpoints

Multiple base URLs are available, segregated by geographic region. For compliance purposes, data sent to a specific region never leaves that region.

Note that URLs must include the API version, with the latest version currently at v1

Base URL

Region

https://gb1.api.av.ionxsolutions.com/v1

UK

https://eu1.api.av.ionxsolutions.com/v1

EU

https://us1.api.av.ionxsolutions.com/v1

USA

Authentication

API keys are used to authenticate requests. When subscribing to Verisys Antivirus API, we create a default API key for you, and you can create amd manage additional API keys at the Verisys Licensing & Support site.

A valid API key must be sent in an X-API-Key HTTP header with every request.

Rate Limits

To ensure sufficient capacity for all API consumers, we use request rate limiting, on a per-API key basis.

The API returns HTTP code 429 when it receives too many requests, and also returns a Retry-After header, which contains the minimum number of seconds that must be waited before the API can handle another request.

For API requests that are not rate limited, the response includes headers that indicate the current state of your rate limit quota:

Header

Value

X-Rate-Limit-Limit

Rate limit ceiling that is applicable for the current request, e.g. 1m ("1 minute")

X-Rate-Limit-Remaining

Number of requests left for the current rate-limit window, e.g. 9

X-Rate-Limit-Reset

The time at which the rate limit resets, specified as an ISO 8601 timestamp

If you are having difficulties with limits, please feel free to contact us.

File Size Limits

The maximum permitted file sizes are shown below.

Scan Type

Scan Method

Maximum File Size

Malware

Sync

100MB

Malware

Async

250MB

NSFW Image

Async

8MB

NSFW Image

Async

16MB

NSFW Image scanning APIs support the following image formats:

Format

Permitted File Extensions

JPEG

.jpg, .jpeg

PNG

.png

GIF*

.gif

WebP

.webp

Credits

Credits Each plan comes with a set number of credits, and 1 credit is consumed when you make a request to an API endpoint that requests file scanning:

  • /v1/malware/scan/*

  • /v1/malware/submit/*

  • /v1/nsfw/images/scan/*

  • /v1/nsfw/images/submit/*

Every API response includes headers containing information about your remaining credits:

Header

Value

X-API-Credit-Limit

Total number of credits that were allocated for your current billing cycle, e.g. 10000

X-API-Credit-Remaining

Number of credits remaining in your current billing cycle, e.g. 5000

If you need more credits, you can upgrade your plan at any time, or purchase a credit addon that provides additional credits.

Versioning

This API uses versioning. A new API version is released whenever we introduce any backwards-incompatible changes to the API, such as changing a parameter name or type, or deprecating an endpoint. Previous versions will remain functional, but will be considered deprecated, and it is therefore strongly recommended to always use the latest version. When making an API request, the desired version must be used to prefix the endpoint path, for example to call v1 of the ping endpoint: https://gb1.api.av.ionxsolutions.com/v1/ping

Data Retention

Files sent to the API for Malware/NSFW scanning are only kept for the short time it takes to perform the scan, and are then immediately and permanently deleted. Files are not shared with any third parties, and are processed solely for the purposes of the request Malware/NSFW scan.

Validation

API endpoints perform validation on all input. Any request that fails validation will result in an error response with HTTP status code 422. The response body will be a ValidationProblemDetails that contains details of all validation errors.

{ "type": "https://ionxsolutions.com/schema/rest/model-validation-error", "title": "One or more validation errors occurred.", "status": 422, "traceId": "00-dbb62d1d43e81d9af3952ec39bdec4e0-6aa0ae188e8e1154-01", "errors": { "file_url": [ "Invalid format for file_url" ], "file_name": [ "file_name must not be empty" ] } }

Errors

Verisys Antivirus API uses standard HTTP response codes to indicate the success or failure of an API request. In case of an error, the response body will be a ProblemDetails that contains additional information about the error.

Error Code

Meaning

401

Unauthorized; API key may be missing or invalid, or your subscription may have expired. Ensure your API key is passed via the X-Api-Key header

403

Forbidden; insufficient credit quota remaining

404

Not Found; resource not found

422

Unprocessable Content; unable to validate your request, see Validation

429

Too Many Requests; rate limit exceeded, see Rate Limits

500

Server Error; something is wrong at our end. Try again later or contact us: contact us

Webhooks

Verisys Antivirus API provides endpoints for performing both synchronous and asynchronous scans. When performing an asynchronous scan, there are two different means to later obtain the scan result:

  1. Polling: repeatedly calling a Fetch Scan Result endpoint (e.g. /v1/malware/{id}, /v1/nsfw/images/{id}) until the result is available

  2. Callback/webhook: we automatically contact one of your API endpoints when the result is available

If you provided a valid callback URL in your asynchronous scan request, when the scan result is available our system will automatically send a POST request to the specified URL with a ScanResult object as the payload.

Each webhook request will include an X-Api-Signature header, which contains an HMAC-256 signature computed over the payload. You can verify that webhook requests originated from the Verisys Antivirus API by computing the HMAC-256 signature and comparing it to the X-Api-Signature header. Each Verisys Antivirus API account uses a unique webhook secret for the HMAC key, which you can find at the Verisys Licensing & Support site.

Security & Privacy

All data in transit is secured by TLS.

Files submitted for scanning are stored in encrypted format (using AES-256), and are only kept for as long as is required to complete the scan - often as little as 1 second.

Verisys Antivirus API is fully compliant with GDPR. Files submitted to a particular region will never leave that region - your data will never traverse jurisdictions, allowing you to remain compliant.

Content Type Detection

When submitting files for Malware/NSFW scans, we will also detect the actual content type (the real content type can differ from that purported by the file extension) by scanning the file signature. The following content types are currently supported:

File Type

Media Type

Microsoft Office Excel

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Microsoft Office Outlook

application/vnd.ms-outlook

Microsoft Office PowerPoint

application/vnd.openxmlformats-officedocument.presentationml.presentation

Microsoft Office Visio

application/vnd.visio

Microsoft Office Word

application/vnd.openxmlformats-officedocument.wordprocessingml.document

Microsoft Office XPS

application/vnd.ms-xpsdocument

Microsoft Office Excel (97-2003)

application/vnd.ms-excel

Microsoft Office PowerPoint (97-2003)

application/vnd.ms-powerpoint

Microsoft Office Visio (97-2003)

application/vnd.visio

Microsoft Office Word (97-2003)

application/msword

OpenDocument Text

application/vnd.oasis.opendocument.text

OpenDocument Presentation

application/vnd.oasis.opendocument.presentation

OpenDocument Spreadsheet

application/vnd.oasis.opendocument.spreadsheet

Rich Text Document

application/rtf

PDF Document

application/pdf

Plain Text

text/plain

XML

application/xml

vCard (VCF)

text/vcard

7-Zip Archive

application/x-7z-compressed

Bzip2 Archive

application/x-bzip2

Microsoft Cabinet Archive

application/vnd.ms-cab-compressed

GZIP Archive

application/gzip

RAR Archive

application/vnd.rar

Tarball Archive

application/x-tar

ZIP Archive

application/zip

AutoCAD Drawing

application/acad

Bitmap Image

image/bmp

GIF Image

image/gif

JPEG Image

image/jpeg

Photoshop Image

image/vnd.adobe.photoshop

PNG Image

image/png

TIFF Image

image/tiff

WebP Image

image/webp

Adaptive Multi-Rate Wideband Audio

audio/amr

Dolby Digital AC-3 Audio

audio/ac3

FLAC Audio

audio/flac

MP3 Audio

audio/mpeg

Ogg Vorbis Audio

audio/ogg

Ogg Opus Audio

audio/opus

Waveform Audio

audio/wav

ASF Audio

video/x-ms-asf

3GPP Video

video/3gpp

AVI Video

video/x-msvideo

QuickTime Video

video/quicktime

MP4 (MPEG-4) Video

video/mp4

Matroska (MKV) Video

video/x-matroska

ASF Video

video/x-ms-asf

DOS Executable

application/vnd.microsoft.portable-executable

Windows Executable

application/vnd.microsoft.portable-executable

Linux ELF Executable

application/x-elf

Linux Shared Library

application/x-elf

Linux PIE Executable

application/x-elf

Unknown Binary Data

application/octet-stream

Last modified: 08 November 2024