Nothing found

Changing URLs

Points an existing short link at a different target URL. The short link itself stays the same, so it keeps working in messages that have already been sent.

API URL

The URL used to send the HTTP requests:

https://portal.bulkgate.com/api/1.0/shortener/change
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/change 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 -
short_url Abbreviated url to be changed Yes -
target_url New URL Yes -

Request example

POST /api/1.0/shortener/change HTTP/1.1 Host: portal.bulkgate.com Content-Type: application/json { "application_id": 451, "application_token": "NKN02TWE6NfBkfl-your-secret-token-Wf05GaqLIWLW4aBj", "short_url": "ur7.wf/K", "target_url": "www.insymbo.com" }

Response

In case of success:

{ "data": { "short_url": "http://ur7.wf/K", "target_url": "http://www.insymbo.com/", "final_url": "www.insymbo.com", "title": "Online assessment tool for employee selection - INSYMBO" } }

The response fields work the same as in shorten, with one difference: final_url here carries the address exactly as you sent it, without the scheme being added.

In case of error:

{ "type": "url_not_found", "code": 400, "error": "Url not found", "detail": null } { "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, the Shortener API returns its own:

TYPE WHEN IT HAPPENS
url_not_found short_url does not exist in the account.
url_is_not_valid The new target_url could not be parsed.
domain_is_not_white_listed The new target domain is not whitelisted (for restricted domains).
the_per_minute_quota_has_been_exceeded The quota of 20 requests per minute is used up.
Was this page helpful?