Reference docs
for the machine‑auth
link API.
Operator-first surface for API-key auth, endpoint behavior, request schemas, error codes, and same-origin live testing.
Shorten link and return QR metadata
Create a short link for your organization and return QR metadata in the same response.
/api/v1/links/shortenScoped API key
links:write
Requires an API-enabled paid plan. Basic supports default QR output; richer QR customization requires Business or higher.
`{ data: ... }` with stable error codes on failures
Why this page exists
This is the primary machine-to-machine endpoint for applications, agents, automations, and internal tools. It reuses 1get link creation logic, supports idempotent retries, and returns the absolute short URL plus QR metadata without requiring a follow-up call.
Headers
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | Optional | Preferred authentication header. Send a scoped API key using the Bearer scheme. | Bearer 1gt_live_1234567890abcdef |
X-API-Key | string | Optional | Alternative authentication header. Use this only when Authorization headers are difficult to inject. | 1gt_live_1234567890abcdef |
X-Request-Id | string | Optional | Optional caller-provided correlation ID. When omitted, 1get generates one and echoes it back in responses. | req_a1f7f4bf |
Idempotency-Key | string | Optional | Recommended for safe retries on POST /links/shorten. Reusing a key with a different payload returns IDEMPOTENCY_CONFLICT. | idem_launch_job_001 |
Request body fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
original_url | string | Required | Destination URL to shorten. | https://example.com/product/launch?ref=campaign |
custom_slug | string | null | Optional | Optional custom slug. 3-50 characters using letters, numbers, hyphens, and underscores. | launch-2026 |
expires_at | string | null | Optional | Optional future expiry timestamp. | 2026-07-01T00:00:00.000Z |
password | string | null | Optional | Optional password for protected redirects. | null |
max_clicks | integer | null | Optional | Optional click cap. | — |
redirect_type | PERMANENT_301 | TEMPORARY_302 | Optional | — | TEMPORARY_302 |
tags | string[] | Optional | Optional tags. Maximum 10. | ["launch","email"] |
utm_source | string | Optional | Optional UTM source override. | newsletter |
utm_medium | string | Optional | Optional UTM medium override. | email |
utm_campaign | string | Optional | Optional UTM campaign override. | launch |
utm_term | string | null | Optional | Optional UTM term override. | null |
utm_content | string | null | Optional | Optional UTM content override. | null |
qr | object | Optional | QR generation preferences. Default PNG/256/black-on-white is included on API-enabled paid plans. | — |
qr.include | boolean | Required | Whether to return QR metadata in the response. | true |
qr.format | PNG | SVG | Required | — | PNG |
qr.size | integer | Required | QR size in pixels. | 256 |
qr.foreground_color | string | Required | 6-digit hex foreground color. | #000000 |
qr.background_color | string | Required | 6-digit hex background color. | #FFFFFF |
Request discipline
- Use custom_slug only when the plan and slug policy allow it.
- The default QR payload is safe on API-enabled paid plans. Richer QR customization is a higher-plan lane.
- Tenant context is always resolved from the API key. Do not send organization ids in your client payloads.
- Shorten traffic is the highest-impact write lane, so it is the rate limit to budget first.
- When the monthly api_calls limit is exhausted, the route returns PLAN_LIMIT_EXCEEDED before writing a new link.
- A 429 response means the current minute-level rate limit is saturated even if monthly quota remains.
- VALIDATION_FAILED surfaces field-level request issues such as malformed URLs or invalid QR options.
- CONFLICT is used for state conflicts such as a slug that is already taken.
- API_SCOPE_FORBIDDEN means the key can authenticate but lacks links:write.
Create or rotate keys from the authenticated portal
Use the dashboard portal when you need scoped key lifecycle management, entitlement visibility, and request activity history.
Shorten link and return QR metadata
Create a short link for your organization and return QR metadata in the same response.
/api/v1/links/shortenScoped API key
links:write
Requires an API-enabled paid plan. Basic supports default QR output; richer QR customization requires Business or higher.
`{ data: ... }` with stable error codes on failures
Why this page exists
This is the primary machine-to-machine endpoint for applications, agents, automations, and internal tools. It reuses 1get link creation logic, supports idempotent retries, and returns the absolute short URL plus QR metadata without requiring a follow-up call.
Headers
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | Optional | Preferred authentication header. Send a scoped API key using the Bearer scheme. | Bearer 1gt_live_1234567890abcdef |
X-API-Key | string | Optional | Alternative authentication header. Use this only when Authorization headers are difficult to inject. | 1gt_live_1234567890abcdef |
X-Request-Id | string | Optional | Optional caller-provided correlation ID. When omitted, 1get generates one and echoes it back in responses. | req_a1f7f4bf |
Idempotency-Key | string | Optional | Recommended for safe retries on POST /links/shorten. Reusing a key with a different payload returns IDEMPOTENCY_CONFLICT. | idem_launch_job_001 |
Request body fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
original_url | string | Required | Destination URL to shorten. | https://example.com/product/launch?ref=campaign |
custom_slug | string | null | Optional | Optional custom slug. 3-50 characters using letters, numbers, hyphens, and underscores. | launch-2026 |
expires_at | string | null | Optional | Optional future expiry timestamp. | 2026-07-01T00:00:00.000Z |
password | string | null | Optional | Optional password for protected redirects. | null |
max_clicks | integer | null | Optional | Optional click cap. | — |
redirect_type | PERMANENT_301 | TEMPORARY_302 | Optional | — | TEMPORARY_302 |
tags | string[] | Optional | Optional tags. Maximum 10. | ["launch","email"] |
utm_source | string | Optional | Optional UTM source override. | newsletter |
utm_medium | string | Optional | Optional UTM medium override. | email |
utm_campaign | string | Optional | Optional UTM campaign override. | launch |
utm_term | string | null | Optional | Optional UTM term override. | null |
utm_content | string | null | Optional | Optional UTM content override. | null |
qr | object | Optional | QR generation preferences. Default PNG/256/black-on-white is included on API-enabled paid plans. | — |
qr.include | boolean | Required | Whether to return QR metadata in the response. | true |
qr.format | PNG | SVG | Required | — | PNG |
qr.size | integer | Required | QR size in pixels. | 256 |
qr.foreground_color | string | Required | 6-digit hex foreground color. | #000000 |
qr.background_color | string | Required | 6-digit hex background color. | #FFFFFF |
Request discipline
- Use custom_slug only when the plan and slug policy allow it.
- The default QR payload is safe on API-enabled paid plans. Richer QR customization is a higher-plan lane.
- Tenant context is always resolved from the API key. Do not send organization ids in your client payloads.
- Shorten traffic is the highest-impact write lane, so it is the rate limit to budget first.
- When the monthly api_calls limit is exhausted, the route returns PLAN_LIMIT_EXCEEDED before writing a new link.
- A 429 response means the current minute-level rate limit is saturated even if monthly quota remains.
- VALIDATION_FAILED surfaces field-level request issues such as malformed URLs or invalid QR options.
- CONFLICT is used for state conflicts such as a slug that is already taken.
- API_SCOPE_FORBIDDEN means the key can authenticate but lacks links:write.
Create or rotate keys from the authenticated portal
Use the dashboard portal when you need scoped key lifecycle management, entitlement visibility, and request activity history.
Move from docs into plans, portal access, and product context
Use the surrounding public surfaces to compare plan lanes, see the developer bridge page, or move into the authenticated API Access portal when you are ready to create real keys.
Positioning, API summary, privacy-first analytics, Bitly-alternative framing, and pricing overview.
Public developer bridge page with API-key auth model, request shapes, QR support, and upgrade path.
Long-form technical guides for Next.js, Python, AI agents, automations, and Bitly migration flows built around the public API surface.
Plan ladder for Free, Basic, Business, and Enterprise with API-adjacent positioning and FAQ.
Partner-program overview for agencies, creators, consultants, and technical partners.
Comparison page for developers evaluating 1get vs Bitly on API approach, speed, privacy, and auditability.
How developers, consultancies, marketing teams, and content creators use 1get — API automation, link analytics, and multi-client workspaces.