API Documentation
RESTful API documentation for developers
https://api.lots.linkAPI Key (Bearer token or X-API-Key header)
33
Authentication
All API requests require authentication using an API key. You can create an API key from your dashboard.
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.lots.link/api/v1/lotslink/link/:link_id/qr_codelinks
/api/v1/lotslink/link/:link_id/qr_codeCreate QR Code
lotslink_create_qr_codeMake a QR code (PNG) for a link's short URL and return its image URL (qr_code_url), ready to download, print or share. The code always opens the short URL, so scans show up as visits in the link's analytics. The URL is also saved on the link (lotslink_get_link, lotslink_list_links); calling again makes a new image and replaces it. QR codes are free and unlimited. Owners and admins can make one for any link, members for links they created; viewers cannot. Requires workspace_id and link_id: call lotslink_list_workspaces, then lotslink_list_links or use the id from lotslink_create_link.
/api/v1/lotslink/linkCreate Link
lotslink_create_linkCreate a short link on lots.link, your free *.lots.link subdomain or a verified custom domain in the workspace, with an optional custom slug, project, expiry and UTM parameters. Links and clicks are free and unlimited; the only limit is up to 1,000 new links per person in any 24 hours. A link on your own custom domain needs that domain to be funded by a plan or credits. Known phishing or malware destinations are refused. To make a QR code for the new link, call lotslink_create_qr_code with the returned link id.
/api/v1/lotslink/link/:idDelete Link
lotslink_delete_linkPermanently delete a link. This action cannot be undone. All associated data including click statistics, tag assignments, and QR codes will be deleted. Members can only delete their own links, while owners and admins can delete any link in the workspace.
/api/v1/lotslink/link/:idGet Link
lotslink_get_linkGet one link with its metadata, UTM parameters, project, custom domain, click count and qr_code_url (empty until lotslink_create_qr_code or the dashboard makes one).
/api/v1/lotslink/linksList Links
lotslink_list_linksList links in a workspace with filters (project, status active/inactive/expired, date range), search by URL or slug, sorting and pagination. Each link includes its click count, project and qr_code_url.
/api/v1/lotslink/link/:idUpdate Link
lotslink_update_linkUpdate link properties including custom slug, expiration date, active status, or project assignment. Members can only update their own links, while owners and admins can update any link in the workspace.
workspaces
/api/v1/lotslink/invitation/acceptAccept Invitation
lotslink_accept_workspace_invitationJoin a workspace from an invitation sent to your LotsLink account's email address (the match ignores letter case). Pass invitation_id from lotslink_list_my_invitations, or the token at the end of the invite link (https://lots.link/invite/<token>). Each invitation works once and expires after 7 days. Someone who was removed before rejoins with the invited role.
/api/v1/lotslink/workspace/:workspace_id/invitations/:invitation_idCancel Invitation
lotslink_cancel_workspace_invitationCancel a pending invitation so its link stops working. Owner or admin only. Get invitation_id from lotslink_list_workspace_members (invitations[].id).
/api/v1/lotslink/workspace/:workspace_id/members/:member_idChange Member Role
lotslink_update_workspace_member_roleChange a workspace member's role to admin, member or viewer. Owner or admin only. The owner's role cannot be changed, an admin cannot change another admin, and ownership cannot be given by a role change. Get member_id from lotslink_list_workspace_members.
/api/v1/lotslink/workspace/:workspace_id/membersInvite Workspace Member
lotslink_invite_workspace_memberInvite someone to a workspace by email. Owner or admin only. LotsLink emails them an invitation link, valid for 7 days, and returns invite_url (share it yourself if email_sent is false). Roles: admin, member or viewer; ownership cannot be given by invitation. Teammates are free and unlimited on every plan. Inviting an address that already has a pending invitation sends it again with a new link. Someone who was removed is invited the same way and rejoins when they accept. Current members cannot be invited again.
/api/v1/lotslink/workspace/:workspace_id/leaveLeave Workspace
lotslink_leave_workspaceLeave a workspace you were invited to. Any member except the owner can leave. You lose access to its links at once, and only a new invitation lets you back in.
/api/v1/lotslink/invitationsList My Invitations
lotslink_list_my_invitationsList the pending workspace invitations sent to your LotsLink account's email address, with the workspace, role and who invited you. Accept one with lotslink_accept_workspace_invitation and its id.
/api/v1/lotslink/workspace/:workspace_id/membersList Workspace Members
lotslink_list_workspace_membersList the active members of a workspace with their role, name and email, and your own role (my_role, can_manage). Any member can call it. Owners and admins also get the pending invitations with their invite links. Teammates are free and unlimited. Requires workspace_id: call lotslink_list_workspaces first.
/api/v1/lotslink/workspace/:workspace_id/members/:member_idRemove Workspace Member
lotslink_remove_workspace_memberRemove a member from a workspace. Owner or admin only. The owner cannot be removed and an admin cannot remove another admin. Their links stay in the workspace. They can rejoin only through a new invitation. To remove yourself, use lotslink_leave_workspace. Get member_id from lotslink_list_workspace_members.
/api/v1/lotslink/workspaceCreate Workspace
lotslink_create_workspaceCreate a workspace (personal or team) to organize links and work with teammates. Workspaces are free and unlimited, and no subscription is needed. You become the owner and first member.
/api/v1/lotslink/workspace/:idDelete Workspace
lotslink_delete_workspacePermanently delete a workspace. OWNER ONLY. This action cannot be undone. Cascade deletes all workspace members, links, projects, tags, custom domains, and related data. Use with extreme caution.
/api/v1/lotslink/workspace/:idGet Workspace
lotslink_get_workspaceGet detailed information about a specific workspace. Requires user to be an active member. Returns workspace details, settings, user role, member count, and link count.
/api/v1/lotslink/workspacesList Workspaces
lotslink_list_workspacesList all workspaces where user is an active member. Returns workspaces with user role, member count, and link count. Sorted by creation date (newest first). Includes personal and team workspaces.
/api/v1/lotslink/workspace/:idUpdate Workspace
lotslink_update_workspaceUpdate workspace name, description, or settings. Requires owner or admin role. At least one field must be provided. Name must be 1-255 characters if provided.
billing
/api/v1/lotslink/checkoutChoose a LotsLink plan or add credits
lotslink_create_checkoutCreate a checkout link. Pass plan (starter, pro or business) and cycle (monthly or annual) for custom domains, or amount_usd (10 to 1000) to add LotsTech Credits. Give the link to the person to pay in their browser; never ask for card details in chat.
/api/v1/lotslink/billingGet LotsLink billing
lotslink_get_billingShow how the caller's LotsLink custom domains are paid for: the plan (if any), whether today is covered or paid from credits, the credit balance, and the plans. Links, clicks, QR codes and one *.lots.link subdomain are free; only custom domains are billed.
projects
/api/v1/lotslink/projectCreate Project
lotslink_create_projectCreate a new project for organizing links within a workspace. Projects help categorize and group related links together, optionally with client information and color coding for visual identification.
/api/v1/lotslink/project/:idDelete Project
lotslink_delete_projectPermanently delete a project from the workspace. This action cannot be undone. The project can only be deleted if no links are currently assigned to it. If links exist, they must be reassigned to another project or have their project assignment removed first. Consider using archive_project instead if you want to preserve data.
/api/v1/lotslink/project/:idGet Project
lotslink_get_projectGet detailed information about a specific project including the count of links assigned to it. Use this to view complete project details before updating or to check how many links are using the project.
/api/v1/lotslink/projectsList Projects
lotslink_list_projectsList all projects in a workspace with link counts. By default, only active (non-archived) projects are returned. Optionally include archived projects for a complete view. Each project includes the number of links assigned to it.
/api/v1/lotslink/project/:idUpdate Project
lotslink_update_projectUpdate project details including name, description, color, or client information. You can update one or multiple fields at once. At least one field must be provided for the update.
custom_domains
/api/v1/lotslink/custom_domain/:idDelete Custom Domain
lotslink_delete_custom_domainPermanently delete a custom domain from the workspace. This action cannot be undone. The domain can only be deleted if no links are currently using it. If links exist, they must be reassigned to another domain or deleted first. Only workspace owners and admins can delete domains.
/api/v1/lotslink/custom_domain/:idGet Custom Domain
lotslink_get_custom_domainGet detailed information about a specific custom domain including verification status, SSL certificate status, DNS records required for setup, nameservers, verification timestamps, and count of links using this domain. Any active workspace member can view domain details.
/api/v1/lotslink/custom_domainsList Custom Domains
lotslink_list_custom_domainsList all custom domains and subdomains for a workspace. Returns domain details including verification status, SSL status, DNS records, and link counts. Supports filtering by verification status. Any active workspace member can view domains.
/api/v1/lotslink/custom_domain/:idUpdate Custom Domain
lotslink_update_custom_domainUpdate settings for a custom domain. Currently supports activating or deactivating domains. When a domain is deactivated (is_active=false), links using it will not redirect. Only workspace owners and admins can update domain settings.
analytics
/api/v1/lotslink/click_details/:idGet Click Details
lotslink_get_click_detailsIndividual click records for a short link (time, approximate location, device, referrer), with filters and pagination. Requires workspace_id and link_id: call lotslink_list_workspaces, then lotslink_list_links.
/api/v1/lotslink/link_analytics/:idGet Link Analytics
lotslink_get_link_analyticsClick analytics for one short link: all-time total, clicks in the period, average per day, peak day, daily timeline, top countries and cities, devices and referrers. Counts are recorded visits: known bots, link previews and prefetches are left out. Visitor IP addresses are not stored, so there is no unique-visitor count. Requires workspace_id and link_id: call lotslink_list_workspaces, then lotslink_list_links.
/api/v1/lotslink/workspace_analytics/:idGet Workspace Analytics
lotslink_get_workspace_analyticsClick analytics for a whole workspace. Counts are recorded visits: known bots, link previews and prefetches are left out, and there is no unique-visitor count. Requires workspace_id: call lotslink_list_workspaces first.