API Basics
All API calls can be made with either POST or GET. If using GET, supply the paramter forceGET with no arguments. All calls can be made to
https://frank.salmick.com/url/ajax/API_NAME.php
Every call must include your API key, passed by the variable key. For example, you can call changeKey.php (a page that takes no additional arguments) with
https://frank.salmick.com/url/ajax/changeKey.php?forceGET=true&key=your_key
Your API key can be found by clicking on "Account" in the top Navbar then "Your API key".
All APIs return a JSON object of key-value pairs.
A uniqID is a link's uniq_id value in listLinks and can be found on the settings page of any link.
An API key will be overriden by a logged-in session, so if you want to test with an API key you have to log out of your account or all actions will apply to your account, not to the API key's account.
API Errors
If your API call fails, it will return with type of danger and an error. Below are the following errors.
Calling an API and attempting to pass a URL or other object the API key does not own:
{"type":"danger","msg":"You do not have permission to manage that URL. No changes have been saved."}
Calling an API without an API key or being logged in:
{"type":"danger","msg":"Your session has expired or you are missing an API key."}
Calling an API with an invalid API key:
{"type":"danger","msg":"That is an invalid API key."}
Calling an API without all required paramaters. missingArgs is a nested array of missing arguments:
{"type":"danger","msg":"You are missing one or more required arguments.","missingArgs":["name","friendly","endpoint"]}
Change API key
Warnings: Once called, you will need supply the new API key in all future calls. The old key is completly replaced, and will immediately stop working.
Page URL: https://frank.salmick.com/url/ajax/changekey.php
Description: Updates the user's API key to a new, randomly generated key.
Required paramaters:
  • key - Your API key
Returns:
  • newKey - The new generated key
Example:
https://frank.salmick.com/url/ajax/changekey.php?forceGET&key=your_key
Example return:
{"newKey":"26347f6156b2a7cda8143926384df2164a59ad5c"}
Get Link Details
Warnings: There are no warnings for this action as it is a read-only action.
Page URL: https://frank.salmick.com/url/ajax/details.php
Description: View details about a link, given its uniqID.
Required paramaters:
  • key - Your API key
  • id - The link's uniqID
Returns:
  • type - Success or danger (standard failure messages if danger)
  • msg - A sublist of all data about the link. If information is not known, it will be replaced with null. Note that mysql_id and DATE_URL_VISITED are both integers, while everything else is a string.
Example:
https://frank.salmick.com/url/ajax/details.php?forceGET&key=your_key&id=link_id
Example return:
{"type":"success","msg":[{"X-Forwarded-For":"REDACTED","CF-Connecting-IP":"REDACTED","accept-language":"REDACTED","referer":"REDACTED","user-agent":"REDACTED","DATE_URL_VISITED":1924671654,"mysql_id":194,"DATE_HUMAN_READABLE":"Mar-21 01:07:02 PDT"}]}
Delete an Entire Link
Warnings: This action is non-reversable. This action also deletes all associated clicks on the link.
Page URL: https://frank.salmick.com/url/ajax/delete.php
Description: Deletes a link and all associated clicks.
Required paramaters:
  • key - Your API key
  • id - The link's uniqID
Returns:
  • type - Success if it deleted, danger if something went wrong
  • msg - Success or error message
Example:
https://frank.salmick.com/url/ajax/delete.php?forceGET&key=your_key&id=link_id
Example return:
{"type":"success","msg":"Successfully deleted link!"}
Delete a Specific Click
Warnings: This action is non-reversable.
Page URL: https://frank.salmick.com/url/ajax/deleteSpecific.php
Description: Deletes a specific click by ID
Required paramaters:
  • key - Your API key
  • clickid - The click's uniqID from details.php $click["msg"][click_id]["mysql_id"]
  • uniqid - The link's uniqID
Returns:
  • type - Success if it deleted, danger if something went wrong
  • msg - Success or error message
Example:
https://frank.salmick.com/url/ajax/deleteSpecific.php?forceGET&key=your_key&uniqid=fa15412561f56sd456r4156f1zfdasfqaf&clickid=132
Example return:
{type: "success", msg: "Success!"}
List All of a User's Links
Warnings: There are no warnings for this action as it is a read-only action.
Page URL: https://frank.salmick.com/url/ajax/listLinks.php
Description: Lists all of a user's links, along with the metadata of each link
Required paramaters:
  • key - Your API key
Returns a nested array of all links, containing:
  • name - The unique trackerID (not the uniqueID) of the link. This is the "NAME" in https://frank.salmick.com/v?i=NAME
  • owner - The email of the owner
  • timestamp - The epoch time of creation
  • mysql_id - Auto incremented ID of the link
  • endpoint - The endpoint of the link
  • bitly - The bitly link
  • friendly - The friendly name (set by the user)
  • deleted - If it's deleted or not. Only non-deleted links are returned, so this will always be 0.
  • uniq_id - The unique ID of the link.
  • active - If it's active (1) or not (0). An inactive link will act as if it's deleted, but can be re-enabled by the user at any time.
  • shareKey - The key a user can use to share the link.
  • enable_logging - If 1, then logging on the link is enabled. If 0, this only acts as a short link and does not log any visitor information.
Example:
https://frank.salmick.com/url/ajax/listLinks.php?forceGET&key=your_key
Example return:
{"type": "success",
  "msg": {
    "1": {
      "name": "LinkOne",
      "owner": "Owner@Email.com",
      "timestamp": 1536792229,
      "mysql_id": 336,
      "endpoint": "https://google.com",
      "bitly": "https://j.mp/abcd",
      "friendly": "Friendly name",
      "deleted": 0,
      "uniq_id": "c718fc5c5dafsd87d295ebb2643b24e1ba722f18",
      "active": 1,
      "shareKey": "d6d4852b3fds4e27c5ab0c4bd916ffaae1f1951f",
      "enable_logging": 0
    },
    "2": {
      "name": "LinkTwo",
      "owner": "Owner@Email.com",
      "timestamp": 1526136981,
      "mysql_id": 334,
      "endpoint": "https://bing.com",
      "bitly": "https://j.mp/efgh",
      "friendly": "Friendly name two",
      "deleted": 0,
      "uniq_id": "0d6skqo1903555c6ad9effbd1e3b572bac8a078d",
      "active": 1,
      "shareKey": "4bc891837f0d640ef6dd57dfc86f929dab97b954",
      "enable_logging": 0
    }
  }
}
Disable or Enable a Link
Warnings: There are no warnings associated with this API call, although it is not a read-only action.
Page URL: https://frank.salmick.com/url/ajax/disable.php
Description: Inverts the disabled value of a link (disabled will become enabled and enabled will become disabled)
Required paramaters:
  • key - Your API key
  • id - The link's uniqID
Returns:
  • type - Success if it deleted, danger if something went wrong
  • msg - Success or error message
Example:
https://frank.salmick.com/url/ajax/disable.php?forceGET&key=your_key&id=fa15412561f56sd456r4156f1zfdasfqaf
Example return:
{type: "success", msg: "Success!"}