---
name: my-url-to
version: 1.0.0
description: >
Stateful URL shortening service. Generate compact `myurlto.com` redirect links to long URLs. Often invoked implicitly by other backend services for outbound links.
triggers: [shorten url, short link, url shortener, myurlto, redirect, short_code]
checksum: sha256-pending
---
# MyURLToAPI
URL shortening: compact redirect URLs under `myurlto.com`.
## Capabilities
<!-- llm:start -->
Generates a short redirect URL for any long target. The short link 302-redirects to the original. Stateful — short codes are stable until explicitly deleted server-side.
Note: agents don't always need to call this explicitly. Internal MyAPI services (e.g. payment checkout flows) automatically shorten certain links before returning them. Only call `myapi url shorten` when a user or workflow specifically asks for a short link, or when generating a URL that will be displayed to users in a constrained surface (SMS, QR codes, etc.).
<!-- llm:end -->
## Commands
<!-- generated:start -->
| Command | What it does |
|---|---|
| `myapi url shorten <url>` | Generate a short redirect URL for a long target |
The redirect itself is public:
```
GET /{domain}/{code}
→ 302 Location: <original URL>
```
No auth required to follow the redirect. Errors: `404` for unknown code or code longer than 16 chars.
<!-- generated:end -->
## Examples
<!-- llm:start -->
```bash
# Shorten
myapi url shorten "https://example.com/very/long/path?parameters=true"
# → { "short_code": "8f2a1b9c", "short_url": "https://myurlto.com/example.com/8f2a1b9c" }
# Use the short URL anywhere (resolves at the apex — NOT api.myurlto.com)
curl -L "https://myurlto.com/example.com/8f2a1b9c"
```
<!-- llm:end -->
## Notes
- The domain segment of the short URL is extracted from the target URL's root domain.
- Short codes are stable — once minted, they don't change.
- Required: a non-empty `url`. `400` if missing.
Run `myapi url --help` for flag reference.