POST
Creates a shortened URL.
Based on the type of shortURL created, there are different required fields: generic shortURLs require only url; chat_invite shortURLs require url, campaignRefURL and scRefURL.
URL: |
https://<ServerIP>:<Port>/ccp-webapp/ccp/shorturl/ | ||
HTTPS method: |
POST | ||
Parameters: |
Type: optional. The shortURL type. Valid values are generic (the default) and chat_invite. URL: required. The URL being shortened (required). campaignRefURL: required for chat_invite type. The refURL of the campaign for which this short URL is being created. scRefURL: required for chat_invite type. The refURL of the inviting social contact. active: optional. For the chat_invite type, active means that the shortURL was successfully sent with the reply as a chat invitation. Valid values are false (the default) or true. expireDate: optional. The expiration date of the shortened URL. Defaults to 24 hours from creation. Expiration may be no more than 30 days in the future. | ||
Example XML request payload: |
Or, for a generic shortURL:
| ||
HTTPS response headers: |
If successful, the location field in the http response header will have a URL to the newly created short URL. A GET of the newly created short URL will provide the shortened URL. See API Conventions for error information. |