Links

Get Link by Hash

Returns public information about links.

Example Request

curl -i https://api.oktopost.com/v2/link/pEhsLi

Example Result

The LongUrl represents the URL entered by the user while the FinalUrl represents the final destination of the redirect.

{
    "Link": {
        "Created": "2019-02-25 07:50:35",
        "Hash": "pEhsLi",
        "LongUrl": "https://www.oktopost.com",
        "FinalUrl": "https://www.oktopost.com?utm_campaign=2019-02+General+Campaign&utm_content=Oktopost-twitter&utm_source=twitter&utm_medium=social",
        "Params": {
            "utm_campaign": "2019-02 General Campaign",
            "utm_content": "Oktopost-twitter",
            "utm_medium": "social",
            "utm_source": "twitter"
        },
        "ShortUrl": "https://okt.to/pEhsLi"
    },
    "Result": true
}

List Links

Example Request

curl -i https://api.oktopost.com/v2/link

Input

  • hash (Optional)
  • credentialIds (Optional) Comma separated credential Ids

Example Result

All items are sorted by creation date.

{  
    "Result":true,
    "Items":[  
        {  
            "Id":"008000000000000",
            "Created":"2015-10-20 00:24:02",
            "Modified":"2015-11-03 18:20:35",
            "AccountId":"001000000000000",
            "CampaignId":"002000000000000",
            "MessageId":"005000000000000",
            "PostId":"004000000000000",
            "PostlogId":"007000000000000",
            "Hash":"2y8p21",
            "LongUrl":"http:\/\/www.oktopost.com",
            "ShortUrl":"http:\/\/okt.to\/2y8p21",
            "Clicks":112,
            "Converts":4,
            "CredentialId":"003-001000000000000-12345678"
        }
    ],
    "Total":1
}

Update Links

Example Request

curl -i https://api.oktopost.com/v2/link/008000000000000 -X POST \
-d longUrl="http://www.oktopost.com/blog"

Example Result

{  
    "Result":true,
    "Items":[  
        {  
            "Id":"008000000000000",
            "Created":"2015-10-20 00:24:02",
            "Modified":"2015-11-03 18:20:35",
            "AccountId":"001000000000000",
            "CampaignId":"002000000000000",
            "MessageId":"005000000000000",
            "PostId":"004000000000000",
            "PostlogId":"007000000000000",
            "Hash":"2y8p21",
            "LongUrl":"http:\/\/www.oktopost.com\/blog",
            "ShortUrl":"http:\/\/okt.to\/2y8p21",
            "Clicks":112,
            "Converts":4,
            "CredentialId":"003-001000000000000-12345678"
        }
    ],
    "Total":1
}

Feedback and Knowledge Base