Mocker Apps

Mocker Apps

  • Docs
  • API
  • Issues
  • Blog

›Clipboard API

Url Shortner API

  • Create
  • View
  • Edit
  • Delete

Clipboard API

  • Create
  • View
  • Edit
  • Delete

Polls API

  • Create
  • View
  • Edit
  • Delete

API : Create New Clipboard

Check the Clipboard App.

End Point

METHOD : POST

https://mocker.in/api/urls

Minimum Required Parameters

{
    "clip":"your clipboard data"
}

Above parameters are required fields. clip field is where you can put your clipboard data that is to be shared with other users. slug or URL ID will be generated automatically. Note: use JSON parse to make it into string and safe for creating clipboards.

All Parameters

{
    "slug": "test2",
    "clip": "your clip data",
    "edit_token": "vno6QmIhBa",
    "password": "123456",
    "active_from": "23-03-2020",
    "active_till": "28-03-2020",
    "is_onetime": false
}

Above is the completely list of parameters. slug can be provided if you want a custom short url for your clipboard. The slug value will decide the Short URL. https://mocker.in/{slug}. edit_token is different from password. password is the password that your users will have to enter before they are redirected to the website specified in long_url. This feature maybe used to password protect your shortened links. Whereas edit_token is required to edit the Short URL in future. It is very important to store this somewhere. active_from and active_till is used to enable the poll only at a specific duration. is_onetime if set to true will automatically delete the clipboard after it is used once.

Response

{
    "status": "success",
    "message": "Your Clipboard is created.",
    "data": {
        "short_id": "test1",
        "edit_token": "sI8HEUVGpa",
        "short_url": "https://mocker.in/test1",
        "edit_url": "https://mocker.in/test1/sI8HEUVGpa"
    }
}

The reponse will always return two parameters, status and message. If status is success then the action is complete. and if it is error then that means some problem has occured. The problem details can be found in the message parameter. Additionally creating a new short url returns the short_id,edit_token,short_url and 'edit_url' inside the data parameter. Once you have the short_id and edit_token you may get the complete details of the Clipboard and also edit it.

← DeleteView →
  • End Point
    • Minimum Required Parameters
    • All Parameters
    • Response
Mocker Apps
Docs
URL ShortnerPolls
API
URL ShortnerPolls
More
BlogGitHub RepoStarContact Developer
Copyright © 2020 Shiburaj