Short URLs

This resource describes the shortened links and the metadata associated to them


Parameters

Name In Type Required Description
org path string true Organization name as it is registered in Mas-Stack
customSuffix query boolean false Filter for customSuffixed Short-URL
longUrl query string false Filter for long URL shortened
updatedAgent query string false Filter for last updated agentId
updatedTime[eq] query string false Filter for last updated timestamp (equals)
updatedTime[gt] query string false Filter for last updated timestamp (greater/later than)
updatedTime[gte] query string false Filter for last updated timestamp (greater/later than or equal to)
updatedTime[lt] query string false Filter for last updated timestamp (less/sooner than)
updatedTime[lte] query string false Filter for last updated timestamp (less/sooner than or equal to)
limit query integer(int64) false Limit of results in the response
offset query integer(int64) false Offset applied to results for pagination

Request example

1
2
3
4
5

curl -X GET https://communications.masstack.com/v2/orgs/yoigo/short-urls?customSuffix='true'&longUrl='https://masmovil.com/'&updatedAgent='loli@cuco.com'&updatedTime[eq]='2023-02-10T09:03:52.765073Z'&updatedTime[gt]='2023-02-10T09:03:52.765073Z'&updatedTime[gte]='2023-02-10T09:03:52.765073Z'&updatedTime[lt]='2023-02-10T09:03:52.765073Z'&updatedTime[lte]='2023-02-10T09:03:52.765073Z'&limit='20'&offset='0' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Successful URL search ShortUrlResponse
400 Bad Request Bad Request ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
org path string true Organization name as it is registered in Mas-Stack
body body CreateShortUrlRequestDto true Long URL to be shortened

Request body - instance of CreateShortUrlRequestDto

1
2
3
4
5
{
  "longUrl": "https://longurl.com/with/its/long/path",
  "customSuffix": "helpPage",
  "length": "5"
}
Name Type Required Description
longUrl string false Long URL that is required to be shortened
customSuffix string false Custom suffix to use instead of generating a random string
length string false User-defined length of the link

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

curl -X POST https://communications.masstack.com/v2/orgs/yoigo/short-urls \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'longUrl': 'https://longurl.com/with/its/long/path',
  'customSuffix': 'helpPage',
  'length': '5'
}" 

Responses

Code Meaning Description Schema
200 OK Already shortened URL ShortUrlResponse
201 Created Successful URL shortening ShortUrlResponse
400 Bad Request Client error ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
org path string true Organization name as it is registered in Mas-Stack
linkDomain path string true Domain of link
linkSuffix path string true Suffix of link

Request example

1
2
3
4
5

curl -X GET https://communications.masstack.com/v2/orgs/yoigo/short-urls/masstack.link/1234567 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Successful URL search ShortUrlResponse
404 Not Found URL not found ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Parameters

Name In Type Required Description
org path string true Organization name as it is registered in Mas-Stack
linkDomain path string true Domain of link
linkSuffix path string true Suffix of link
body body CreateShortUrlRequestDto true Long URL to update current one

Request body - instance of CreateShortUrlRequestDto

1
2
3
4
5
{
  "longUrl": "https://longurl.com/with/its/long/path",
  "customSuffix": "helpPage",
  "length": "5"
}
Name Type Required Description
longUrl string false Long URL that is required to be shortened
customSuffix string false Custom suffix to use instead of generating a random string
length string false User-defined length of the link

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

curl -X PUT https://communications.masstack.com/v2/orgs/yoigo/short-urls/masstack.link/1234567 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'longUrl': 'https://longurl.com/with/its/long/path',
  'customSuffix': 'helpPage',
  'length': '5'
}" 

Responses

Code Meaning Description Schema
200 OK Successful URL update ShortUrlResponse
400 Bad Request Client error ResponseErrorDto
404 Not Found ID not found ResponseErrorDto
500 Internal Server Error Server Error ResponseErrorDto

Endpoints

CMS

    Communications

      Short URLs

        Communication Types

          Examples

            Templates