v1 stable

    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.

    4 endpoints
    <50ms p99
    Bearer auth
    OpenAPI-backed
    POST /api/v1/links/shorten
    # Request
    curl -X POST \
    "https://1get.site/api/v1/links/shorten" \
    -H "Authorization: Bearer 1gt_live_••••••••" \
    -H "Content-Type: application/json" \
    -d '{ "url": "https://example.com/very-long-path"}'
    # 201 Created
    {
    "data": {
    "id": "lnk_01jf8x2a4m...",
    "short_url": "https://1get.site/my-link",
    "clicks": 0
    }
    }
    Current page
    Authentication & Quickstart

    Authentication & Quickstart

    Use a scoped API key, call one primary shorten endpoint, and keep every machine mutation tied to an organization, plan, and request trail.

    Base path
    /api/v1/*
    Auth
    Authorization: Bearer <api_key>
    Primary lane
    POST /api/v1/links/shorten
    Machine context
    Org, scopes, and plan are derived from the API key

    Why this page exists

    The external API is built for machine-to-machine traffic. Human administrators log into the dashboard to create keys and review usage; apps, agents, automations, and internal tools authenticate with scoped API keys against /api/v1/*.

    Request reference

    Headers

    FieldTypeRequiredDescriptionExample
    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

    FieldTypeRequiredDescriptionExample
    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 /api/v1/* only for external callers. The dashboard continues to use session-based internal APIs.
    • Prefer narrow scopes per automation instead of handing every worker a wildcard key.
    • Use the public OpenAPI JSON when generating typed clients or external SDK stubs.
    Rate limits and metering
    • Rate limits are plan-aware and enforced after API-key authentication succeeds.
    • Invalid or missing credentials are handled by separate anonymous-abuse limits.
    • The usage meter is subscription-level; per-key activity is tracked separately for portal visibility.
    Error model
    • API_KEY_MISSING and API_KEY_INVALID are returned before the route touches tenant data.
    • API_SCOPE_FORBIDDEN means the key exists but does not include the scope that route requires.
    • PLAN_LIMIT_EXCEEDED means the organization is valid, but the current billing window has no remaining allowance for that metric.
    API_KEY_MISSING
    API_KEY_INVALID
    API_SCOPE_FORBIDDEN
    API_ACCESS_DISABLED
    RATE_LIMITED
    VALIDATION_FAILED
    PLAN_LIMIT_EXCEEDED
    CONFLICT
    IDEMPOTENCY_CONFLICT
    IDEMPOTENCY_IN_PROGRESS
    Next surface

    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.