v1

latestOpenAPI 3.0.12026-07-2471135326.0 KB
links

Create Short URLs

.

post/v2/links/batch

Query parameters

sizeinteger
<p><b><i>Required when creating a Batch Single Long URL</i></b></p> <p>Enter the total number of short URLs to generate.</p>

Request body

externalIdstring

Alphanumeric identifier used for reporting purposes.

domainstring
<p>Domain which short URL will belong to (string without http/https or /).</p><p>Enter the custom domain in case you have requested it from the support team.</p><p>By default is <code>'msgi.me'</code></p>
dataobject
<p>This array can be used by the customer to enter and store additional information about the short URL.</p><p><b>This additional information must be set in JSON format at key/value level.</b></p><p>For example:</p><p><code>'data': { 'name': 'Elizabeth Smith', 'email': 'eli7218@mailpoof.com' }</code></p>

Example request

{
  "listUrl": [
    {
      "longUrl": "www.MyWebsite.com",
      "externalId": "123456789abcde"
    }
  ],
  "externalId": "18",
  "domain": "domain.me"
}

Response

Successfully created

Example response

{
  "meta": {
    "timestamp": 1597166699457,
    "transactionId": "70169d77-c165-4795-9932-35b8a3af96fb",
    "explain": "a descriptive text"
  },
  "pagination": {
    "offset": "e3293115e2ec5f466c67e047",
    "limit": 6,
    "next": "5f466c67e047e3293115e2ec",
    "page": 1,
    "pages": 10,
    "total": 1000
  },
  "items": [
    {
      "id": "id",
      "longUrl": "wwww.mylongUrl.com",
      "externalId": "18",
      "callbacks": [
        "callbacks"
      ],
      "shortLink": "shortLink.me/wrh6Hn",
      "date": "2020-07-20T21:11:12.352Z"
    }
  ]
}