{"openapi":"3.0.3","info":{"title":"Rebrandly API","description":"# Rebrandly API Documentation\n\nThe Rebrandly API allows you to programmatically create, update, and manage your branded short links,\ncustom domains, workspaces, and analytics.\n\n## Base URL\n\nAll API requests should be made to:\n```\nhttps://api.rebrandly.com/v1\n```\n\n## Authentication\n\nThe Rebrandly API uses API keys for authentication. You can obtain your API key from your\n[Rebrandly account settings](https://app.rebrandly.com/account/api-keys).\n\nInclude your API key in the request header:\n```\napikey: YOUR_API_KEY\n```\n\n## Rate Limiting\n\nAPI requests are rate-limited based on your subscription plan. Rate limit information is included\nin response headers:\n- `X-RateLimit-Limit`: Total requests allowed per period\n- `X-RateLimit-Remaining`: Requests remaining in current period\n- `X-RateLimit-Reset`: Time when the rate limit resets (Unix timestamp)\n\n## Multi-Tenancy and Workspaces\n\nMost Rebrandly API resources (links, domains, scripts, tags) are organized into **Workspaces**.\nTo access resources in a specific workspace, you must include the `Workspace` header with the workspace's unique ID.\n\n```\nWorkspace: YOUR_WORKSPACE_ID\n```\n\nIf the `Workspace` header is omitted, the request will be processed in your **Default Workspace**.\n","version":"7.0.2","contact":{"name":"Rebrandly Team","email":"dev@rebrandly.com"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://api.rebrandly.com/v1","description":"Production API"}],"paths":{"/links":{"get":{"summary":"List Links","description":"Retrieves a paginated list of links in the specified workspace.\n\n**Authorization:** Requires authenticated user with workspace access.\n","operationId":"listLinks","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"domain.id","in":"query","description":"Filter by domain ID","schema":{"type":"string"}},{"name":"domain.fullName","in":"query","description":"Filter by domain full name","schema":{"type":"string"}},{"name":"slashtag","in":"query","description":"Filter by exact slashtag","schema":{"type":"string"}},{"name":"creator.id","in":"query","description":"Filter by creator account ID","schema":{"type":"string"}},{"name":"favourite","in":"query","description":"Filter by favourite status","schema":{"type":"boolean"}},{"name":"status.active","in":"query","description":"Filter by active status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}},"security":[{"apiKey":[]}],"tags":["Links"]},"post":{"summary":"Create a New Link","description":"Creates a new branded short link in the specified workspace.\n\n**Authorization:**\n- Requires valid `apikey` header\n- Requires `Workspace` header to specify the workspace\n\n**Validation:**\n- `destination` must be a valid URL\n- `domainId` must reference a verified domain shared with the workspace\n- `slashtag` must be unique for the domain (auto-generated if not provided)\n- `slashtag` length must comply with domain settings\n\n**Features:**\n- `links.notes` feature allows `description` field\n- Link TTL is calculated based on workspace features\n","operationId":"createLink","parameters":[{"name":"Workspace","in":"header","required":true,"description":"Workspace ID header (required by middleware)","schema":{"type":"string","example":"workspace123abc"}},{"name":"apikey","in":"header","required":true,"description":"API key for authentication","schema":{"type":"string","example":"your-api-key-here"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["destination"],"properties":{"destination":{"type":"string","format":"uri","description":"Target URL where the short link redirects","example":"https://example.com/long/path/to/resource"},"domainId":{"type":"string","description":"Public ID of the domain to use (must be verified and shared with workspace)","example":"domain123abc"},"domain":{"type":"object","description":"Alternative way to specify domain (legacy)","properties":{"id":{"type":"string","example":"domain123abc"}}},"slashtag":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"Custom path component (auto-generated if not provided, must be unique)","example":"my-custom-link"},"title":{"type":"string","maxLength":255,"description":"Human-readable title for the link","example":"My Example Link"},"description":{"type":"string","description":"Link description (requires `links.notes` feature)","example":"This link redirects to our example page"}}},"examples":{"minimal":{"summary":"Minimum required fields","value":{"destination":"https://example.com","domainId":"domain123abc"}},"withCustomSlashtag":{"summary":"With custom slashtag","value":{"destination":"https://example.com","domainId":"domain123abc","slashtag":"my-link","title":"My Custom Link"}},"withDescription":{"summary":"With description (requires links.notes feature)","value":{"destination":"https://example.com","domainId":"domain123abc","slashtag":"example","title":"Example Link","description":"This is an example link"}}}}}},"responses":{"200":{"description":"Successfully created link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"},"example":{"id":"abc123def456","title":"My Example Link","slashtag":"my-link","destination":"https://example.com","shortUrl":"rebrand.ly/my-link","domainId":"domain123abc","domainName":"rebrand.ly","clicks":0,"createdAt":"2024-01-15T10:30:00.000Z","updatedAt":"2024-01-15T10:30:00.000Z","status":"active"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Missing or invalid authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden - Validation error or insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"},"examples":{"missingDestination":{"summary":"Destination is required","value":{"code":"InvalidFormat","message":"Invalid format","httpCode":403,"source":"link","errors":[{"code":"RequiredField","property":"destination","message":"Cannot be empty"}]}},"invalidDestinationUrl":{"summary":"Destination is not a valid URL","value":{"code":"InvalidFormat","message":"Invalid format","httpCode":403,"source":"link","errors":[{"code":"InvalidFormat","property":"destination","message":"Url is not valid"}]}},"duplicateSlashtag":{"summary":"Slashtag already exists on domain","value":{"code":"InvalidFormat","message":"Invalid format","httpCode":403,"source":"link","errors":[{"code":"AlreadyExists","property":"slashtag","message":"Already exists"}]}}}}}},"404":{"description":"Not Found - Domain not found or not shared with workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"code":"NotFound","message":"Not found","httpCode":404,"source":"domain","id":"invalid-domain-id"}}}}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/workspaces":{"post":{"summary":"Create Workspace","description":"Create a new workspace.\n\n**Feature Flags:**\n- `links.expiration`: Required if expiration.ttl provided\n- `links.extended`: Required if type is \"extended\"\n","operationId":"createWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":3,"maxLength":255,"description":"Workspace name"},"type":{"type":"string","enum":["classic","extended","gallery"],"default":"classic"},"notes":{"type":"string","minLength":3,"maxLength":2000,"description":"Workspace description"},"avatarUrl":{"type":"string","format":"uri","description":"Workspace avatar URL"},"expiration":{"type":"object","properties":{"ttl":{"type":"integer","description":"Link TTL in seconds"}}}}}}}},"responses":{"200":{"description":"Workspace created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]},"get":{"summary":"List Workspaces","description":"List workspaces the authenticated user has access to.\n","operationId":"getSharedWorkspaces","parameters":[{"name":"orderBy","in":"query","description":"Sorting criteria","schema":{"type":"string","enum":["name","createdAt"],"default":"createdAt"}},{"name":"orderDir","in":"query","description":"Sorting direction","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"offset","in":"query","description":"Pagination offset","schema":{"type":"integer","default":0}},{"name":"limit","in":"query","description":"Pagination limit","schema":{"type":"integer","default":25}}],"responses":{"200":{"description":"A list of workspaces","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the workspace"},"name":{"type":"string","description":"Name of the workspace"},"default":{"type":"boolean","description":"Whether this is the default (main) workspace"},"type":{"type":"string","description":"Type of workspace"},"createdAt":{"type":"string","format":"date-time","description":"UTC creation date/time of the workspace"},"owner":{"type":"object","description":"Workspace owner details","properties":{"id":{"type":"string","description":"Unique identifier of the owner"},"username":{"type":"string","description":"Username of the owner"}}},"role":{"type":"string","description":"The authenticated user's role in this workspace","enum":["owner","manager","guest"]},"subscription":{"type":"object","description":"Subscription information derived from the workspace owner's plan","properties":{"category":{"type":"string","description":"The subscription plan category of the workspace owner (e.g. free, growth, enterprise)"},"limits":{"type":"object","description":"Resource usage and limits for the workspace owner's account","properties":{"domains":{"type":"object","properties":{"used":{"type":"integer","description":"Number of domains used"},"included":{"type":"integer","description":"Number of domains included in the plan"}}}}},"billing":{"type":"object","description":"Billing information","properties":{"extra":{"type":"object","description":"Extra billing details"}}}}}}}}}}}}}},"/workspaces/count":{"get":{"summary":"Count Workspaces","description":"Get total count of workspaces matching filters.","operationId":"countWorkspaces","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/TermParam"},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"revoked","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Workspace count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/workspaces/{workspace_id}":{"get":{"summary":"Get Workspace","description":"Get single workspace details with click/session statistics.\n","operationId":"getWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]},"post":{"summary":"Update Workspace","description":"Update workspace details.\n\n**Blocked by:** Workspace revoked.\n","operationId":"updateWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"notes":{"type":"string"},"avatarUrl":{"type":"string"},"expiration":{"type":"object","properties":{"ttl":{"type":"integer"}}}}}}}},"responses":{"200":{"description":"Updated workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"403":{"description":"Workspace is revoked"},"404":{"description":"Not found or user is not owner"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]},"delete":{"summary":"Delete or Leave Workspace","description":"Delete workspace (if owner) or leave workspace (if non-owner).\n\n**Behavior:**\n- If owner: Deletes entire workspace (soft delete if `trash=true`)\n- If non-owner: Detaches user as teammate from workspace\n","operationId":"deleteWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"trash","in":"query","description":"Move to trash (soft delete) instead of permanent delete","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Workspace deleted or user left workspace","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/workspaces/{workspace_id}/ttl":{"delete":{"summary":"Delete Workspace TTL","description":"Remove the default TTL (time-to-live) setting from a workspace.\n\n**Blocked by:** Workspace revoked.\n","operationId":"deleteWorkspaceTtlById","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"TTL deleted","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Workspace is revoked"},"404":{"description":"Not found or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/workspaces/{workspace_id}/conversion-tracking":{"get":{"summary":"Get Workspace Conversion Tracking Settings","description":"Get conversion tracking configuration for a workspace.\n\n**Requires Feature:** `extra.conversion_tracking`\n\nReturns the current conversion tracking settings. If conversion tracking\nhas not been configured for this workspace, returns the default disabled state.\n","operationId":"getWorkspaceConversionTracking","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"description":"The public ID of the workspace","schema":{"type":"string"}}],"responses":{"200":{"description":"Conversion tracking settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionTrackingSettings"}}}},"403":{"description":"Feature `extra.conversion_tracking` not available on account plan"},"404":{"description":"Workspace not found or insufficient permissions (not owner/admin)"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]},"post":{"summary":"Update Workspace Conversion Tracking Settings","description":"Enable or disable conversion tracking and configure the attribution window for a workspace.\n\n**Requires Feature:** `extra.conversion_tracking`\n\n**Behavior:**\n- When `enabled=true`: Activates conversion tracking. If `attributionWindow` is not provided,\n  defaults to 30 days.\n- When `enabled=false`: Disables conversion tracking. The `attributionWindow` is preserved\n  (from body if provided, otherwise from the previous DB value, otherwise `null`).\n","operationId":"updateWorkspaceConversionTracking","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"description":"The public ID of the workspace","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Whether conversion tracking is enabled for this workspace"},"attributionWindow":{"type":"integer","minimum":1,"maximum":90,"description":"Attribution window in days. Defaults to 30 when enabling without specifying a value.\nWhen disabling, the previous value is preserved (from DB if not provided in body).\n"}}},"examples":{"enable":{"summary":"Enable with custom window","value":{"enabled":true,"attributionWindow":14}},"enableDefault":{"summary":"Enable with default window (30 days)","value":{"enabled":true}},"disable":{"summary":"Disable conversion tracking","value":{"enabled":false}}}}}},"responses":{"200":{"description":"Updated conversion tracking settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionTrackingSettings"}}}},"403":{"description":"Feature not available or validation error.\n- `FeatureNotIncluded`: `extra.conversion_tracking` not available on account plan\n- `InvalidFormat`: Request body validation failed (e.g., `enabled` not boolean, `attributionWindow` out of range)\n"},"404":{"description":"Workspace not found or insufficient permissions (not owner/admin)"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/workspaces/{workspace_id}/features":{"get":{"summary":"Get Workspace Owner Features","description":"List features available to the workspace owner's account.\n\nIncludes standard features, profile features, and revoked features.\n","operationId":"getWorkspaceFeatures","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"revoked","in":"query","description":"Filter by revoked status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of features","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountFeature"}}}}}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/workspaces/{workspace_id}/invite":{"post":{"summary":"Invite Users to Workspace","description":"Send invites to multiple users for a workspace.\n\n**Limits:** 100 invites per day.\n","operationId":"inviteToWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string","format":"email"}},"message":{"type":"string"},"role":{"type":"string","enum":["owner","admin","user","guest","viewer"]}}}}}},"responses":{"200":{"description":"Invites sent","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/workspaces/{workspace_id}/teammates":{"get":{"summary":"List Workspace Teammates","description":"List all teammates in a workspace with their roles and account info.\n","operationId":"listWorkspaceTeammates","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"$ref":"#/components/parameters/TermParam"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of teammates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Teammate"}}}}}},"security":[{"apiKey":[]}],"tags":["Workspace Teammates"]}},"/workspaces/{workspace_id}/teammates/count":{"get":{"summary":"Count Workspace Teammates","description":"Count teammates in a workspace.\n","operationId":"countWorkspaceTeammates","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/TermParam"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Teammate count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Workspace Teammates"]}},"/workspaces/{workspace_id}/teammates/{teammate_id}":{"get":{"summary":"Get Workspace Teammate","description":"Get details of a specific teammate in a workspace.\n","operationId":"getWorkspaceTeammate","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"teammate_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Teammate details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Teammate"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Workspace Teammates"]},"post":{"summary":"Add or Update Workspace Teammate","description":"Add a new teammate to workspace or update existing teammate's role.\n\n**Blocked by:** Workspace revoked.\n","operationId":"addWorkspaceTeammate","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"teammate_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["admin","user","guest","viewer"],"description":"Role to assign to the teammate"}}}}}},"responses":{"200":{"description":"Teammate added or updated","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Workspace is revoked"},"404":{"description":"Not found or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Workspace Teammates"]},"delete":{"summary":"Remove Teammate from Workspace","description":"Remove a teammate from the workspace.\n\n**Blocked by:** Workspace revoked.\n","operationId":"removeWorkspaceTeammate","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"teammate_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Teammate removed","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Workspace is revoked"},"404":{"description":"Not found or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Workspace Teammates"]}},"/workspaces/{workspace_id}/invites":{"get":{"summary":"List Workspace Invites","description":"List all pending invites for the workspace.\n","operationId":"listWorkspaceInvites","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","accepted","expired"],"default":"pending"}}],"responses":{"200":{"description":"List of invites","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Invite"}}}}}},"security":[{"apiKey":[]}],"tags":["Workspace Invites"]}},"/workspaces/{workspace_id}/invites/count":{"get":{"summary":"Count Workspace Invites","description":"Count invites for a workspace filtered by status.\n","operationId":"countWorkspaceInvites","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","accepted","expired"],"default":"pending"}}],"responses":{"200":{"description":"Invite count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Workspace Invites"]}},"/workspaces/{workspace_id}/domains":{"get":{"summary":"List Workspace Domains","description":"List all domains available in the workspace.\n","operationId":"listWorkspaceDomains","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"type","in":"query","schema":{"type":"string","enum":["user","system"]}},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of domains","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}},"security":[{"apiKey":[]}],"tags":["Domains"]}},"/workspaces/{workspace_id}/domains/count":{"get":{"summary":"Count Workspace Domains","operationId":"countWorkspaceDomains","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Domain count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Domains"]}},"/workspaces/{workspace_id}/domains/{domain_id}":{"get":{"summary":"Get Workspace Domain","operationId":"getWorkspaceDomain","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Domains"]},"post":{"summary":"Share Domain with Workspace","description":"Add a domain to the workspace so it can be used for creating links.\n\n**Restrictions:**\n- System domains cannot be added to extended workspaces.\n","operationId":"shareWorkspaceDomain","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain shared","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Domains"]},"delete":{"summary":"Unshare Domain from Workspace","description":"Remove a domain from the workspace.\n","operationId":"unshareWorkspaceDomain","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain unshared","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Domains"]}},"/links/count":{"get":{"summary":"Count Links","description":"Get total count of links with optional filtering.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"countLinks","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain.id","in":"query","description":"Filter by domain ID","schema":{"type":"string"}},{"name":"favourite","in":"query","description":"Filter by favourite status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Link count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/links/bulk":{"post":{"summary":"Bulk Create Links","description":"Create multiple links in a single request.\n\n**Requires:**\n- Feature: `links.bulk`\n- Workspace type: Extended only\n\n**Blocked by:** Revoked workspace.\n\n**Limits:** Up to 10 links per request (configurable).\n","operationId":"bulkCreateLinks","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkInput"},"maxItems":10}}}},"responses":{"200":{"description":"Bulk creation result","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of links created"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}}}},"403":{"description":"Feature not available or wrong workspace type"}},"security":[{"apiKey":[]}],"tags":["Links","Bulk Operations"]},"put":{"summary":"Bulk Create/Update Links","description":"Create or update multiple links (same as POST).\n\n**Requires:**\n- Feature: `links.bulk`\n- Workspace type: Extended only\n\n**Blocked by:** Revoked workspace.\n","operationId":"bulkUpsertLinks","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkInput"}}}}},"responses":{"200":{"description":"Bulk operation result","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of links processed"},"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}}}}},"security":[{"apiKey":[]}],"tags":["Links","Bulk Operations"]}},"/links/search":{"get":{"summary":"Search Links","description":"Search for links with advanced filtering by term, domain, tag, and more.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"searchLinks","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"term","in":"query","schema":{"type":"string"},"description":"Search term (matches destination, slashtag, title)"},{"name":"domain.id","in":"query","schema":{"type":"string"},"description":"Filter by domain ID"},{"name":"tag.id","in":"query","schema":{"type":"string"},"description":"Filter by tag ID"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}}},"security":[{"apiKey":[]}],"tags":["Links"]},"post":{"summary":"Search Links (POST)","description":"Search for links with advanced filtering via POST body.\nUseful when filter parameters are too complex for query strings.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"searchLinksPost","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"term":{"type":"string","description":"Search term (matches destination, slashtag, title)"},"domain":{"type":"object","properties":{"id":{"type":"string","description":"Filter by domain ID"}}},"tag":{"type":"object","properties":{"id":{"type":"string","description":"Filter by tag ID"}}},"limit":{"type":"integer","description":"Maximum results to return"},"last":{"type":"string","description":"Cursor for pagination"}}}}}},"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/links/search/count":{"get":{"summary":"Count Search Results","description":"Get count of links matching search criteria without returning the links.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"countSearchLinks","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"term","in":"query","schema":{"type":"string"},"description":"Search term to count matches"}],"responses":{"200":{"description":"Search result count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Links"]},"post":{"summary":"Count Search Results (POST)","description":"Get count of links matching search criteria via POST body.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"countSearchLinksPost","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"term":{"type":"string","description":"Search term to count matches"}}}}}},"responses":{"200":{"description":"Search result count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/links/{link_id}":{"get":{"summary":"Get Link","description":"Get single link details by ID.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"getLink","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"Link details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Links"]},"post":{"summary":"Update Link","description":"Update link properties.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n\n**Blocked by:**\n- Link with status=3 (deleted)\n- Revoked workspace\n- Revoked domain (if changing domain)\n- Link type change (cannot change link types)\n","operationId":"updateLink","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"type":"string","format":"uri","description":"New destination URL"},"slashtag":{"type":"string","description":"New slashtag (must be unique for domain)"},"title":{"type":"string","description":"Link title for display"},"description":{"type":"string","description":"Link notes/description"},"favourite":{"type":"boolean","description":"Mark as favourite"}}}}}},"responses":{"200":{"description":"Updated link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Links"]},"delete":{"summary":"Delete Link","description":"Soft delete a link. The link will no longer redirect.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n\n**Blocked by:** Link already deleted (status=3).\n","operationId":"deleteLink","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"Link deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/links/{link_id}/rules":{"get":{"summary":"List Link Rules","description":"List all routing rules for a link. Rules determine conditional redirects\nbased on device type, location, time, or platform.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n","operationId":"listLinkRules","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"List of rules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkRule"}}}}}},"security":[{"apiKey":[]}],"tags":["Link Rules"]},"post":{"summary":"Create Link Rule","description":"Add a routing rule to a link for conditional redirects.\n\n**Requires:**\n- Feature: `links.rules`\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n","operationId":"createLinkRule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["destination","conditions"],"properties":{"destination":{"type":"string","format":"uri","description":"Redirect destination when conditions match"},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["device","location","time","platform"],"description":"Condition type"},"value":{"type":"string","description":"Condition value to match"}}},"description":"Conditions that must match for rule to apply"},"rank":{"type":"integer","description":"Rule priority (lower numbers evaluated first)"}}}}}},"responses":{"200":{"description":"Rule created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRule"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]}},"/links/{link_id}/tags":{"get":{"summary":"List Link Tags","description":"List all tags assigned to a link.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n\n**Workspace Type:** Classic or Gallery workspaces only.\n","operationId":"listLinkTags","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"List of tags assigned to the link","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}}}},"security":[{"apiKey":[]}],"tags":["Link Tags"]}},"/links/{link_id}/tags/{tag_id}":{"post":{"summary":"Assign Tag to Link","description":"Add a tag to a link for categorization.\n\n**Requires:**\n- Feature: `links.tags`\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n\n**Workspace Type:** Classic or Gallery workspaces only.\n","operationId":"assignTagToLink","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"},"description":"Tag public ID to assign"}],"responses":{"200":{"description":"Tag assigned successfully","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Feature not available or insufficient permissions"},"404":{"description":"Link or tag not found"}},"security":[{"apiKey":[]}],"tags":["Link Tags"]},"delete":{"summary":"Remove Tag from Link","description":"Remove a tag assignment from a link.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n","operationId":"removeTagFromLink","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"},"description":"Tag public ID to remove"}],"responses":{"200":{"description":"Tag removed successfully","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Link Tags"]}},"/links/{link_id}/scripts":{"get":{"summary":"List Link Scripts","description":"List all scripts/pixels attached to a link.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n\n**Workspace Type:** Classic or Gallery workspaces only.\n","operationId":"listLinkScripts","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"List of scripts attached to the link","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Script"}}}}}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/links/{link_id}/scripts/count":{"get":{"summary":"Count Link Scripts","description":"Get count of scripts attached to a link.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n","operationId":"countLinkScripts","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"Script count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of scripts attached"}}}}}}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/links/{link_id}/scripts/{script_id}":{"post":{"summary":"Attach Script to Link","description":"Attach a script/pixel to a link for tracking purposes.\n\n**Requires:**\n- Feature: `links.scripts`\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n\n**Workspace Type:** Classic or Gallery workspaces only.\n","operationId":"attachScriptToLink","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"script_id","in":"path","required":true,"schema":{"type":"string"},"description":"Script public ID to attach"}],"responses":{"200":{"description":"Script attached successfully","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Feature not available or insufficient permissions"},"404":{"description":"Link or script not found"}},"security":[{"apiKey":[]}],"tags":["Scripts"]},"delete":{"summary":"Detach Script from Link","description":"Remove a script from a link.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n","operationId":"detachScriptFromLink","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"script_id","in":"path","required":true,"schema":{"type":"string"},"description":"Script public ID to detach"}],"responses":{"200":{"description":"Script detached successfully","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/links/{link_id}/rotator":{"get":{"summary":"List Rotator Rules","description":"List all rotator rules for a link. Rotator rules distribute traffic\nacross multiple destinations based on weight or round-robin.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n\n**Link Type:** Rotator links only.\n","operationId":"listRotatorRules","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"List of rotator rules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RotatorRule"}}}}},"403":{"description":"Invalid link type (not a rotator link)"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]},"post":{"summary":"Create Rotator Rule","description":"Create a new rotator rule for traffic distribution.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n\n**Link Type:** Rotator links only.\n","operationId":"createRotatorRule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatorRuleInput"}}}},"responses":{"200":{"description":"Created rotator rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatorRule"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]},"put":{"summary":"Update All Rotator Rules","description":"Replace all rotator rules for the link with a new set.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n","operationId":"updateRotatorRules","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RotatorRuleInput"},"description":"Complete list of rotator rules"}}}},"responses":{"200":{"description":"Updated rotator rules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RotatorRule"}}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]},"delete":{"summary":"Delete All Rotator Rules","description":"Delete all rotator rules for the link.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n","operationId":"deleteRotatorRules","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"Rotator rules deleted","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]}},"/links/{link_id}/rotator/{rule_id}":{"get":{"summary":"Get Rotator Rule","description":"Get details of a specific rotator rule.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"getRotatorRule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"},"description":"Rotator rule public ID"}],"responses":{"200":{"description":"Rotator rule details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatorRule"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]},"post":{"summary":"Update Rotator Rule","description":"Update a single rotator rule.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n","operationId":"updateRotatorRule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"},"description":"Rotator rule public ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatorRuleInput"}}}},"responses":{"200":{"description":"Updated rotator rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatorRule"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]}},"/links/{link_id}/opengraph":{"get":{"summary":"Get Link OpenGraph","description":"Get OpenGraph metadata for a link (title, description, image).\nUsed for social media preview customization.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n\n**Workspace Type:** Classic or Gallery workspaces only.\n","operationId":"getLinkOpengraph","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"OpenGraph metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenGraph"}}}}},"security":[{"apiKey":[]}],"tags":["Links"]},"post":{"summary":"Set Link OpenGraph","description":"Set custom OpenGraph metadata for a link to control social media previews.\n\n**Requires:**\n- Feature: `links.opengraph`\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n\n**Workspace Type:** Classic or Gallery workspaces only.\n","operationId":"setLinkOpengraph","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenGraphInput"}}}},"responses":{"200":{"description":"OpenGraph metadata set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenGraph"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Links"]},"delete":{"summary":"Delete Link OpenGraph","description":"Remove custom OpenGraph metadata from a link.\nSocial previews will revert to destination page metadata.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n","operationId":"deleteLinkOpengraph","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"OpenGraph metadata deleted","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/links/{link_id}/favourite":{"post":{"summary":"Toggle Link Favourite","description":"Mark or unmark a link as favourite for quick access.\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n\n**Workspace Type:** Classic workspaces only.\n","operationId":"toggleLinkFavourite","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"favourite":{"type":"boolean","description":"Set favourite status"}}}}}},"responses":{"200":{"description":"Favourite status updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/tags":{"get":{"summary":"List Tags","description":"List all tags in the workspace with optional filtering by name.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"listTags","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"$ref":"#/components/parameters/TermParam"}],"responses":{"200":{"description":"List of tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}}}},"security":[{"apiKey":[]}],"tags":["Tags"]},"post":{"summary":"Create Tag","description":"Create a new tag in the workspace for categorizing links.\n\n**Requires:**\n- Feature: `links.tags`\n","operationId":"createTag","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","color"],"properties":{"name":{"type":"string","description":"Tag display name"},"color":{"type":"string","description":"Tag color (hex code)"}}}}}},"responses":{"200":{"description":"Tag created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Tags"]}},"/tags/count":{"get":{"summary":"Count Tags","description":"Get total count of tags in the workspace.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"countTags","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/TermParam"},{"name":"status.active","in":"query","description":"Filter by active status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Tag count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of tags matching criteria"}}}}}}},"security":[{"apiKey":[]}],"tags":["Tags"]}},"/tags/{tag_id}":{"get":{"summary":"Get Tag","description":"Get details of a specific tag by ID.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"getTag","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"},"description":"Tag public ID"}],"responses":{"200":{"description":"Tag details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Tags"]},"post":{"summary":"Update Tag","description":"Update tag properties (name, color).\n\n**Requires:**\n- Feature: `links.tags`\n","operationId":"updateTag","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"},"description":"Tag public ID"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New tag name"},"color":{"type":"string","description":"New tag color (hex code)"}}}}}},"responses":{"200":{"description":"Tag updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Tags"]},"delete":{"summary":"Delete Tag","description":"Delete a tag and remove it from all associated links.\n","operationId":"deleteTag","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"},"description":"Tag public ID"}],"responses":{"200":{"description":"Tag deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Tags"]}},"/domains":{"get":{"summary":"List Domains","description":"List all domains shared with the workspace.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"listDomains","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"active","in":"query","description":"Filter by active status","schema":{"type":"boolean"}},{"name":"verified","in":"query","description":"Filter by verification status","schema":{"type":"boolean"}},{"name":"type","in":"query","description":"Filter by domain type","schema":{"type":"string","enum":["user","service"]}}],"responses":{"200":{"description":"List of domains","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}},"security":[{"apiKey":[]}],"tags":["Domains"]}},"/domains/count":{"get":{"summary":"Count Domains","description":"Get count of domains shared with the workspace.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"countDomains","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"active","in":"query","description":"Filter by active status","schema":{"type":"boolean"}},{"name":"verified","in":"query","description":"Filter by verification status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Domain count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of domains matching criteria"}}}}}}},"security":[{"apiKey":[]}],"tags":["Domains"]}},"/domains/{domain_id}":{"get":{"summary":"Get Domain","description":"Get details of a specific domain shared with the workspace.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"getDomain","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain public ID (32 characters)"}],"responses":{"200":{"description":"Domain details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Domains"]},"post":{"summary":"Share Domain with Workspace","description":"Add/share an existing account domain to the workspace.\n\n**Blocked by:**\n- Revoked domain\n- System domains in extended workspaces\n","operationId":"shareDomain","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain public ID to share"}],"responses":{"200":{"description":"Domain shared","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Not owner or domain cannot be shared"}},"security":[{"apiKey":[]}],"tags":["Domains"]},"delete":{"summary":"Remove Domain from Workspace","description":"Unshare a domain from the workspace. The domain will no longer be\navailable for creating links, but existing links are not affected.\n","operationId":"unshareDomain","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain public ID to unshare"}],"responses":{"200":{"description":"Domain removed from workspace","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Domains"]}},"/account":{"get":{"summary":"Get Account","description":"Get current authenticated user's account details.","operationId":"getAccount","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"Account details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}}},"security":[{"apiKey":[]}],"tags":["Account"]}},"/account/subscriptions":{"get":{"summary":"Get Subscription History","description":"Get the subscription history (profile changes) for the current account.","operationId":"getAccountSubscriptions","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"Subscription history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"planName":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Billing"]}},"/account/stats":{"get":{"summary":"Get Account Stats","description":"Get account statistics (currently returns empty object - reserved for future use).","operationId":"getAccountStats","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"Account statistics","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"apiKey":[]}],"tags":["Account"]}},"/account/billing/data":{"get":{"summary":"Get Billing Data","description":"Get the billing data (address, tax info) for the current account.\n\n**Feature:** If `extra.hide_financials` feature is enabled, this returns 403.\n","operationId":"getBillingData","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"Billing data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingData"}}}},"403":{"description":"Forbidden (hide_financials enabled)"}},"security":[{"apiKey":[]}],"tags":["Account","Billing"]},"post":{"summary":"Update Billing Data","description":"Update billing data for the account.\n","operationId":"updateBillingData","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingDataInput"}}}},"responses":{"200":{"description":"Billing data updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingData"}}}},"400":{"description":"Invalid billing data format"}},"security":[{"apiKey":[]}],"tags":["Account","Billing"]}},"/account/domains":{"get":{"summary":"List Account Domains","description":"List all domains owned by the account.\n\n**Note:** These are domains at the account level (purchased/registered domains),\nnot workspace-level domain assignments.\n","operationId":"listAccountDomains","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"type","in":"query","schema":{"type":"string","enum":["USER","SERVICE"]},"description":"Filter by domain type"},{"name":"active","in":"query","schema":{"type":"boolean"},"description":"Filter by active status"}],"responses":{"200":{"description":"List of account domains","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountDomain"}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]},"post":{"summary":"Create Domain","description":"Register a new domain for the account.\n\n**Features:**\n- `domains.whitelabeled.fallback`: Required for custom404\n- `domains.whitelabeled.homepage`: Required for customHomepage\n- `domains.validation.skip`: Skip TLD validation\n","operationId":"createAccountDomain","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fullName"],"properties":{"fullName":{"type":"string","description":"Full domain name","example":"my-brand.ly"},"custom404":{"type":"string","format":"uri","description":"Custom 404 page URL (requires feature)"},"customHomepage":{"type":"string","format":"uri","description":"Custom homepage URL (requires feature)"},"https":{"type":"boolean","description":"Enable HTTPS"},"provider":{"type":"string","description":"Domain provider"},"nameservers":{"type":"array","items":{"type":"string"},"description":"Custom nameservers"}}}}}},"responses":{"200":{"description":"Domain created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}},"400":{"description":"Invalid domain format"}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/count":{"get":{"summary":"Count Account Domains","description":"Get the count of domains owned by the account.","operationId":"countAccountDomains","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"type","in":"query","schema":{"type":"string","enum":["USER","SERVICE"]}},{"name":"active","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Domain count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/search":{"get":{"summary":"Search Account Domains","description":"Search domains in the account.","operationId":"searchAccountDomains","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"term","in":"query","schema":{"type":"string"},"description":"Search term"}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountDomain"}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}":{"get":{"summary":"Get Account Domain","description":"Get details of a specific domain owned by the account.","operationId":"getAccountDomain","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain public ID (32 characters)"}],"responses":{"200":{"description":"Domain details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]},"post":{"summary":"Update Account Domain","description":"Update domain settings.\n\n**Entitlement Check:** Domain must not be revoked.\n","operationId":"updateAccountDomain","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"autorenew":{"type":"boolean","description":"Enable auto-renewal"},"https":{"type":"boolean","description":"Enable HTTPS"},"routing":{"type":"object","description":"Routing configuration"}}}}}},"responses":{"200":{"description":"Domain updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]},"delete":{"summary":"Delete Account Domain","description":"Delete a domain from the account.\n\n**Note:** Only USER type domains owned by the account can be deleted.\n","operationId":"deleteAccountDomain","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/autorenew":{"post":{"summary":"Enable Domain Auto-Renewal","description":"Enable automatic renewal for the domain.","operationId":"enableDomainAutorenew","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Auto-renewal enabled","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]},"delete":{"summary":"Disable Domain Auto-Renewal","description":"Disable automatic renewal for the domain.","operationId":"disableDomainAutorenew","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Auto-renewal disabled","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/routing/homepage":{"post":{"summary":"Set Domain Homepage Routing","description":"Configure custom homepage routing for the domain.\n\n**Feature Required:** `domains.whitelabeled.homepage`\n","operationId":"setDomainHomepageRouting","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Homepage destination URL"},"policy":{"type":"string","enum":["redirect","frame"],"description":"Routing policy"}}}}}},"responses":{"200":{"description":"Homepage routing configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}},"403":{"description":"Feature not available"}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/routing/homepage/disable":{"post":{"summary":"Disable Domain Homepage Routing","description":"Disable custom homepage routing for the domain.\n\n**Feature Required:** `domains.whitelabeled.homepage`\n","operationId":"disableDomainHomepageRouting","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Homepage routing disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/routing/fallback":{"post":{"summary":"Set Domain Fallback Routing","description":"Configure custom 404/fallback routing for the domain.\n\n**Feature Required:** `domains.whitelabeled.fallback`\n","operationId":"setDomainFallbackRouting","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Fallback destination URL"},"policy":{"type":"string","enum":["redirect","frame"],"description":"Routing policy"},"targetDomain":{"type":"string","description":"Target domain for fallback"}}}}}},"responses":{"200":{"description":"Fallback routing configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}},"403":{"description":"Feature not available"}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/routing/fallback/disable":{"post":{"summary":"Disable Domain Fallback Routing","description":"Disable custom fallback routing for the domain.\n\n**Feature Required:** `domains.whitelabeled.fallback`\n","operationId":"disableDomainFallbackRouting","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Fallback routing disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDomain"}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/subdomains":{"get":{"summary":"List Domain Subdomains","description":"List all subdomains of a parent domain.","operationId":"listDomainSubdomains","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"List of subdomains","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountDomain"}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/subdomains/count":{"get":{"summary":"Count Domain Subdomains","description":"Get count of subdomains for a parent domain.","operationId":"countDomainSubdomains","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Subdomain count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/search/count":{"get":{"summary":"Count Domain Search Results","description":"Get the count of domains matching search criteria.\n","operationId":"countDomainSearchResults","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"term","in":"query","schema":{"type":"string"},"description":"Search term"}],"responses":{"200":{"description":"Search result count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains"]}},"/account/domains/{domain_id}/clicks":{"get":{"summary":"Get Domain Click Statistics","description":"Get click analytics for a specific domain.\n\n**Purpose:** Retrieve aggregated click statistics for a domain.\n\n**Requires:** `metrics.advanced` feature flag.\n","operationId":"getDomainClicks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"},"description":"Domain public ID (32 characters)"},{"name":"group","in":"query","description":"Time grouping for statistics","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}},"403":{"description":"Feature not enabled or domain is SERVICE type"}},"security":[{"apiKey":[]}],"tags":["Account","Domains","Analytics"]}},"/account/domains/{domain_id}/segments":{"get":{"summary":"Get Domain Segment Statistics","description":"Alias for /account/domains/{domain_id}/clicks - get click analytics for a domain.\n\n**Requires:** `metrics.advanced` feature flag.\n","operationId":"getDomainSegments","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains","Analytics"]}},"/account/domains/{domain_id}/workspaces":{"get":{"summary":"List Domain Workspaces","description":"List workspaces that have this domain attached.\n\n**Purpose:** View all workspaces using a specific domain.\n","operationId":"listDomainWorkspaces","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"type","in":"query","schema":{"type":"string"},"description":"Filter by workspace type"},{"name":"revoked","in":"query","schema":{"type":"boolean"},"description":"Filter by revocation status"},{"name":"status","in":"query","schema":{"type":"string","enum":["attached"]},"description":"Filter by attachment status"}],"responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains","Workspaces"]}},"/account/domains/{domain_id}/workspaces/count":{"get":{"summary":"Count Domain Workspaces","description":"Count workspaces that have this domain attached.\n","operationId":"countDomainWorkspaces","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"domain_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"revoked","in":"query","schema":{"type":"boolean"}},{"name":"status","in":"query","schema":{"type":"string","enum":["attached"]}}],"responses":{"200":{"description":"Workspace count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Account","Domains","Workspaces"]}},"/scripts":{"get":{"summary":"List Scripts","description":"List all tracking scripts/pixels in the workspace.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"listScripts","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"status.active","in":"query","description":"Filter by active status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of scripts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Script"}}}}}},"security":[{"apiKey":[]}],"tags":["Scripts"]},"post":{"summary":"Create Script","description":"Create a new tracking script/pixel in the workspace.\n\n**Requires:**\n- Feature: `links.scripts`\n","operationId":"createScript","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScriptInput"}}}},"responses":{"200":{"description":"Script created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Script"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/scripts/count":{"get":{"summary":"Count Scripts","description":"Get total count of scripts in the workspace.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"countScripts","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"status.active","in":"query","description":"Filter by active status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Script count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of scripts matching criteria"}}}}}}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/scripts/{script_id}":{"get":{"summary":"Get Script","description":"Get details of a specific script by ID.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"getScript","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"script_id","in":"path","required":true,"schema":{"type":"string"},"description":"Script public ID"}],"responses":{"200":{"description":"Script details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Script"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Scripts"]},"post":{"summary":"Update Script","description":"Update script properties.\n\n**Requires:**\n- Feature: `links.scripts`\n","operationId":"updateScript","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"script_id","in":"path","required":true,"schema":{"type":"string"},"description":"Script public ID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScriptInput"}}}},"responses":{"200":{"description":"Script updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Script"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Scripts"]},"delete":{"summary":"Delete Script","description":"Delete a script and remove it from all associated links.\n","operationId":"deleteScript","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"script_id","in":"path","required":true,"schema":{"type":"string"},"description":"Script public ID"}],"responses":{"200":{"description":"Script deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Script"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/reports/templates":{"get":{"summary":"List Report Templates","description":"List all report templates in the workspace.\n\n**Requires:**\n- Workspace access\n","operationId":"listReportTemplates","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"schedule.elapsed","in":"query","schema":{"type":"boolean"},"description":"Filter by elapsed schedules"},{"name":"schedule.active","in":"query","schema":{"type":"boolean"},"description":"Filter by active schedules"}],"responses":{"200":{"description":"List of report templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportTemplate"}}}}},"403":{"description":"Insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Reports"]},"post":{"summary":"Create Report Template","description":"Create a new report template for scheduled or ad-hoc reports.\n\n**Requires:**\n- Feature: `reports.custom`\n\n**Blocked by:** Revoked workspace or domain.\n","operationId":"createReportTemplate","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","query"],"properties":{"name":{"type":"string","description":"Template name"},"description":{"type":"string","description":"Template description"},"query":{"type":"object","description":"Query definition for the report"},"subscriptions":{"type":"array","items":{"type":"object"},"description":"Email subscriptions for the report"}}}}}},"responses":{"200":{"description":"Template created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplate"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/count":{"get":{"summary":"Count Report Templates","description":"Get count of report templates in the workspace.\n\n**Requires:**\n- Workspace access\n","operationId":"countReportTemplates","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"Template count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of report templates"}}}}}}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/{template_id}":{"get":{"summary":"Get Report Template","description":"Get details of a specific report template.\n\n**Requires:**\n- Workspace access\n","operationId":"getReportTemplate","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"},"description":"Template public ID"}],"responses":{"200":{"description":"Template details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplate"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Reports"]},"post":{"summary":"Update Report Template","description":"Update a report template.\n\n**Requires:**\n- Feature: `reports.custom`\n\n**Blocked by:** Revoked workspace.\n","operationId":"updateReportTemplate","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"},"description":"Template public ID"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Template name"},"description":{"type":"string","description":"Template description"},"query":{"type":"object","description":"Query definition"}}}}}},"responses":{"200":{"description":"Template updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplate"}}}},"403":{"description":"Feature not available or insufficient permissions"}},"security":[{"apiKey":[]}],"tags":["Reports"]},"delete":{"summary":"Delete Report Template","description":"Delete a report template and deactivate its schedule.\n\n**Requires:**\n","operationId":"deleteReportTemplate","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"},"description":"Template public ID"}],"responses":{"200":{"description":"Template deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTemplate"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/results":{"get":{"summary":"List Report Results","description":"List all report execution results in the workspace.","operationId":"listReportResults","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"List of report results","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportExecution"}}}}}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/{template_id}/executions":{"get":{"summary":"List Template Executions","description":"List all executions for a report template.\n","operationId":"listTemplateExecutions","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"List of executions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportExecution"}}}}}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/{template_id}/executions/count":{"get":{"summary":"Count Template Executions","operationId":"countTemplateExecutions","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Execution count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/{template_id}/schedule":{"get":{"summary":"Get Template Schedule","description":"Get the schedule configuration for a report template.\n","operationId":"getTemplateSchedule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Schedule configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSchedule"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Reports"]},"post":{"summary":"Create or Update Schedule","description":"Create or update the schedule for a report template.\n\n**Feature Required:** `reports.custom`\n","operationId":"upsertTemplateSchedule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportScheduleInput"}}}},"responses":{"200":{"description":"Schedule created/updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportSchedule"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/{template_id}/schedule/pause":{"post":{"summary":"Pause Schedule","description":"Pause a report schedule.\n","operationId":"pauseTemplateSchedule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Schedule paused","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/{template_id}/schedule/resume":{"post":{"summary":"Resume Schedule","description":"Resume a paused report schedule.\n\n**Feature Required:** `reports.custom`\n","operationId":"resumeTemplateSchedule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Schedule resumed","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/reports/templates/{template_id}/schedule/trigger":{"post":{"summary":"Trigger Scheduled Execution","description":"Manually trigger a scheduled report execution.\n\n**Feature Required:** `reports.custom`\n","operationId":"triggerTemplateSchedule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"template_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Execution triggered","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Reports"]}},"/search":{"get":{"summary":"Search","description":"Search links and domains in the workspace.","operationId":"search","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/TermParam"},{"name":"linksLimit","in":"query","schema":{"type":"integer","maximum":25,"default":25}},{"name":"domainsLimit","in":"query","schema":{"type":"integer","maximum":25,"default":25}},{"name":"mode","in":"query","schema":{"type":"string","enum":["strict","flexible"],"default":"strict"}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/Link"}},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}}}},"security":[{"apiKey":[]}],"tags":["Search"]}},"/apps":{"get":{"summary":"List Apps","description":"List all OAuth/mobile apps in the workspace.\n\n**Feature Required:** `links.apps`\n","operationId":"listApps","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"$ref":"#/components/parameters/TermParam"}],"responses":{"200":{"description":"List of apps","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}}},"security":[{"apiKey":[]}],"tags":["Apps"]},"post":{"summary":"Create App","description":"Create a new OAuth/mobile app.\n\n**Feature Required:** `links.apps`\n","operationId":"createApp","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppInput"}}}},"responses":{"200":{"description":"App created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Apps"]}},"/apps/count":{"get":{"summary":"Count Apps","operationId":"countApps","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/TermParam"}],"responses":{"200":{"description":"App count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Apps"]}},"/apps/{app_id}":{"get":{"summary":"Get App","operationId":"getApp","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"app_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"App details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Apps"]},"post":{"summary":"Update App","operationId":"updateApp","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"app_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppInput"}}}},"responses":{"200":{"description":"App updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}}},"security":[{"apiKey":[]}],"tags":["Apps"]},"delete":{"summary":"Delete App","operationId":"deleteApp","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"app_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"App deleted","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"apiKey":[]}],"tags":["Apps"]}},"/apps/{app_id}/links":{"get":{"summary":"List App Links","description":"Get links created via this app.","operationId":"listAppLinks","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"name":"app_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}}},"security":[{"apiKey":[]}],"tags":["Apps"]}},"/entitlements/revoked":{"get":{"summary":"Get Revoked Items","description":"List revoked workspaces, domains, and features.","operationId":"getRevokedEntitlements","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"Revoked items","content":{"application/json":{"schema":{"type":"object","properties":{"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}},"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"features":{"type":"array","items":{"$ref":"#/components/schemas/Feature"}}}}}}}},"security":[{"apiKey":[]}],"tags":["Entitlements"]}},"/entitlements/revoked/count":{"get":{"summary":"Count Revoked Items","operationId":"countRevokedEntitlements","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"Revoked items count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Entitlements"]}},"/custom/attributes":{"get":{"summary":"List Custom Attributes","operationId":"listCustomAttributes","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of custom attributes","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomAttribute"}}}}}},"security":[{"apiKey":[]}],"tags":["Custom Attributes"]},"post":{"summary":"Create Custom Attribute","operationId":"createCustomAttribute","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAttributeInput"}}}},"responses":{"200":{"description":"Custom attribute created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAttribute"}}}}},"security":[{"apiKey":[]}],"tags":["Custom Attributes"]}},"/custom/attributes/count":{"get":{"summary":"Count Custom Attributes","operationId":"countCustomAttributes","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Custom attribute count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Custom Attributes"]}},"/custom/attributes/{custom_attribute_id}":{"get":{"summary":"Get Custom Attribute","operationId":"getCustomAttribute","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"custom_attribute_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Custom attribute details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomAttribute"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Custom Attributes"]},"delete":{"summary":"Delete Custom Attribute","operationId":"deleteCustomAttribute","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"custom_attribute_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Custom attribute deleted","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"apiKey":[]}],"tags":["Custom Attributes"]}},"/addons":{"get":{"summary":"List Addons","description":"Get available subscription addons.","operationId":"listAddons","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"standard","in":"query","description":"Filter standard addons","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of addons","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Addon"}}}}}},"security":[{"apiKey":[]}],"tags":["Addons"]}},"/addons/{addon_id}":{"get":{"summary":"Get Addon","operationId":"getAddon","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"addon_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Addon details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Addon"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Addons"]}},"/plans":{"get":{"summary":"List Plans","description":"List available subscription plans.\n\n**Note:** This endpoint does not require authentication.\n","operationId":"listPlans","parameters":[{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"isStandard","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of plans","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}}}}}},"tags":["Plans"]}},"/plans/{plan_id}":{"get":{"summary":"Get Plan","description":"Get plan details.","operationId":"getPlan","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Plan details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["Plans"]}},"/features":{"get":{"summary":"List Features","description":"Get all available features.\n\n**Note:** This endpoint does not require authentication.\n","operationId":"listFeatures","responses":{"200":{"description":"List of features","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Feature"}}}}}},"tags":["Features"]}},"/account/invites":{"get":{"summary":"List Account Invites","description":"List all invites sent from the account.\n","operationId":"listAccountInvites","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"name":"status","in":"query","description":"Filter by invite status","schema":{"type":"string","enum":["pending","accepted","expired"],"default":"pending"}}],"responses":{"200":{"description":"List of invites","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Invite"}}}}}},"security":[{"apiKey":[]}],"tags":["Invites"]},"post":{"summary":"Create Account Invite","description":"Create a new invite to add a teammate.\n\n**Requires:** `collaboration.teammates` feature flag.\n","operationId":"createAccountInvite","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInput"}}}},"responses":{"200":{"description":"Created invite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invite"}}}},"403":{"$ref":"#/components/responses/Forbidden"}},"security":[{"apiKey":[]}],"tags":["Invites"]}},"/account/invites/count":{"get":{"summary":"Count Account Invites","description":"Count invites by status.","operationId":"countAccountInvites","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","accepted","expired"],"default":"pending"}}],"responses":{"200":{"description":"Invite count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Invites"]}},"/account/invites/{invite_id}":{"get":{"summary":"Get Account Invite","description":"Get details of a specific invite.","operationId":"getAccountInvite","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Invite details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invite"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Invites"]},"delete":{"summary":"Delete Account Invite","description":"Delete an invite.\n","operationId":"deleteAccountInvite","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Invite deleted","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Invites"]}},"/account/invites/{invite_id}/send":{"post":{"summary":"Send Invite Email","description":"Re-send the invite email to the invitee.\n\n**Requires:** Internal API or invites scope.\n","operationId":"sendInviteEmail","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Email sent","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Invites"]}},"/account/invites/{invite_id}/workspaces":{"get":{"summary":"List Invite Workspaces","description":"List workspaces the invite will grant access to.","operationId":"listInviteWorkspaces","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"$ref":"#/components/parameters/TermParam"},{"name":"type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}}}}},"security":[{"apiKey":[]}],"tags":["Invites"]}},"/account/invites/{invite_id}/workspaces/count":{"get":{"summary":"Count Invite Workspaces","description":"Count workspaces the invite will grant access to.","operationId":"countInviteWorkspaces","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/TermParam"}],"responses":{"200":{"description":"Workspace count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Invites"]}},"/account/clicks":{"get":{"summary":"Get Account Click Statistics","description":"Get aggregated click statistics for the account.\n\n**Requires:** `metrics.advanced` feature flag.\n","operationId":"getAccountClicks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"group","in":"query","description":"Time grouping for statistics","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}},"403":{"description":"Feature not enabled"}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/account/segments":{"get":{"summary":"Get Account Segment Statistics","description":"Alias for /account/clicks - get aggregated click statistics for the account.\n\n**Requires:** `metrics.advanced` feature flag.\n","operationId":"getAccountSegments","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/account/appkeys":{"get":{"summary":"List App Keys","description":"List all app keys (credentials) for the account.\n","operationId":"listAppKeys","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"List of app keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppKey"}}}}}},"security":[{"apiKey":[]}],"tags":["Account"]}},"/account/appkeys/count":{"get":{"summary":"Count App Keys","description":"Count all app keys for the account.","operationId":"countAppKeys","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"App key count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Account"]}},"/account/logout":{"post":{"summary":"Logout (Invalidate JWT Token)","description":"Invalidate the current JWT access token, preventing further use.\nThe token's `jti` claim is added to a Redis blacklist with a TTL matching the token's remaining lifetime.\nSubsequent requests using the same token will receive a 401 response.\n\n**Requires:** Bearer token authentication (Authorization header).\n","operationId":"logout","parameters":[{"name":"Authorization","in":"header","required":true,"description":"Bearer token to invalidate","schema":{"type":"string","example":"Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."}}],"responses":{"200":{"description":"Token invalidated successfully","content":{"application/json":{"schema":{"type":"object","example":{}}}}},"400":{"description":"Token missing required claims (jti, exp)"},"401":{"description":"Missing or invalid Authorization header"},"500":{"description":"Internal server error"}},"security":[{"apiKey":[]}],"tags":["Account"]}},"/account/features":{"get":{"summary":"List Account Features","description":"Get all features available to the account (profile features, standard features, and addon features).\n","operationId":"listAccountFeatures","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"revoked","in":"query","description":"Filter by revoked status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of account features","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountFeature"}}}}}},"security":[{"apiKey":[]}],"tags":["Features"]}},"/account/workspaces":{"get":{"summary":"List Account Workspaces","description":"List all workspaces owned by the account.\n","operationId":"listAccountWorkspaces","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"$ref":"#/components/parameters/TermParam"},{"name":"type","in":"query","schema":{"type":"string","enum":["classic","extended","gallery"]}},{"name":"revoked","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"List of workspaces","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Workspace"}}}}}},"security":[{"apiKey":[]}],"tags":["Workspaces"]},"post":{"summary":"Create Account Workspace","description":"Create a new workspace owned by the account.\n\n**Note:** Creating workspaces with `type: \"gallery\"` via this endpoint is deprecated.\nUse `POST /v1/internal/account/{account_id}/workspaces` for gallery workspace creation.\n","operationId":"createAccountWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["classic","extended"]},"expiration":{"type":"object","properties":{"ttl":{"type":"integer"}}}}}}}},"responses":{"200":{"description":"Created workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/account/workspaces/count":{"get":{"summary":"Count Account Workspaces","description":"Count workspaces owned by the account.","operationId":"countAccountWorkspaces","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"type","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/TermParam"},{"name":"revoked","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Workspace count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/account/workspaces/{workspace_id}":{"get":{"summary":"Get Account Workspace","description":"Get details of a specific workspace.","operationId":"getAccountWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]},"post":{"summary":"Update Account Workspace","description":"Update a workspace.\n","operationId":"updateAccountWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Workspace"}}}},"403":{"description":"Workspace is revoked"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]},"delete":{"summary":"Delete Account Workspace","description":"Delete a workspace.\n","operationId":"deleteAccountWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"trash","in":"query","description":"Move to trash instead of permanent delete","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Workspace deleted","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/account/workspaces/{workspace_id}/invite":{"post":{"summary":"Invite to Workspace","description":"Send invitations to join a workspace.\n","operationId":"inviteToAccountWorkspace","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","items":{"type":"string","format":"email"}},"role":{"type":"string","enum":["admin","user","guest","viewer"]}}}}}},"responses":{"200":{"description":"Invitations sent","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Workspace is revoked or locked"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/account/workspaces/{workspace_id}/ttl":{"delete":{"summary":"Delete Workspace TTL","description":"Remove the default TTL setting from a workspace.\n","operationId":"deleteWorkspaceTtl","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"TTL deleted","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Workspace is revoked"}},"security":[{"apiKey":[]}],"tags":["Workspaces"]}},"/account/invite":{"post":{"summary":"Create Account Invite","description":"Create invites to add teammates to the account and optionally to workspaces.\n","operationId":"createAccountInviteExternal","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","items":{"type":"string","format":"email"}},"workspaces":{"type":"array","items":{"type":"string"},"description":"Workspace IDs to invite to"}}}}}},"responses":{"200":{"description":"Invitations sent","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Workspace is locked"}},"security":[{"apiKey":[]}],"tags":["Invites"]}},"/domains/data":{"get":{"summary":"Get Domain WHOIS Data","description":"Get stored WHOIS data for the account.\n","operationId":"getDomainData","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"responses":{"200":{"description":"WHOIS data","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No data found"}},"security":[{"apiKey":[]}],"tags":["Domains"]},"post":{"summary":"Save Domain WHOIS Data","description":"Save WHOIS data for domain registration.\n","operationId":"saveDomainData","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"WHOIS contact information"}}}},"responses":{"200":{"description":"Data saved","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Validation error"}},"security":[{"apiKey":[]}],"tags":["Domains"]}},"/links/{link_id}/apps":{"get":{"summary":"List Link Apps","description":"List apps attached to a link.\n","operationId":"listLinkApps","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"},{"$ref":"#/components/parameters/TermParam"}],"responses":{"200":{"description":"List of apps","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/App"}}}}}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/links/{link_id}/apps/count":{"get":{"summary":"Count Link Apps","description":"Count apps attached to a link.","operationId":"countLinkApps","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"App count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/links/{link_id}/apps/{app_id}":{"get":{"summary":"Get Link App","description":"Get details of a specific app attached to a link.","operationId":"getLinkApp","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"app_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"App details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Links"]},"post":{"summary":"Attach App to Link","description":"Attach an app to a link.\n\n**Requires:** `links.apps` feature flag.\n","operationId":"attachAppToLink","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"app_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"path":{"type":"string","description":"Deep link path"},"fallback":{"type":"boolean","description":"Use as fallback destination"}}}}}},"responses":{"200":{"description":"App attached","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Feature not enabled or permission denied"}},"security":[{"apiKey":[]}],"tags":["Links"]},"delete":{"summary":"Detach App from Link","description":"Detach an app from a link.\n","operationId":"detachAppFromLink","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"app_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"App detached","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Permission denied"}},"security":[{"apiKey":[]}],"tags":["Links"]}},"/workspaces/{workspace_id}/clicks":{"get":{"summary":"Get Workspace Click Statistics","description":"Get click statistics for a workspace.\n\n**Requires:** `metrics.advanced` feature flag (owner must have it).\n","operationId":"getWorkspaceClicks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}},"403":{"description":"Feature not enabled or no access"}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/workspaces/{workspace_id}/segments":{"get":{"summary":"Get Workspace Segment Statistics","description":"Alias for /workspaces/{workspace_id}/clicks.","operationId":"getWorkspaceSegments","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/tags/{tag_id}/clicks":{"get":{"summary":"Get Tag Click Statistics","description":"Get click statistics for a tag.\n\n**Requires:** `metrics.advanced` feature flag.\n","operationId":"getTagClicks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}},"403":{"description":"Feature not enabled or no access"}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/tags/{tag_id}/segments":{"get":{"summary":"Get Tag Segment Statistics","description":"Alias for /tags/{tag_id}/clicks.","operationId":"getTagSegments","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/tags/{tag_id}/links":{"get":{"summary":"List Tag Links","description":"List all links associated with a specific tag.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"listTagLinks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"},"description":"Tag public ID"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"List of links with this tag","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}}},"security":[{"apiKey":[]}],"tags":["Tags"]}},"/tags/{tag_id}/links/count":{"get":{"summary":"Count Tag Links","description":"Count links associated with a specific tag.\n\n**Requires:** Authenticated user with workspace access.\n\n**Authorization:**\n","operationId":"countTagLinks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"tag_id","in":"path","required":true,"schema":{"type":"string"},"description":"Tag public ID"}],"responses":{"200":{"description":"Link count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","description":"Number of links with this tag"}}}}}}},"security":[{"apiKey":[]}],"tags":["Tags"]}},"/workspaces/{workspace_id}/teammates/{teammate_id}/clicks":{"get":{"summary":"Get Teammate Click Statistics","description":"Get click statistics for a teammate in a workspace.\n\n**Requires:** `metrics.advanced` feature flag.\n","operationId":"getTeammateClicks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"teammate_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}},"403":{"description":"Feature not enabled or no access"},"404":{"description":"Teammate not found"}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/workspaces/{workspace_id}/teammates/{teammate_id}/segments":{"get":{"summary":"Get Teammate Segment Statistics","description":"Alias for teammate clicks endpoint.","operationId":"getTeammateSegments","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"teammate_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","schema":{"type":"string","enum":["hours","days","months"],"default":"hours"}}],"responses":{"200":{"description":"Click statistics","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClickStats"}}}}}},"security":[{"apiKey":[]}],"tags":["Analytics"]}},"/scripts/{script_id}/links":{"get":{"summary":"List Script Links","description":"List links that use a specific script.","operationId":"listScriptLinks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"script_id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/OrderByParam"},{"$ref":"#/components/parameters/OrderDirParam"},{"$ref":"#/components/parameters/LastParam"}],"responses":{"200":{"description":"List of links","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}}}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/scripts/{script_id}/links/count":{"get":{"summary":"Count Script Links","description":"Count links that use a specific script.","operationId":"countScriptLinks","parameters":[{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/WorkspaceHeader"},{"name":"script_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Link count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Scripts"]}},"/links/{link_id}/rules/count":{"get":{"summary":"Count Link Rules","description":"Get the total number of routing rules for a link.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n","operationId":"countLinkRules","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"Rule count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Link Rules"]}},"/links/{link_id}/rules/{rule_id}":{"get":{"summary":"Get Link Rule","description":"Get a single routing rule for a link by its public ID.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n","operationId":"getLinkRule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"},"description":"Rule public ID"}],"responses":{"200":{"description":"Rule details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRule"}}}},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]},"post":{"summary":"Update Link Rule","description":"Update an existing routing rule on a link.\n\n**Requires:**\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n","operationId":"updateLinkRule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"},"description":"Rule public ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"destination":{"type":"string","format":"uri","description":"Redirect destination when conditions match"},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["device","location","time","platform"],"description":"Condition type"},"value":{"type":"string","description":"Condition value to match"}}},"description":"Conditions that must match for rule to apply"},"rank":{"type":"integer","description":"Rule priority (lower numbers evaluated first)"}}}}}},"responses":{"200":{"description":"Rule updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRule"}}}},"403":{"description":"Insufficient permissions"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]},"delete":{"summary":"Delete Link Rule","description":"Delete a routing rule from a link.\n\n**Requires:**\n\n**Blocked by:**\n- Link deleted (status=3)\n- Revoked workspace\n- Revoked domain\n","operationId":"deleteLinkRule","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"},{"name":"rule_id","in":"path","required":true,"schema":{"type":"string"},"description":"Rule public ID"}],"responses":{"200":{"description":"Rule deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkRule"}}}},"403":{"description":"Insufficient permissions"},"404":{"$ref":"#/components/responses/NotFound"}},"security":[{"apiKey":[]}],"tags":["Link Rules"]}},"/links/{link_id}/tags/count":{"get":{"summary":"Count Link Tags","description":"Get the total number of tags assigned to a link.\n\n**Requires:** Authenticated user with workspace access.\n\n**Blocked by:** Link deleted (status=3).\n\n**Workspace Type:** Classic or Gallery workspaces only.\n","operationId":"countLinkTags","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"name":"link_id","in":"path","required":true,"schema":{"type":"string"},"description":"Link public ID"}],"responses":{"200":{"description":"Tag count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"security":[{"apiKey":[]}],"tags":["Link Tags"]}},"/plans/count":{"get":{"summary":"Count Plans","description":"Get the total number of available subscription plans.\n\n**Note:** This endpoint does not require authentication.\n","operationId":"countPlans","parameters":[{"name":"isStandard","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Plan count","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"}}}}}}},"tags":["Plans"]}},"/plans/{plan_id}/features":{"get":{"summary":"Get Plan Features","description":"Get the resolved feature set for a plan: standard features merged with\nany plan-specific overrides.\n\n**Note:** This endpoint does not require authentication.\n","operationId":"getPlanFeatures","parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of features applicable to the plan","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Feature code"},"config":{"type":"object","description":"Feature configuration (present for plan-specific overrides)"}}}}}}},"404":{"$ref":"#/components/responses/NotFound"}},"tags":["Plans"]}},"/search/count":{"get":{"summary":"Count Search Results","description":"Get the count of links and domains matching a search term in the workspace.\n\n**Requires:** Authenticated user with workspace access.\n","operationId":"countSearchResults","parameters":[{"$ref":"#/components/parameters/WorkspaceHeader"},{"$ref":"#/components/parameters/ApiKeyHeader"},{"$ref":"#/components/parameters/TermParam"},{"name":"mode","in":"query","schema":{"type":"string","enum":["strict","flexible"],"default":"strict"}}],"responses":{"200":{"description":"Search result counts","content":{"application/json":{"schema":{"type":"object","properties":{"links":{"type":"integer","description":"Number of matching links"},"domains":{"type":"integer","description":"Number of matching domains"}}}}}}},"security":[{"apiKey":[]}],"tags":["Search"]}}},"tags":[{"name":"Links","description":"Link management endpoints for creating, retrieving, updating, and deleting branded short links.\n\n**Core Functionality:**\n- Create branded short links with custom slashtags\n- Auto-generate slashtags if not provided\n- Redirect to destination URLs\n- Track clicks and analytics\n- Support link rules, rotators, and scripts\n\n**Authorization:**\n- All link operations require authentication via `apikey` header\n- Most operations require `Workspace` header to specify the workspace context\n- Link modifications require `owner` or `admin` role (or link creator)\n\n**Features:**\n- `links.notes`: Allows `description` field on links\n- Link TTL calculated based on workspace features and account plan\n"},{"name":"Link Rules","description":"Conditional routing rules for links.\n\n**Feature Required:** `links.rules`\n"},{"name":"Link Tags","description":"Tag management for links."},{"name":"Workspaces","description":"Workspace management for multi-tenant link organization.\n\n**Workspace Types:**\n- `classic`: Standard workspace with full feature support\n- `extended`: Extended workspace with TTL and advanced features\n- `gallery`: Gallery workspace for link collections\n"},{"name":"Workspace Invites","description":"Workspace invite management."},{"name":"Workspace Teammates","description":"Teammate management within workspaces."},{"name":"Tags","description":"Tag management for organizing links.\n\n**Feature Required:** `links.tags`\n"},{"name":"Domains","description":"Domain management for custom branded short URLs.\n\nDomains can be:\n- User-owned custom domains\n- System domains (e.g., rebrand.ly)\n"},{"name":"Account","description":"User account management."},{"name":"Invites","description":"Account invite management for adding new teammates.\n\n**Feature Required:** `collaboration.teammates`\n"},{"name":"Scripts","description":"Script/pixel management for link tracking.\n\n**Feature Required:** `links.scripts`\n"},{"name":"Search","description":"Search across links and domains."},{"name":"Plans","description":"Subscription plans (public endpoints)."},{"name":"Features","description":"Available features (public endpoints)."},{"name":"Reports","description":"Custom reports and analytics.\n\n**Feature Required:** `reports.custom`\n"},{"name":"Apps","description":"Mobile app management for deep linking.\n\n**Feature Required:** `links.apps`\n"},{"name":"Billing","description":"Billing data, payment methods, and transactions."},{"name":"Addons","description":"Purchasable addons for extending account capabilities."},{"name":"Entitlements","description":"Account entitlements and usage limits."},{"name":"Custom Attributes","description":"Custom link attributes for additional metadata.\n\n**Feature Required:** `links.customAttributes`\n"},{"name":"Bulk Operations","description":"Bulk operations for creating, updating, and deleting links.\n\n**Feature Required:** `links.bulk`\n\n**Workspace Type:** Extended workspaces only.\n"},{"name":"Analytics","description":"Click analytics and statistics endpoints.\n\n**Feature Required:** `metrics.advanced`\n\nThese endpoints provide aggregated click statistics for accounts, workspaces, domains, tags, and teammates.\n"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"apikey","description":"Rebrandly API key for authentication"}},"parameters":{"WorkspaceHeader":{"name":"Workspace","in":"header","required":false,"description":"Workspace public ID","schema":{"type":"string","example":"workspace123abc"}},"ApiKeyHeader":{"name":"apikey","in":"header","required":true,"description":"API key for authentication","schema":{"type":"string"}},"LimitParam":{"name":"limit","in":"query","description":"Maximum number of results (default 25, max 25)","schema":{"type":"integer","minimum":1,"maximum":25,"default":25}},"OrderByParam":{"name":"orderBy","in":"query","description":"Field to sort by","schema":{"type":"string","default":"createdAt"}},"OrderDirParam":{"name":"orderDir","in":"query","description":"Sort direction","schema":{"type":"string","enum":["asc","desc"],"default":"asc"}},"LastParam":{"name":"last","in":"query","description":"Cursor for pagination (last item ID from previous page)","schema":{"type":"string"}},"TermParam":{"name":"term","in":"query","description":"Search term","schema":{"type":"string"}}},"responses":{"Unauthorized":{"description":"Unauthorized - Missing or invalid authentication","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["code","message","httpCode"],"properties":{"code":{"type":"string","description":"Error code identifier","example":"NotFound"},"message":{"type":"string","description":"Human-readable error message","example":"Not found"},"httpCode":{"type":"integer","description":"HTTP status code","example":404},"source":{"type":"string","description":"Resource type that caused the error","example":"workspace"},"id":{"type":"string","description":"Resource ID related to the error","example":"abc123def456"}}},"ValidationError":{"type":"object","required":["code","message","httpCode","source","errors"],"properties":{"code":{"type":"string","description":"Error code identifier","example":"InvalidFormat"},"message":{"type":"string","description":"Human-readable error message","example":"Invalid format"},"httpCode":{"type":"integer","description":"HTTP status code","example":403},"source":{"type":"string","description":"Resource type that caused the error","example":"link"},"errors":{"type":"array","description":"Array of validation errors","items":{"type":"object","properties":{"code":{"type":"string","description":"Validation error code","example":"RequiredField"},"property":{"type":"string","description":"Property name that failed validation","example":"destination"},"message":{"type":"string","description":"Validation error message","example":"Cannot be empty"},"verbose":{"type":"string","description":"Detailed validation error message","example":"destination cannot be empty"}}}}}},"Link":{"type":"object","required":["id","slashtag","destination","shortUrl","createdAt","updatedAt","status"],"properties":{"id":{"type":"string","description":"Link public ID (link_public_id)","example":"abc123def456"},"title":{"type":"string","description":"Human-readable title for the link","example":"My Example Link"},"slashtag":{"type":"string","description":"URL path component","example":"my-link"},"destination":{"type":"string","format":"uri","description":"Target URL where the link redirects","example":"https://example.com"},"shortUrl":{"type":"string","description":"Complete short URL (domain + slashtag)","example":"rebrand.ly/my-link"},"domainId":{"type":"string","description":"Public ID of the domain used","example":"domain123abc"},"domainName":{"type":"string","description":"Full domain name","example":"rebrand.ly"},"domain":{"type":"object","description":"Domain object with details","properties":{"id":{"type":"string"},"ref":{"type":"string"},"fullName":{"type":"string"},"sharing":{"type":"object"}}},"clicks":{"type":"integer","description":"Number of clicks on the link","example":0},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when link was created","example":"2024-01-15T10:30:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"Timestamp when link was last updated","example":"2024-01-15T10:30:00.000Z"},"status":{"type":"string","enum":["active","deleted","blocked"],"description":"Link status","example":"active"},"description":{"type":"string","description":"Link description (only if links.notes feature is enabled)","example":"This link redirects to our example page"},"workspace":{"type":"object","description":"Workspace information","properties":{"id":{"type":"string","description":"Workspace public ID"}}},"https":{"type":"boolean","description":"Whether the link supports HTTPS","example":true}}},"LinkInput":{"type":"object","description":"Input for creating or updating a link","required":["destination"],"properties":{"destination":{"type":"string","format":"uri","description":"Target URL where the link redirects","example":"https://example.com/page"},"slashtag":{"type":"string","description":"Custom URL path (auto-generated if not provided)","example":"my-custom-link"},"domainId":{"type":"string","description":"Domain public ID to use for the link"},"domain":{"type":"object","description":"Domain object (alternative to domainId)","properties":{"id":{"type":"string"},"fullName":{"type":"string"}}},"title":{"type":"string","description":"Human-readable title"},"description":{"type":"string","description":"Link description (requires links.notes feature)"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}}},"maxItems":5,"description":"Tags to attach (max 5)"},"scripts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}}},"description":"Scripts to attach (requires links.scripts feature)"},"ttl":{"type":"integer","description":"Time to live in seconds (requires links.expiration feature)"},"password":{"type":"string","description":"Password protection (requires links.password feature)"},"https":{"type":"boolean","description":"Enable HTTPS","default":true}}},"Workspace":{"type":"object","required":["id","name","type","createdAt"],"properties":{"id":{"type":"string","description":"Workspace public ID","example":"workspace123abc"},"name":{"type":"string","description":"Workspace name","example":"My Workspace"},"avatarUrl":{"type":"string","description":"Workspace avatar URL"},"links":{"type":"integer","description":"Number of links in workspace"},"teammates":{"type":"integer","description":"Number of teammates in workspace"},"domains":{"type":"integer","description":"Number of domains in workspace"},"owner":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["classic","extended","gallery"]},"default":{"type":"boolean"},"revoked":{"type":"boolean"},"role":{"type":"string","enum":["owner","admin","user","guest","viewer"]},"clicks":{"type":"integer"},"sessions":{"type":"integer"},"expiration":{"type":"object","properties":{"ttl":{"type":"integer"}}},"conversionTracking":{"description":"Conversion tracking settings for this workspace.\nOnly present when `include=conversionTracking` is requested on the list endpoint.\n","$ref":"#/components/schemas/ConversionTrackingSettings"}}},"ConversionTrackingSettings":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean","description":"Whether conversion tracking is enabled for this workspace","example":true},"attributionWindow":{"type":"integer","nullable":true,"minimum":1,"maximum":90,"description":"Attribution window in days. `null` when conversion tracking is not configured\nor disabled. Defaults to 30 when enabled without specifying a value.\n","example":30},"apiKeyCreatedByOwner":{"type":"boolean","nullable":true,"description":"Whether the workspace Owner has created a conversion tracking API key\n(GRPN-187369). API keys are account-level resources always created by the\naccount they belong to, so existence implies the Owner created it. The key\nvalue itself is never exposed.\n\nOn the dedicated `/workspaces/{workspace_id}/conversion-tracking` endpoint\nthis is always a boolean (the endpoint is restricted to owner/admin).\nOn the workspaces list (`include=conversionTracking`) it is a boolean for\nworkspaces where the caller has the `owner` or `admin` role, and `null`\nfor lower roles (the field is always present).\n","example":true}}},"Tag":{"type":"object","required":["id","name","color"],"properties":{"id":{"type":"string","description":"Tag public ID"},"name":{"type":"string"},"color":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Domain":{"type":"object","required":["id","fullName"],"properties":{"id":{"type":"string","description":"Domain public ID"},"fullName":{"type":"string","description":"Full domain name","example":"rebrand.ly"},"topLevelDomain":{"type":"string","description":"TLD","example":"ly"},"type":{"type":"string","enum":["USER","SYSTEM"]},"status":{"type":"object","properties":{"dns":{"type":"string","enum":["verified","unverified","verifying"]},"subscription":{"type":"string","enum":["active","inactive","pending"]}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"TLD":{"type":"object","properties":{"id":{"type":"string","description":"TLD code","example":"com"},"name":{"type":"string","description":"TLD display name"},"searchRank":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}}}},"Account":{"type":"object","required":["id","email"],"properties":{"id":{"type":"string","description":"Account public ID"},"email":{"type":"string","format":"email"},"fullName":{"type":"string"},"avatarUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"subscription":{"type":"object","properties":{"plan":{"type":"object"},"limits":{"type":"object"},"billing":{"type":"object"}}}}},"Script":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Script public ID"},"name":{"type":"string"},"value":{"type":"string","description":"Script code/content"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ScriptInput":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}},"LinkRule":{"type":"object","required":["id","destination","conditions"],"properties":{"id":{"type":"string","description":"Rule public ID"},"rank":{"type":"integer"},"destination":{"type":"string","format":"uri"},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}},"createdAt":{"type":"string","format":"date-time"}}},"Plan":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Plan public ID"},"name":{"type":"string"},"description":{"type":"string"},"price":{"type":"number"},"features":{"type":"array","items":{"type":"object"}}}},"Feature":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","description":"Feature code (e.g., 'links.tags')"},"name":{"type":"string"},"description":{"type":"string"},"config":{"type":"object"}}},"App":{"type":"object","description":"Mobile app for deep linking","required":["id","name","type"],"properties":{"id":{"type":"string","description":"App public ID"},"namespace":{"type":"string","description":"App namespace/bundle identifier","example":"com.example.myapp"},"name":{"type":"string","description":"App display name"},"scheme":{"type":"string","description":"URL scheme for deep linking","example":"myapp://"},"type":{"type":"string","enum":["ios","android"],"description":"Mobile platform type"},"installUrl":{"type":"string","format":"uri","description":"URL to app store listing"},"path":{"type":"string","description":"Deep link path template"},"fallback":{"type":"object","description":"Fallback behavior when app is not installed","properties":{"mode":{"type":"string","enum":["web","prompt"],"description":"How to handle users without the app"},"destination":{"type":"string","format":"uri","description":"Fallback destination URL"}}},"active":{"type":"boolean","description":"Whether the app is active"},"deleted":{"type":"boolean","description":"Whether the app is marked as deleted"},"deleting":{"type":"boolean","description":"Whether the app is being deleted"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"AppInput":{"type":"object","description":"Input for creating or updating an app","required":["name","type","namespace"],"properties":{"name":{"type":"string","description":"App display name"},"namespace":{"type":"string","description":"App namespace/bundle identifier","example":"com.example.myapp"},"scheme":{"type":"string","description":"URL scheme for deep linking"},"type":{"type":"string","enum":["ios","android"]},"installUrl":{"type":"string","format":"uri","description":"URL to app store listing"},"path":{"type":"string","description":"Deep link path template"},"fallback":{"type":"object","properties":{"mode":{"type":"string","enum":["web","prompt"]},"destination":{"type":"string","format":"uri"}}}}},"Cart":{"type":"object","description":"Shopping cart for purchasing domains, plans, and addons","required":["id"],"properties":{"id":{"type":"string","description":"Cart public ID"},"createdAt":{"type":"string","format":"date-time"},"price":{"type":"object","description":"Total cart price breakdown","properties":{"net":{"type":"number","description":"Net price before VAT"},"full":{"type":"number","description":"Full price including VAT"},"vat":{"type":"number","description":"VAT amount"}}},"vat":{"type":"number","description":"VAT percentage"},"promo":{"type":"object","description":"Applied promotional code","properties":{"id":{"type":"string"},"code":{"type":"string"}}},"items":{"type":"array","description":"Items in the cart","items":{"$ref":"#/components/schemas/CartItem"}}}},"CartItem":{"type":"object","description":"An item in the shopping cart","properties":{"type":{"type":"string","enum":["domain","plan","addon"],"description":"Type of cart item"},"id":{"type":"string","description":"Item public ID"},"price":{"type":"object","properties":{"net":{"type":"number"},"full":{"type":"number"},"vat":{"type":"number"}}},"domain":{"type":"object","description":"Domain details (when type is domain)","properties":{"fullName":{"type":"string"},"tld":{"type":"string"}}},"plan":{"type":"object","description":"Plan details (when type is plan)","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"addon":{"type":"object","description":"Addon details (when type is addon)","properties":{"id":{"type":"string"},"resource":{"type":"string"}}}}},"CustomAttribute":{"type":"object","description":"Custom attribute definition for links","required":["id","key","type"],"properties":{"id":{"type":"string","description":"Custom attribute public ID"},"key":{"type":"string","description":"Attribute key name","example":"campaign_id"},"type":{"type":"string","enum":["string","numeric"],"description":"Attribute value type"}}},"CustomAttributeInput":{"type":"object","description":"Input for creating a custom attribute","required":["key","type"],"properties":{"key":{"type":"string","description":"Attribute key name"},"type":{"type":"string","enum":["string","numeric"],"description":"Attribute value type"}}},"Addon":{"type":"object","description":"Purchasable addon for extending account capabilities","required":["id","resource"],"properties":{"id":{"type":"string","description":"Addon public ID"},"resource":{"type":"string","description":"Resource type this addon applies to (e.g., 'links', 'domains')"},"lifecycle":{"type":"string","description":"Addon lifecycle type"},"isStandard":{"type":"boolean","description":"Whether this is a standard addon"},"features":{"type":"array","description":"Features granted by this addon","items":{"type":"object","properties":{"id":{"type":"string","description":"Feature code"},"config":{"type":"object","description":"Feature configuration"},"isAddon":{"type":"boolean"}}}},"block":{"type":"object","description":"Block/unit configuration","properties":{"units":{"type":"integer","description":"Number of units in a block"}}},"deals":{"type":"array","description":"Available pricing deals for this addon","items":{"type":"object","properties":{"id":{"type":"string","description":"Deal public ID"},"cycle":{"type":"object","properties":{"price":{"type":"object","properties":{"full":{"type":"number"},"net":{"type":"number"},"vat":{"type":"number"}}},"recurrence":{"type":"object","properties":{"interval":{"type":"string","enum":["month","year"]},"count":{"type":"integer"}}}}},"external":{"type":"string","description":"External payment provider ID"}}}}}},"BillingData":{"type":"object","description":"Account billing information","properties":{"customerName":{"type":"string","description":"Customer/Company name (2-128 characters)"},"country":{"type":"string","description":"Country code (ISO 2-letter)","example":"us"},"taxCountry":{"type":"string","description":"Tax country code if different from country"},"address":{"type":"string","description":"Street address (2-256 characters)"},"addressLine2":{"type":"string","description":"Additional address line"},"city":{"type":"string","description":"City name (2-90 characters)"},"state":{"type":"string","description":"State/Province (1-60 characters)"},"postalCode":{"type":"string","description":"Postal/ZIP code (max 20 characters)"},"regCode":{"type":"string","description":"Tax registration code (VAT number, etc.)"},"phoneNumber":{"type":"string","description":"Phone number (3-22 characters)"}}},"BillingDataInput":{"type":"object","description":"Input for updating billing data","required":["customerName","country","address","city"],"properties":{"customerName":{"type":"string","description":"Customer/Company name (2-128 characters)"},"country":{"type":"string","description":"Country code (ISO 2-letter)"},"taxCountry":{"type":"string","description":"Tax country code if different from country"},"address":{"type":"string","description":"Street address (2-256 characters)"},"addressLine2":{"type":"string","description":"Additional address line"},"city":{"type":"string","description":"City name (2-90 characters)"},"state":{"type":"string","description":"State/Province (1-60 characters)"},"postalCode":{"type":"string","description":"Postal/ZIP code (max 20 characters)"},"regCode":{"type":"string","description":"Tax registration code (VAT number, etc.)"},"phoneNumber":{"type":"string","description":"Phone number (3-22 characters)"}}},"ReportTemplate":{"type":"object","description":"Custom report template","required":["id","name"],"properties":{"id":{"type":"string","description":"Template public ID"},"name":{"type":"string","description":"Template name"},"description":{"type":"string","description":"Template description"},"query":{"type":"object","description":"Query definition for the report"},"schedule":{"type":"object","description":"Schedule configuration","properties":{"id":{"type":"string"},"frequency":{"type":"string","enum":["daily","weekly","monthly"]},"active":{"type":"boolean"},"nextRun":{"type":"string","format":"date-time"}}},"lastExecutionTimestamp":{"type":"string","format":"date-time","description":"Last time the report was executed"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ReportExecution":{"type":"object","description":"Report execution result","required":["id","status"],"properties":{"id":{"type":"string","description":"Execution public ID"},"templateId":{"type":"string","description":"Template that was executed"},"status":{"type":"string","enum":["pending","running","completed","failed"],"description":"Execution status"},"startedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"result":{"type":"object","description":"Execution result data"},"error":{"type":"string","description":"Error message if execution failed"},"createdAt":{"type":"string","format":"date-time"}}},"AccountDomain":{"type":"object","description":"Domain owned by the account","required":["id","fullName"],"properties":{"id":{"type":"string","description":"Domain public ID (32 characters)"},"fullName":{"type":"string","description":"Full domain name","example":"my-brand.ly"},"topLevelDomain":{"type":"string","description":"Top-level domain","example":"ly"},"type":{"type":"string","enum":["USER","SYSTEM"],"description":"Domain type (USER = custom, SYSTEM = rebrandly provided)"},"ownerId":{"type":"string","description":"Owner account public ID"},"provider":{"type":"string","description":"Domain provider name"},"level":{"type":"integer","description":"Domain hierarchy level (1 = root domain)"},"managed":{"type":"boolean","description":"Whether domain is managed by Rebrandly"},"https":{"type":"boolean","description":"Whether HTTPS is enabled"},"status":{"type":"object","properties":{"dns":{"type":"string","enum":["unverified","verified","verifying"],"description":"DNS verification status"},"subscription":{"type":"string","enum":["requested","activating","active","error","revoked","renewing"],"description":"Domain subscription status"}}},"sharing":{"type":"object","properties":{"protocol":{"type":"object","properties":{"default":{"type":"string","enum":["http","https"]},"allowed":{"type":"array","items":{"type":"string"}}}}}},"routing":{"type":"object","properties":{"addressing":{"type":"string","enum":["unicast","anycast"]},"hostnames":{"type":"array","items":{"type":"object","properties":{"hostname":{"type":"string"},"layer":{"type":"string"},"managed":{"type":"boolean"}}}},"homepage":{"type":"object","properties":{"mode":{"type":"string"},"url":{"type":"string"}}},"fallback":{"type":"object","properties":{"mode":{"type":"string"},"url":{"type":"string"},"targetDomain":{"type":"string"}}},"root":{"type":"string","description":"Root URL for the domain"}}},"parent":{"type":"object","description":"Parent domain (for subdomains)","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"managed":{"type":"boolean"}}},"subdomains":{"type":"integer","description":"Number of subdomains"},"nameservers":{"type":"array","items":{"type":"string"},"description":"DNS nameservers"},"autorenew":{"type":"boolean","description":"Whether auto-renewal is enabled"},"expiration":{"type":"object","description":"Domain expiration information","properties":{"date":{"type":"string","format":"date-time"},"targetDate":{"type":"string","format":"date-time"}}},"price":{"type":"object","description":"Domain pricing","properties":{"registration":{"type":"number"},"renewal":{"type":"number"}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UserData":{"type":"object","description":"Account user/onboarding data","properties":{"companyName":{"type":"string","description":"Company name"},"companySize":{"type":"string","description":"Company size range"},"industry":{"type":"string","description":"Industry category"},"role":{"type":"string","description":"User's role"},"useCase":{"type":"string","description":"Primary use case"},"notes":{"type":"string","description":"Additional notes"}}},"UserDataInput":{"type":"object","description":"Input for updating user data","properties":{"companyName":{"type":"string"},"companySize":{"type":"string"},"industry":{"type":"string"},"role":{"type":"string"},"useCase":{"type":"string"},"notes":{"type":"string"}}},"Teammate":{"type":"object","description":"Account teammate","required":["id","email","role"],"properties":{"id":{"type":"string","description":"Teammate public ID"},"email":{"type":"string","format":"email","description":"Teammate's email address"},"fullName":{"type":"string","description":"Teammate's full name"},"avatarUrl":{"type":"string","format":"uri","description":"Avatar image URL"},"role":{"type":"string","enum":["owner","admin","user","guest","viewer"],"description":"Role within the account"},"createdAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["active","deleted"],"description":"Teammate status"}}},"Invite":{"type":"object","description":"Account invite","required":["id","email","status"],"properties":{"id":{"type":"string","description":"Invite public ID"},"email":{"type":"string","format":"email","description":"Invitee's email address"},"role":{"type":"string","enum":["owner","admin","user","guest","viewer"],"description":"Role to be granted upon acceptance"},"status":{"type":"string","enum":["pending","accepted","expired"],"description":"Invite status"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When the invite expires"},"workspaces":{"type":"array","description":"Workspaces the invitee will have access to","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}},"InviteInput":{"type":"object","description":"Input for creating an invite","required":["email"],"properties":{"email":{"type":"string","format":"email","description":"Email address to invite"},"role":{"type":"string","enum":["admin","user","guest","viewer"],"description":"Role to grant (default is user)"},"workspaces":{"type":"array","description":"Workspace IDs to grant access to","items":{"type":"string"}}}},"Preference":{"type":"object","description":"Account preference","properties":{"property":{"type":"string","enum":["cultureName","dateFormat","datetimeFormat","language","avatarUrl"],"description":"Preference name"},"value":{"type":"string","description":"Preference value"}}},"Integration":{"type":"object","description":"Third-party integration configuration","properties":{"name":{"type":"string","enum":["clickmeter"],"description":"Integration name"},"active":{"type":"boolean","description":"Whether this integration is active"},"configured":{"type":"boolean","description":"Whether this integration is configured"}}},"PaymentMethod":{"type":"object","description":"Payment method details from Stripe","properties":{"id":{"type":"string","description":"Payment method ID"},"type":{"type":"string","enum":["card","sepa_debit","paypal"],"description":"Payment method type"},"card":{"type":"object","description":"Card details (when type is card)","properties":{"brand":{"type":"string","description":"Card brand (visa, mastercard, etc.)"},"last4":{"type":"string","description":"Last 4 digits of card number"},"expMonth":{"type":"integer","description":"Expiration month"},"expYear":{"type":"integer","description":"Expiration year"}}},"created":{"type":"integer","description":"Unix timestamp when payment method was created"}}},"RotatorRule":{"type":"object","description":"Rotator rule for A/B testing or traffic distribution","required":["id","destination"],"properties":{"id":{"type":"string","description":"Rule public ID"},"rank":{"type":"integer","description":"Rule priority/rank"},"destination":{"type":"string","format":"uri","description":"Target destination URL"},"weight":{"type":"integer","description":"Traffic weight percentage (0-100)"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"RotatorRuleInput":{"type":"object","description":"Input for creating/updating a rotator rule","required":["destination"],"properties":{"destination":{"type":"string","format":"uri","description":"Target destination URL"},"weight":{"type":"integer","description":"Traffic weight percentage (0-100)","minimum":0,"maximum":100},"rank":{"type":"integer","description":"Rule priority/rank"}}},"OpenGraph":{"type":"object","description":"OpenGraph metadata for social sharing","properties":{"title":{"type":"string","description":"OpenGraph title"},"description":{"type":"string","description":"OpenGraph description"},"image":{"type":"string","format":"uri","description":"OpenGraph image URL"},"imageWidth":{"type":"integer","description":"Image width in pixels"},"imageHeight":{"type":"integer","description":"Image height in pixels"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"OpenGraphInput":{"type":"object","description":"Input for setting OpenGraph metadata","properties":{"title":{"type":"string","maxLength":255,"description":"OpenGraph title"},"description":{"type":"string","maxLength":2000,"description":"OpenGraph description"},"image":{"type":"string","format":"uri","description":"OpenGraph image URL"}}},"ReportSchedule":{"type":"object","description":"Report template schedule configuration","required":["id"],"properties":{"id":{"type":"string","description":"Schedule public ID"},"templateId":{"type":"string","description":"Associated template ID"},"active":{"type":"boolean","description":"Whether the schedule is active"},"recurrence":{"type":"object","description":"Recurrence configuration","properties":{"period":{"type":"string","enum":["day","week","month"],"description":"Recurrence period unit"},"units":{"type":"integer","description":"Number of period units between executions"}}},"timespan":{"type":"object","description":"Data timespan for each execution","properties":{"unit":{"type":"string","enum":["hour","day","week","month"]},"units":{"type":"integer"}}},"timezone":{"type":"string","description":"Timezone for scheduling (e.g., UTC, America/New_York)"},"nextExecutionTimestamp":{"type":"string","format":"date-time","description":"Next scheduled execution time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"ReportScheduleInput":{"type":"object","description":"Input for creating/updating a schedule","properties":{"active":{"type":"boolean","description":"Whether the schedule is active"},"recurrence":{"type":"object","properties":{"period":{"type":"string","enum":["day","week","month"]},"units":{"type":"integer"}}},"timespan":{"type":"object","properties":{"unit":{"type":"string","enum":["hour","day","week","month"]},"units":{"type":"integer"}}},"timezone":{"type":"string","description":"Timezone for scheduling"},"nextExecutionTimestamp":{"type":"string","format":"date-time","description":"Next scheduled execution time"}}},"ClickStats":{"type":"object","description":"Click statistics for a time period","properties":{"date":{"type":"string","format":"date-time","description":"Start of the time period"},"clicks":{"type":"integer","description":"Number of clicks in the period"}}},"AppKey":{"type":"object","description":"API key/credential for account access","properties":{"id":{"type":"string","description":"App key public ID"},"name":{"type":"string","description":"Descriptive name for the key"},"apiKey":{"type":"string","description":"The API key value (only shown on creation)"},"scopes":{"type":"array","items":{"type":"string"},"description":"Permission scopes granted to this key"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"AccountFeature":{"type":"object","description":"Feature granted to an account","properties":{"id":{"type":"string","description":"Feature code identifier"},"config":{"type":"object","description":"Feature configuration"},"revoked":{"type":"boolean","description":"Whether the feature is revoked"},"isAddon":{"type":"boolean","description":"Whether this feature comes from an addon"}}},"ClickstreamResource":{"type":"object","description":"Clickstream resource (webhook or server click stream)","properties":{"id":{"type":"string","description":"Resource public ID"},"dynamoId":{"type":"string","description":"DynamoDB ID"},"name":{"type":"string","description":"Resource name"},"type":{"type":"string","enum":["webhook","server_click_stream"]},"revoked":{"type":"boolean","description":"Whether the resource is revoked"},"createdAt":{"type":"string","format":"date-time"}}},"Plugin":{"type":"object","description":"Installed plugin/extension","properties":{"name":{"type":"string","description":"Plugin identifier","enum":["chrome-ext","firefox-ext","safari-ext","ios-app","android-app","zapier"]}}},"AccountAddon":{"type":"object","description":"Addon attached to an account subscription","properties":{"id":{"type":"string","description":"Addon public ID"},"addon":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"name":{"type":"string"}}},"status":{"type":"string","enum":["active","deactivated","expired"]},"quantity":{"type":"integer","description":"Number of units"},"stripeSubscriptionId":{"type":"string","description":"Stripe subscription ID if purchased via Stripe"},"createdAt":{"type":"string","format":"date-time"},"expiredAt":{"type":"string","format":"date-time","description":"Expiration date"}}},"Transaction":{"type":"object","description":"Billing transaction","properties":{"id":{"type":"string","description":"Transaction public ID"},"status":{"type":"string","enum":["failed","succeeded","refunded","lost"]},"amount":{"type":"number","format":"float","description":"Transaction amount"},"currency":{"type":"string","description":"Currency code (e.g., USD)"},"payments":{"type":"array","items":{"type":"object","properties":{"item":{"type":"object","properties":{"type":{"type":"string","enum":["plan","domain","addon"]},"id":{"type":"string"}}},"amount":{"type":"number"},"recurrence":{"type":"object","properties":{"first":{"type":"boolean"}}}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}}},"examples":{"FeatureConfigEssentials":{"summary":"Essentials plan (3 months data access)","value":{"dataAccessMonths":3}},"FeatureConfigProfessional":{"summary":"Professional plan (6 months data access)","value":{"dataAccessMonths":6}},"FeatureConfigGrowth":{"summary":"Growth plan (12 months data access)","value":{"dataAccessMonths":12}},"FeatureConfigEnterprise":{"summary":"Enterprise plan (24 months data access)","value":{"dataAccessMonths":24}}}},"security":[{"apiKey":[]}],"x-readme":{}}