(ShortURLs)
REST APIs for managing short URLs
- Create - Shorten a URL.
Shorten a URL.
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
CreateRequestBody req = new CreateRequestBody() {
Url = "http://limp-pastry.org",
};
var res = await sdk.ShortURLs.CreateAsync(req);
// handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
CreateRequestBody | ✔️ | The request object to use for the request. |
Error Object | Status Code | Content Type |
---|---|---|
SpeakeasySDK.Models.Errors.SDKException | 4xx-5xx | / |