Documentation


API Reference

The surfgate.app API provides endpoints you connect to using your web-service user license key. These endpoints represent actions like predicting,  getting already predicted potential content violation rates (PCVR) or creating crawler tasks.

This API reference provides information on available endpoints and how to interact with them. To learn more about the API, visit API endpoints documentation.

Error Codes

Learn about surfgate.app error codes and what they mean.

This page contains codes and descriptions of all errors that may occur when you communicate with the surfgate.app API.

If after reading this section you are still not sure how to interpret a specific error, contact the Support Team.

General error codes

These are the common error codes, which may be returned when you communicate with the  system.

Error code Description
100 No such resource
101 The resource cannot be evaluated. It is currently in progress
102 The resource is declined
103 The resource is not reachable
104 Feature extraction process failed for the resource
200 The Model or the vectorizer is not set
300 The license key is invalid
301 The license key has expired
302 The license key already exists
303 An error occurred while creating a license key
304 An error occurred while updating the license key
305 Not enough permissions
306 An error occurred while deleting the license key
400 Invalid JSON input
415 Unsupported Media Type
500 This customer email already exists
501 An error occurred while creating a user
502 The user does not exist
600 The field value cannot be empty
601 The field value is too short
602 The field value is too long
603 The field value is too small
604 The field value is too high
605 The field value has incorrect type
606 The field value is not accepted. Please check API documentation for possible values
607 The field is not a part of this request
608 Required field is missing for this request
700 An error occurred while creating a task
701 The task cannot be processed. It is currently in progress
702 No such task
703 The task is still in progress. Please check again later or wait for a notification message on the provided return_url endpoint
704 The task is declined

 

Testing surfgate.app API with Postman

What is Postman?

Postman is an app for easy RESTful API exploration. It allows you to test API calls without writing the code or installing the SDKs.

Step 1: Get the Postman and download our prepared API collection

Visit https://www.getpostman.com and install preferred version for you.

Get the full surfgate.app API library

Step 2: Create your Postman environment

Our collection makes use of Postman’s environment variables to easily manage your API credentials. Please follow the steps below to create an environment in your Postman:

  1. Open the “Environment options” panel by clicking on the gear icon, then click Manage Environments. To create a new environment, click Add.
  2. Name your environment something that indicates it is using surfgate.app API credentials, for example “surfgate.app API”.
  3. Add a variable/value pair with “PROTOCOL” as the variable and “https” as the value.
  4. Add a variable/value pair with “HOSTNAME” as the variable and “go.surfgate.app” as the value.
  5. Add a variable/value pair with “PORT” as the variable and “443” as the value.
  6. Add a variable/value pair with “KEY” as the variable and your license key as the value.
  7. When you are finished adding variable/value pairs, click Add. Now, any test calls you make using this environment will automatically fill in the PROTOCOL, HOSTNAME, PORT and KEY with your credentials.