POST url/shorten

Request Information

URI Parameters

None.

Body Parameters

AddUrlApiRequestModel
NameDescriptionTypeAdditional information
Token

string

Required

Url

string

None.

CustomSegment

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Token": "sample string 1",
  "Url": "sample string 2",
  "CustomSegment": "sample string 3"
}

application/xml, text/xml

Sample:
<AddUrlApiRequestModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/UrlShortener.ViewModel">
  <CustomSegment>sample string 3</CustomSegment>
  <Token>sample string 1</Token>
  <Url>sample string 2</Url>
</AddUrlApiRequestModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

AddUrlApiResponseModel
NameDescriptionTypeAdditional information
longUrl

string

None.

shortUrl

string

None.

message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "longUrl": "sample string 1",
  "shortUrl": "sample string 2",
  "message": "sample string 3"
}

application/xml, text/xml

Sample:
<AddUrlApiResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/UrlShortener.ViewModel">
  <LongUrl>sample string 1</LongUrl>
  <Message>sample string 3</Message>
  <ShortUrl>sample string 2</ShortUrl>
</AddUrlApiResponseModel>