Nothing found

Available domains

Returns the list of short domains available to your account. The values from this list are what belongs in the url_type parameter when shortening a link.

API URL

The URL used to send the HTTP requests:

https://portal.bulkgate.com/api/1.0/shortener/domains
Note

If the request does not reach its destination, repeat it on the backup server backup1.bulkgate.com.

Supported HTTP methods

  • POST - application/json
POST /api/1.0/shortener/domains HTTP/1.1 Host: portal.bulkgate.com Content-Type: application/json
Note

The API has a quota of 20 requests per minute.

Parameters table

PARAMETER NAME VALUE MANDATORY DEFAULT VALUE
application_id Application ID Yes -
application_token Application authentication token Yes -
variant Shape of the response - list, key_value or label_value, see Response shapes No list

Response shapes

All three variants carry the same domains and differ only in structure - pick the one your form consumes directly.

VALUE SHAPE OF data
list An array of strings.
key_value An object where both the key and the value is the domain.
label_value An array of {"label": …, "value": …} objects.
Note

The list is not the same for every account. It also contains your own domains if you have any, and those come first - the first domain in the list is also the one shorten uses when you omit url_type.

Request example

POST /api/1.0/shortener/domains HTTP/1.1 Host: portal.bulkgate.com Content-Type: application/json { "application_id": 451, "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj", "variant": "list" }

Response

In case of success:

{ "data": [ "ur7.wf", "ms6.fr", "ur7.yt", "ur7.tf", "ms6.wf", "ms6.tf", "track-message.com" ] }

The same list in the key_value variant:

{ "data": { "ur7.wf": "ur7.wf", "ms6.fr": "ms6.fr" } }

And in the label_value variant:

{ "data": [ {"label": "ur7.wf", "value": "ur7.wf"}, {"label": "ms6.fr", "value": "ms6.fr"} ] }

In case of error:

{ "type": "the_per_minute_quota_has_been_exceeded", "code": 400, "error": "The per minute quota has been exceeded", "detail": null }

Where:

  • type and error (description of the error) can be found in the error types table
  • code is the HTTP error code
  • detail is additional information about the error

Shortener API error types

Besides the general types, this endpoint returns its own:

TYPE WHEN IT HAPPENS
the_per_minute_quota_has_been_exceeded The quota of 20 requests per minute is used up.
Was this page helpful?