Skip to content

WebAV API & SDKs ​

Anti-Virus for Web App Developers

SDKs ​

Official SDKs

Upcoming SDKs

  • PHP (direct & Laravel package)

Virus Status Codes ​

In this API the responses often contain a virus_status field as an integer code and a virus_status_label as a string label of the scan status.

CodeLabelDescription
0PendingThe scan is pending.
1PassedThe scan passed.
2VirusThe scan found a virus!
3UnableThe scan was unable to complete.
4SkippedThe scan was skipped.

Scans are skipped if they exceed the maximum file size. You can scan lager files via the Upload file over HTTPS approach.

If you get the Unable status, this is likely due to an issue with the file_url or something on our end. You can reach out by email for support.

REST API ​

Base URL: https://api.webtender.host

Authentication ​

All API endpoints require authentication using a valid API key. The API key can be passed in the query parameter or in the request body as api_key. Unauthorized requests will result in an HTTP 401 status code with a corresponding error message.

Get your API key from the WebTender Console.

Upload file over HTTPS ​

A common usecase, POST a file and retrieve an UUID to query later with the status API

POST /api/webav/scan ​

Warning: maximum upload is 100MB over HTTPS. See URL scanning for larger files.

Request Headers ​

HeaderValue
Content-Typeapplication/json

Request Body ​

FieldTypeRequiredDescription
api_keystringYesThe API key for the authorized user
fileBlobYesThe file you are uploading

Response Body ​

FieldTypeDescription
iduuidThe file scan ID
virus_statusintegerStatus of the file scan as integer code
virus_status_labelstringStatus of the file scan as string
updated_attimestampThe last time the scan was received or completed processing
created_attimestampThe scan was added to the processing queue

Scan by public URL ​

Use a public URL to start a scan job.

POST /api/webav/scan ​

Great for scanning temporary URLs from your S3 or Azure Blob Storage. Supports the largest files up to 512MB.

Request Headers ​

HeaderValue
Content-Typeapplication/json

Request Body ​

FieldTypeRequiredDescription
api_keystringYesThe API key for the authorized user
file_urlstringYesA public URL for the file to scan

Response Body ​

FieldTypeDescription
iduuidThe file scan ID
virus_statusintegerStatus of the file scan as integer code
virus_status_labelstringStatus of the file scan as string

Recently Scanned Status API ​

Query the status of a file scan.

GET /api/webav/status ​

Provides the status of recent scans. This data is ordered by latest first so the first item in the array is the most recent scan. Be careful of changing data when loading subsequent pages.

Request Headers ​

HeaderValue
Content-Typeapplication/json

Request Query Params ​

FieldTypeRequiredDescription
api_keystringYesThe API key for the authorized user
pageintegerNoThe page offset for the results

Response Body ​

FieldTypeDescription
current_pageintegerCurrent page
last_pageintegerLast page
per_pageintegerNumber of FileStatus' per page
dataFileStatus[]Array of file scan statuses

The data property contains and array of File Scan Statuses, in the following structure.

FileStatus ​

FieldTypeDescription
iduuidThe file scan ID
virus_statusintegerStatus of the file scan as integer code
virus_status_labelstringStatus of the file scan as string
updated_attimestampThe last time the scan was received or completed processing
created_attimestampThe scan was added to the processing queue

Scan Status API ​

Query the status of a file scan.

GET /api/webav/status/{id} ​

Provide the UUID (id) from either of the previous requests to get the status of the scan.

Request Headers ​

HeaderValue
Content-Typeapplication/json

Request Body ​

FieldTypeRequiredDescription
api_keystringYesThe API key for the authorized user

Response Body ​

FieldTypeDescription
iduuidThe file scan ID
virus_statusintegerStatus of the file scan as integer code
virus_status_labelstringStatus of the file scan as string
updated_attimestampThe last time the scan was received or completed processing
created_attimestampThe scan was added to the processing queue