{"openapi": "3.0.0", "info": {"version": "4.0.0", "title": "Bitly API", "termsOfService": "https://bitly.com/pages/terms-of-service", "contact": {"url": "https://bitly.is/API-support"}, "license": {"name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html"}, "x-logo": {"url": "/v4/header-logo.png"}}, "servers": [{"url": "https://api-ssl.bitly.com/v4"}], "security": [{"bearerAuth": []}], "tags": [{"name": "Groups", "description": "Groups are subdivisions within organizations. Every user will be in at least one group, and every shortened link will be in one group. Most actions on our API will be on behalf of a group. For example, when you shorten a link, it will be on behalf of a user and a group.\n"}, {"name": "Organizations", "description": "Organizations are equivalent to a Bitly account. Every plan limit, group, and user is tied to an organization.\n"}, {"name": "User", "description": "Some subscription plans allow multiple users. Only one user is used for authenticating a call, and these operations apply only to the authenticated user.\n"}, {"name": "BSDs", "description": "Branded short domains (BSDs) are the custom domains used to brand your links. A BSD can be added to a Bitly organization and may be assigned to one or more groups. They can contain up to 32 characters.\n"}, {"name": "Custom Domains", "description": "Set up a custom domain, the domain that replaces bit.ly in your short links. Register a domain that your plan includes, where Bitly configures the DNS for you. Or add a domain you already own, then create the DNS records Bitly returns at your registrar. DNS verification runs asynchronously in both cases, and takes 24 to 48 hours, so read the domain for its validation_status when your user returns.\n"}, {"name": "Automations", "description": "Automations are Instagram keyword auto-replies. When a follower comments or messages a keyword on a connected Instagram account, the automation responds with a configured message and call-to-action buttons.\n"}, {"name": "Bitlinks", "description": "Bitlinks are shortened links. They could begin with the bit.ly domain or your own custom branded short domain (BSD).\n\n**Related Operations:**\n- [POST /bitlinks](#createFullBitlink) - Create a new bitlink or add a custom keyword to an existing bitlink\n- [PATCH /bitlinks/{bitlink}](#updateBitlink) - Redirect an existing bitlink\n"}, {"name": "Custom Bitlinks", "description": "These endpoints are for updating custom Bitlinks only. Custom Bitlinks have both a BSD and a customized back-half (e.g., yourcompany.com/yourcampaign). If a link begins with the bit.ly domain or ends with an auto-generated random string it is not a custom Bitlink.\n"}, {"name": "Campaigns", "description": "Bitly Campaigns are used to build and organize links and metrics for marketing campaigns.\n"}, {"name": "Webhooks", "description": "Webhooks are a method of sending information from Bitly to an application outside of Bitly. It's a way to automate actions or updates between two different systems. These endpoints are for configuring your webhooks.\n"}, {"name": "Deeplinks", "description": "Deeplinks refers to links that direct a user to a location inside of a mobile application. Bitly allows accounts to configure varying implementations of Deeplinks.\n"}, {"name": "Billing", "description": "All endpoints under this tag are related to accounts subscribing to the Bitly service.\n"}, {"name": "Tiers", "description": "Tiers references what level subscription a Bitly account is under.\n"}, {"name": "SSO", "description": "SSO is an acronym for Single Sign-On. This relates to a method of authentication used by some Bitly accounts.\n"}, {"name": "Invitations", "description": "Invitations allow new users to be invited to a Bitly organization via email or username. These endpoints handle both creation, retrieval, and deletion of invitations tied to an organization.\n"}, {"name": "Bulk Upload", "description": "Bulk Upload lets users upload a CSV or XLSX file to create links, QR codes, or both in one request.\n"}, {"name": "Launchpads", "description": "A link launchpad is a customizable page that contains a collection of links. These endpoints allow for the customization of the links associated with this site and the appearance of the site itself.\n"}, {"name": "Bitly Sites", "description": "Bitly Sites are customizable landing pages that contain a collection of links, images, and other content. These endpoints allow for creating, updating, publishing, deleting, and getting metrics for Bitly Sites.\n"}, {"name": "Images", "description": "Images can be uploaded to be use in a Bitly QR code. Images can be uploaded, cropped, re-cropped, and fetched via the API. Each image includes an Image GUID and a public URL hosting the image.\n"}, {"name": "QR Codes", "description": "QR codes can be created and customized with different dot patterns, corner shapes, colors, and more. They can contain bitlinks, links to microsites, or several kinds of static data.\n"}, {"name": "AI Assist", "description": "AI Assist insights and chat functionality for data analysis and link creation.\n"}], "paths": {"/shorten": {"post": {"summary": "Shorten a Link", "description": "Converts a long url to a Bitlink. You may see errors returned from this endpoint - \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn't have DNS properly configured.", "tags": ["Bitlinks"], "operationId": "createBitlink", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Shorten"}}}}, "responses": {"200": {"description": "SUCCESS", "headers": {"X-Bsd-Error": {"schema": {"type": "string"}, "description": "An explanation of the DNS error received"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ShortenBitlinkBody"}}}}, "201": {"description": "CREATED", "headers": {"X-Bsd-Error": {"schema": {"type": "string"}, "description": "An explanation of the DNS error received"}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ShortenBitlinkBody"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "headers": {"X-Ratelimit-Reason": {"schema": {"type": "string"}, "description": "An explanation of the ratelimit received."}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "417": {"description": "EXPECTATION_FAILED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExpectationFailed"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks": {"post": {"summary": "Create a Bitlink", "description": "Converts a long url to a Bitlink and sets additional parameters. You may see errors returned from this endpoint - \"DNS_CONFIGURATION_ERROR\" occurs if you are attempting to shorten links against a custom domain which doesn't have DNS properly configured.", "tags": ["Bitlinks"], "operationId": "createFullBitlink", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FullShorten"}, "examples": {"Customized Keyword": {"value": {"long_url": "https://dev.bitly.com", "domain": "yourdomain.co", "group_guid": "Ba1bc23dE4F", "keyword": "new-link"}}, "Add Keyword to Existing Bitlink": {"value": {"bitlink_id": "yourdomain.co/1234567890", "keyword": "new-link-edited"}}, "With Expiration": {"value": {"long_url": "https://dev.bitly.com", "expiration_at": "2025-07-28T14:30:00+0000"}}}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkBody"}}}}, "201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkBody"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "417": {"description": "EXPECTATION_FAILED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExpectationFailed"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}": {"delete": {"summary": "Delete a Bitlink", "description": "Delete an unedited hash Bitlink.", "tags": ["Bitlinks"], "parameters": [{"$ref": "#/components/parameters/Bitlink"}], "operationId": "deleteBitlink", "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LinkDeletionResponse"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "patch": {"summary": "Update a Bitlink", "description": "Updates fields in the specified link. To redirect the link (i.e. to update the Long URL), use the long_url parameter. This will always charge an encode limit.", "tags": ["Bitlinks"], "operationId": "updateBitlink", "parameters": [{"$ref": "#/components/parameters/Bitlink"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkUpdateBody"}, "examples": {"Redirect Bitlink Destination": {"value": {"long_url": "https://www.newdestination.com"}}, "With Expiration": {"value": {"expiration_at": "2025-07-28T14:30:00+0000"}}}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkBody"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "409": {"description": "CONFLICT", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "get": {"summary": "Retrieve a Bitlink", "description": "Returns information for the specified link.", "tags": ["Bitlinks"], "parameters": [{"$ref": "#/components/parameters/Bitlink"}], "operationId": "getBitlink", "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkBody"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/expand": {"post": {"summary": "Expand a Bitlink", "description": "Returns the short link and long URL for the specified link.", "tags": ["Bitlinks"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExpandBitlink"}}}}, "operationId": "expandBitlink", "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExpandedBitlink"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/clicks": {"get": {"summary": "Get Clicks for a Bitlink", "description": "Returns the click counts for the specified link in an array based on a date.", "tags": ["Bitlinks"], "operationId": "getClicksForBitlink", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Clicks"}}, "text/csv": {"schema": {"type": "string"}, "example": "Date, Clicks\n2023-07-10T00:00:00+0000, 15\n"}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/clicks/summary": {"get": {"summary": "Get a Clicks Summary for a Bitlink", "description": "Returns the click counts for the specified link rolled up into a single field.", "tags": ["Bitlinks"], "operationId": "getClicksSummaryForBitlink", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClicksSummary"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/engagements": {"get": {"summary": "Get Engagement Counts for a Bitlink", "description": "Returns an array of engagement counts for the specified link. The array is comprised of button click, click and scan counts for each time window, where the window is based on the provided unit.", "tags": ["Bitlinks"], "operationId": "getEngagements", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TotalEngagements"}}, "text/csv": {"schema": {"type": "string"}, "example": "Date, Engagements\n2006-01-02T15:04:05, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/engagements/summary": {"get": {"summary": "Get an Engagement Count Summary for a Bitlink", "description": "Returns the engagement counts for the specified link rolled up into a single field.", "tags": ["Bitlinks"], "operationId": "getEngagementsSummary", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TotalEngagementsSummary"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/agentic_traffic": {"get": {"summary": "Get Agentic Traffic for a Bitlink", "description": "Returns agentic traffic (AI agents and assistants) for the specified link over time, broken down by agent.", "tags": ["Bitlinks"], "operationId": "getAgenticTrafficForBitlink", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Agent, Clicks\nChatGPT, 25\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/countries": {"get": {"summary": "Get Metrics for a Bitlink by Country", "description": "Returns the country origins of click traffic for the specified link.", "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByCountries", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Country, Clicks\nUS, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/cities": {"get": {"summary": "Get Metrics for a Bitlink by City", "description": "Returns the city origins of click traffic for the specified link.", "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByCities", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CityMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "City, Subregion, Region, Country, Clicks\nNew York, , NY, US, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/devices": {"get": {"summary": "Get Metrics for a Bitlink by Device Type", "description": "Returns the device types generating click traffic to the specified link.", "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByDevices", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Device Type, Clicks\nDesktop, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/referrers": {"get": {"summary": "Get Metrics for a Bitlink by Referrers", "description": "Returns referrer click counts for the specified link.", "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByReferrers", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Referrers, Domain/Sub-Domain, Clicks\nOther Sites, direct, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/referrer_name": {"get": {"summary": "Get Metrics for a Bitlink by Referrer Name", "description": "Returns referrer click counts for the specified link.", "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByReferrerName", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Referrer-Name,Clicks\ndirect,4\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/referring_domains": {"get": {"summary": "Get Metrics for a Bitlink by Referring Domains", "description": "Returns the referring domain click counts for the specified link.", "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByReferringDomains", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bitlinks/{bitlink}/referrers_by_domains": {"get": {"summary": "Get Metrics for a Bitlink by Referrers by Domain", "description": "Returns click metrics grouped by referrers for the specified link.", "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByReferrersByDomains", "parameters": [{"$ref": "#/components/parameters/Bitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReferrersByDomains"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/custom_bitlinks": {"post": {"summary": "Add Custom Bitlink", "description": "Add a keyword (or \"custom back-half\") to a Bitlink with a Custom Domain (domains must match). This endpoint can also be used for initial redirects to a link.", "tags": ["Custom Bitlinks"], "operationId": "addCustomBitlink", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddCustomBitlink"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomBitlink"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/custom_bitlinks/{custom_bitlink}": {"patch": {"summary": "Update Custom Bitlink", "description": "Move a keyword (or custom back-half) to a different Bitlink (domains must match).", "tags": ["Custom Bitlinks"], "operationId": "updateCustomBitlink", "parameters": [{"$ref": "#/components/parameters/CustomBitlink"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateCustomBitlink"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomBitlink"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "get": {"summary": "Retrieve Custom Bitlink", "description": "Returns the details and history of the specified link.", "tags": ["Custom Bitlinks"], "operationId": "getCustomBitlink", "parameters": [{"$ref": "#/components/parameters/CustomBitlink"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomBitlink"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/custom_bitlinks/{custom_bitlink}/clicks_by_destination": {"get": {"summary": "Get Metrics for a Custom Bitlink by Destination", "description": "Returns click metrics for the specified link by its historical destinations.", "operationId": "getCustomBitlinkMetricsByDestination", "tags": ["Custom Bitlinks"], "parameters": [{"$ref": "#/components/parameters/CustomBitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/custom_bitlinks/{custom_bitlink}/clicks": {"get": {"summary": "Get Clicks for a Custom Bitlink's Entire History", "description": "Returns the click counts for the specified link. This returns an array with clicks based on a date.", "tags": ["Custom Bitlinks"], "operationId": "getClicksForCustomBitlink", "parameters": [{"$ref": "#/components/parameters/CustomBitlink"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Clicks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups": {"get": {"summary": "Retrieve Groups", "description": "Returns a list of groups in the organization.", "tags": ["Groups"], "operationId": "getGroups", "parameters": [{"$ref": "#/components/parameters/OrganizationGUIDFilter"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Groups"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}": {"patch": {"summary": "Update a Group", "description": "Updates the details of a group.", "tags": ["Groups"], "operationId": "updateGroup", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupUpdate"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Group"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "get": {"summary": "Retrieve a Group", "description": "Returns details for a group.", "tags": ["Groups"], "operationId": "getGroup", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Group"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/tags": {"get": {"summary": "Retrieve Tags by Group", "description": "Returns the tags currently used in the specified group. Maximum 1000.", "tags": ["Groups"], "operationId": "getGroupTags", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TagType"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Tags"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/bitlinks": {"get": {"summary": "Retrieve Bitlinks by Group", "description": "Returns a paginated collection of Bitlinks for a group. The list of custom bitlinks has newest entries first.", "tags": ["Bitlinks"], "operationId": "getBitlinksByGroup", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/SearchAfter"}, {"$ref": "#/components/parameters/Query"}, {"$ref": "#/components/parameters/HostnamePathQuery"}, {"$ref": "#/components/parameters/CreatedBefore"}, {"$ref": "#/components/parameters/CreatedAfter"}, {"$ref": "#/components/parameters/Archived"}, {"$ref": "#/components/parameters/Deeplinks"}, {"$ref": "#/components/parameters/DomainDeeplinks"}, {"$ref": "#/components/parameters/FilterCampaignGUID"}, {"$ref": "#/components/parameters/FilterChannelGUID"}, {"$ref": "#/components/parameters/FilterCustomBitlink"}, {"$ref": "#/components/parameters/FilterHasQRCodes"}, {"$ref": "#/components/parameters/FilterIsExpired"}, {"$ref": "#/components/parameters/FilterHasExpiration"}, {"$ref": "#/components/parameters/FilterHasDynamicRouting"}, {"$ref": "#/components/parameters/Tags"}, {"$ref": "#/components/parameters/LaunchpadIDs"}, {"$ref": "#/components/parameters/EncodingLogin"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Bitlinks"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "patch": {"summary": "Bulk update bitlinks", "description": "Bulk update can add or remove tags or archive up to 100 links at a time; The response includes a list of bitlink ids that were updated.", "tags": ["Bitlinks"], "operationId": "updateBitlinksByGroup", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkUpdateRequest"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkUpdate"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/engagements/sorted/top": {"get": {"summary": "Retrieve Top Links and Decoupled QR Codes by Engagements", "description": "Returns the bitlinks and decoupled QR codes in a group with the most engagements over the requested time window, ranked together in descending order by engagement count. Bitlinks and decoupled QR codes are returned in separate lists; `sorted_links` preserves the unified descending-by-count ordering across both, with each entry's id referencing either a bitlink or a QR code guid.\n", "operationId": "getTopLinksAndQRCodesByEngagements", "tags": ["Bitlinks"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmountOptional"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"$ref": "#/components/parameters/SortedSize"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TopLinksAndQRCodes"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/bitlinks/{sort}": {"get": {"summary": "Retrieve Sorted Bitlinks for Group", "description": "Returns a list of Bitlinks sorted by group. The list of custom bitlinks has newest entries first.", "operationId": "getSortedBitlinks", "tags": ["Bitlinks"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/Sort"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmountOptional"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"$ref": "#/components/parameters/SortedSize"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SortedLinks"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/preferences": {"get": {"summary": "Retrieve Group Preferences", "description": "Returns preferences for the specified group.", "operationId": "getGroupPreferences", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupPreferences"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "patch": {"summary": "Update Group Preferences", "description": "Updates preferences for a group.", "operationId": "updateGroupPreferences", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupPreferences"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupPreferences"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/shorten_counts": {"get": {"summary": "Retrieve Group Shorten Counts", "description": "Returns all the shorten counts for a group.", "operationId": "getGroupShortenCounts", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Metrics"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/countries": {"get": {"summary": "Get Click Metrics for a Group by Country", "description": "Returns the geographic origins of click traffic by country for the specified group.", "operationId": "getGroupMetricsByCountries", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Country, Clicks\nUS, 5\n"}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/cities": {"get": {"summary": "Get Click Metrics for a Group by City", "description": "Returns the geographic origins of click traffic by city for the specified group.", "operationId": "getGroupMetricsByCities", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CityMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "City, Subregion, Region, Country, Clicks\nNew York, , NY, US, 5\n"}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/devices": {"get": {"summary": "Get Click Metrics for a Group by Device Type", "description": "Returns the device types generating click traffic to the specified group's links.", "operationId": "getGroupMetricsByDevices", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Device Type, Clicks\nDesktop, 5\n"}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/referring_networks": {"get": {"summary": "Get Click Metrics for a Group by Referring Networks", "description": "Returns metrics by referring networks for the specified group's links.", "operationId": "GetGroupMetricsByReferringNetworks", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/referrers": {"get": {"summary": "Get Click Metrics for a Group by Referrer", "description": "Returns metrics by referrer for the specified group's links.", "operationId": "GetGroupMetricsByReferrer", "tags": ["Groups"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Referrer,Clicks\ndirect,25\n"}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/engagements/top": {"get": {"operationId": "getGroupTopMetrics", "tags": ["Groups"], "description": "Get top performing links by engagement for all links in a group.", "summary": "Get Group Top Performing Links by Engagement", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SortedLinks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/engagements/over_time": {"get": {"operationId": "getGroupMetricsOverTime", "tags": ["Groups"], "description": "Get group engagement metrics over time for all links in a group.", "summary": "Get Group Metrics Over Time", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupClicks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/clicks": {"get": {"operationId": "getGroupClicks", "tags": ["Groups"], "description": "get number of clicks on bitlinks in a group", "summary": "Get clicks by group", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupClicks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/exports": {"post": {"operationId": "postCreateGroupExport", "tags": ["Groups"], "description": "Build a CSV export synchronously and return it inline as a base64 data URI plus metadata.\nThe export_type field selects the CSV shape: link_engagements_batch (engagement metrics for\nexplicit bitlinks or a filter), links_list (link metadata roster), or qr_codes_list (QR code\nmetadata roster). Row caps apply per request: 200 rows when metrics are included\n(link_engagements_batch, or include_metrics on a list export); 1000 rows for metadata-only\nlist exports. When the match set exceeds the cap, truncated is true and only the first\ncap rows are returned; row_count reports how many data rows are in the CSV.\n", "summary": "Create an inline CSV export for a group", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupExportRequestBody"}}}}, "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupExportResponse"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/organizations": {"get": {"summary": "Retrieve Organizations", "description": "Retrieve a list of organizations for the authenticated user. By default, only organizations permitted by the token's allowed_orgs are returned. Use include_all=true to return all organizations regardless of token restrictions. Each organization is annotated with its authentication requirements (require_sso, require_2fa) when configured.\n", "tags": ["Organizations"], "operationId": "getOrganizations", "parameters": [{"name": "include_all", "in": "query", "required": false, "description": "When set to true, returns all of the user's organizations regardless of the token's allowed_orgs restrictions.\n", "schema": {"type": "boolean"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Organizations"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/organizations/{organization_guid}": {"get": {"summary": "Retrieve an Organization", "description": "Retrive details for the specified organization.", "tags": ["Organizations"], "operationId": "getOrganization", "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Organization"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/organizations/{organization_guid}/shorten_counts": {"get": {"description": "Returns the shorten counts for a specific organization over a specified time period.", "summary": "Get Shorten Counts for an Organization", "operationId": "getOrganizationShortenCounts", "tags": ["Organizations"], "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Metrics"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/organizations/{organization_guid}/shorten_counts_by_group": {"get": {"description": "Returns the shorten counts for a specific organization by group for the current month.", "summary": "Get Shorten Counts for an Organization by Group", "operationId": "getOrganizationShortenCountsByGroup", "tags": ["Organizations"], "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Metrics"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/custom_domains/{custom_domain}": {"get": {"description": "Get one custom domain, with its verification state, group assignments, and SSL status. Any member of a group the domain is assigned to can call it, and so can an administrator of the organization that holds it, which is the only way to read a domain that still waits on DNS verification.", "summary": "Get a custom domain", "operationId": "getCustomDomain", "tags": ["BSDs"], "parameters": [{"$ref": "#/components/parameters/CustomDomain"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomDomainBody"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "TOO_MANY_REQUESTS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TooManyRequests"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "patch": {"description": "Change the settings of a custom domain. Send only the settings to change. An empty root_redirect or wildcard_redirect clears that redirect. The domain must be verified, because a domain that waits on DNS has no settings yet. Organization admins only.", "summary": "Edit a custom domain", "operationId": "editCustomDomain", "tags": ["BSDs"], "parameters": [{"$ref": "#/components/parameters/CustomDomain"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainUpdate"}}}}, "responses": {"200": {"description": "SUCCESS. The domain with the new settings applied", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomDomainBody"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/custom_domains": {"get": {"description": "Get the custom domains of an organization, each with its verification state and group assignments. Without the organization_guid filter, the response covers every organization where the caller is an admin. Organizations where the caller is not an admin are left out.", "summary": "Get custom domains for an organization", "operationId": "getCustomDomains", "tags": ["BSDs"], "parameters": [{"$ref": "#/components/parameters/OrganizationGUIDFilter"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomDomains"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "TOO_MANY_REQUESTS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TooManyRequests"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "post": {"description": "Add a domain you already own to an organization and queue it for DNS verification. Set prevalidate to true to check the domain without adding it. The caller must be an organization admin. Verification runs asynchronously and takes up to 24 hours, so read GET /custom_domains for the validation_status when your user returns. The request fails when another Bitly account already holds the domain.", "summary": "Add a custom domain you own", "operationId": "validateCustomDomain", "tags": ["BSDs"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainValidateBody"}}}}, "responses": {"200": {"description": "SUCCESS. The domain is already on the organization, so it was queued for another DNS check and nothing was created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainValidate"}}}}, "201": {"description": "CREATED. The domain was added and queued for DNS verification", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainValidate"}}}}, "202": {"description": "ACCEPTED. prevalidate was true, so the domain was checked and nothing was created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainValidate"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "409": {"description": "CONFLICT. Another account holds the domain, or the organization is at its custom domain limit", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/custom_domains/{custom_domain}/dns": {"get": {"summary": "Get the DNS records for a custom domain", "description": "Get the records to create at your registrar, the records that resolve today, and whether they match. A root domain needs the A records. A subdomain needs the CNAME record.", "operationId": "getCustomDomainDNS", "tags": ["Custom Domains"], "parameters": [{"$ref": "#/components/parameters/CustomDomain"}, {"$ref": "#/components/parameters/OrganizationGUIDRequired"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainDNS"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "TOO_MANY_REQUESTS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TooManyRequests"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/user": {"patch": {"summary": "Update a User", "description": "Update fields in the user", "tags": ["User"], "operationId": "updateUser", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserUpdate"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "get": {"summary": "Retrieve a User", "description": "Returns information for the current authenticated user.", "tags": ["User"], "operationId": "getUser", "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/campaigns": {"get": {"summary": "Retrieve Campaigns", "description": "Returns the campaigns for the current authenticated user.", "operationId": "getCampaigns", "tags": ["Campaigns"], "parameters": [{"$ref": "#/components/parameters/GroupGUIDFilter"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaigns"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "502": {"description": "BAD_GATEWAY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadGateway"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "post": {"summary": "Create Campaign", "description": "Creates a new campaign.", "operationId": "createCampaign", "tags": ["Campaigns"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignModify"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/campaigns/{campaign_guid}": {"get": {"summary": "Retrieve a Campaign", "description": "Returns details for a campaign.", "operationId": "getCampaign", "tags": ["Campaigns"], "parameters": [{"$ref": "#/components/parameters/CampaignGUID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "patch": {"summary": "Update Campaign", "description": "Updates a campaign's details.", "operationId": "updateCampaign", "tags": ["Campaigns"], "parameters": [{"$ref": "#/components/parameters/CampaignGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CampaignModify"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Campaign"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/channels": {"get": {"summary": "Retrieve Channels", "description": "Returns the channels available to a user.", "operationId": "getChannels", "tags": ["Campaigns"], "parameters": [{"$ref": "#/components/parameters/GroupGUIDFilter"}, {"$ref": "#/components/parameters/CampaignGUIDFilter"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Channels"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "post": {"summary": "Create Channel", "description": "Creates a new channel.", "operationId": "createChannel", "tags": ["Campaigns"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChannelModify"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Channel"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/channels/{channel_guid}": {"get": {"summary": "Get a Channel", "description": "Returns a channel's details.", "operationId": "getChannel", "tags": ["Campaigns"], "parameters": [{"$ref": "#/components/parameters/ChannelGUID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Channel"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "patch": {"summary": "Update a Channel", "description": "Updates an existing channel.", "operationId": "updateChannel", "tags": ["Campaigns"], "parameters": [{"$ref": "#/components/parameters/ChannelGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChannelModify"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Channel"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/channels/{channel_guid}/bitlinks": {"post": {"summary": "Add Bitlinks to a Channel", "description": "Adds the given bitlinks to a channel without affecting any bitlinks already associated with it, unlike Update a Channel which replaces the channel's entire bitlink membership. All bitlinks in a single request are associated with the same campaign_guid. If the given campaign has not already been associated with this channel, that association is created on first use before the bitlinks are added. The request is all-or-nothing: every bitlink is validated first, and if any are invalid, nothing is added.\n", "operationId": "addChannelBitlinks", "tags": ["Campaigns"], "parameters": [{"$ref": "#/components/parameters/ChannelGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddChannelBitlinksRequest"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddChannelBitlinksResponse"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "409": {"description": "CONFLICT", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/apps/{client_id}": {"get": {"summary": "Retrieve OAuth App", "description": "Retrieve the details for the provided OAuth App client ID", "operationId": "getOAuthApp", "parameters": [{"$ref": "#/components/parameters/ClientID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthApp"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/bsds": {"get": {"summary": "Get the custom domains you can shorten with", "description": "Fetch the names of the custom domains the authenticated user can shorten links with, across every organization and group they belong to. The list holds verified domains only, and any member of a group can call it. For setup and verification state, use GET /custom_domains, which returns each domain with its validation_status and group assignments and requires an organization admin.", "operationId": "getBSDs", "tags": ["BSDs"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BSDsResponse"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "headers": {"X-Ratelimit-Reason": {"schema": {"type": "string"}, "description": "An explanation of the ratelimit received."}}, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/domains": {"get": {"summary": "Search for a domain to register", "description": "Search the domains Bitly can register for an organization. The results hold available domains, and input_domain reports the status of the exact name you searched for. Register one with POST /domains.", "operationId": "searchAvailableDomains", "tags": ["Custom Domains"], "parameters": [{"$ref": "#/components/parameters/DomainSearchQuery"}, {"$ref": "#/components/parameters/DomainSearchLimit"}, {"$ref": "#/components/parameters/OrganizationGUIDFilter"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BSDSearchResults"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "TOO_MANY_REQUESTS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TooManyRequests"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}, "post": {"summary": "Register a domain for an organization", "description": "Register a domain that the organization's plan includes, and configure its DNS. Send the agreement_keys from GET /domains/{domain}/agreements. The caller must be an organization admin. Once the organization reaches the number of domains its plan includes, the request fails with ALREADY_RECEIVED_COMPLIMENTARY_DOMAIN. A domain priced at or above the complimentary limit fails with DOMAIN_NOT_COMPLIMENTARY. A blocked or trademarked name, or a domain over 32 characters, fails with DOMAIN_NOT_ALLOWED. A TLD that GET /domains does not offer fails with INVALID_ARG_DOMAIN. Pick a domain from GET /domains to avoid these errors. DNS verification takes up to 48 hours, so read GET /custom_domains for the validation_status when your user returns.", "operationId": "purchaseBsd", "tags": ["BSDs"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PurchaseBSD"}}}}, "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PurchaseBSDResponse"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "409": {"description": "CONFLICT", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Conflict"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}, "504": {"description": "TIMEOUT", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Timeout"}}}}}}}, "/domains/{domain}/agreements": {"get": {"summary": "Get Purchase Agreements", "description": "Get the registrar agreements that a user must accept before Bitly registers a domain. Pass each agreement_key to POST /domains.", "operationId": "fetchDomainAgreements", "tags": ["BSDs"], "parameters": [{"$ref": "#/components/parameters/RegistrableDomain"}, {"$ref": "#/components/parameters/OrganizationGUIDFilter"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainAgreements"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "TOO_MANY_REQUESTS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TooManyRequests"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "504": {"description": "TIMEOUT", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Timeout"}}}}}}}, "/organizations/{organization_guid}/webhooks": {"get": {"summary": "Get Webhooks", "description": "Fetch all webhooks available for an Organization", "operationId": "getWebhooks", "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}], "tags": ["Webhooks"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhooks"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/webhooks": {"post": {"summary": "Create Webhook", "description": "Creates a webhook.", "operationId": "createWebhook", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookCreate"}}}}, "tags": ["Webhooks"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/webhooks/{webhook_guid}": {"get": {"summary": "Retrieve Webhook", "description": "Returns a webhook.", "operationId": "getWebhook", "parameters": [{"$ref": "#/components/parameters/WebhookGUID"}], "tags": ["Webhooks"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "patch": {"summary": "Update Webhook", "description": "Update a webhook", "operationId": "updateWebhook", "parameters": [{"$ref": "#/components/parameters/WebhookGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookUpdate"}}}}, "tags": ["Webhooks"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "delete": {"summary": "Delete Webhook", "description": "Deletes a webhook.", "operationId": "deleteWebhook", "parameters": [{"$ref": "#/components/parameters/WebhookGUID"}], "tags": ["Webhooks"], "responses": {"204": {"description": "SUCCESS"}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/webhooks/{webhook_guid}/verify": {"post": {"summary": "Verify Webhook", "description": "Sends ping event to test webhook configuration.", "operationId": "verifyWebhook", "parameters": [{"$ref": "#/components/parameters/WebhookGUID"}], "tags": ["Webhooks"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Webhook"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/organizations/{organization_guid}/plan_limits": {"get": {"summary": "Get Plan Limits", "description": "Returns all plan limits and counts available for an organization.", "operationId": "getPlanLimits", "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}], "tags": ["Organizations"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlanLimits"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/user/platform_limits": {"get": {"summary": "Get Platform Limits", "description": "Fetch all platform limits and counts available for an organization", "operationId": "getPlatformLimits", "parameters": [{"$ref": "#/components/parameters/Path"}], "tags": ["User"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlatformLimits"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/organizations/{organization_guid}/bulk_uploads": {"post": {"summary": "Create a bulk upload", "description": "Creates a bulk upload in a group of the organization and returns a signed URL and headers for the file upload.\n\nTo complete a bulk upload:\n1. Call this endpoint with the `group_guid` for the new links. Set `domain` to a custom domain of the group. Set `upload_type` to the item that each row creates: `link` for a link, `qr_code` for a QR code, or `coupled_link` for a link and its QR code. For `qr_code` and `coupled_link`, also set `template_id`.\n2. Send the file in a `PUT` request to `upload_url`. Include every header in `headers` without changes, including `Content-Type`. The upload fails if any header is different. The file can be up to 25,000,000 bytes (25 MB), and a larger file gets `400 EntityTooLarge`. The URL is valid until `upload_url_expires_at`.\n\nProcessing is asynchronous. When it is complete, Bitly emails a report to the user's verified primary email address and to the organization admins. The report shows the result and the short link for each row. The request returns `400 INVALID_EMAIL` if the user has no verified primary email address.\n\nFile format: the first row must contain the column headers. Each other row describes one item to create. `Long URL` is the only required column. The optional columns are `Title`, `Tags` (comma-separated if more than one), `Backhalf`, `Expiration` (for example `2030-01-31T15:04:05+0000`), `UTM Source`, `UTM Medium`, `UTM Campaign`, `UTM Term`, `UTM Content`, and `Current Bitly Short Link`. A row with `Current Bitly Short Link` changes the destination of that existing link and does not create a new link. A `qr_code` upload ignores the `Backhalf`, `Tags`, and `Current Bitly Short Link` columns. The maximum number of rows in one file depends on the plan. For examples, see [How do I shorten links in bulk?](https://support.bitly.com/hc/en-us/articles/360056277331) and [How do I create QR Codes in bulk?](https://support.bitly.com/hc/en-us/articles/25227111392397-How-do-I-create-QR-Codes-in-bulk).\n", "operationId": "createOrganizationBulkUpload", "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BulkUploadCreate"}}}}, "tags": ["Bulk Upload"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationBulkUpload"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "get": {"summary": "Retrieve bulk uploads", "description": "Returns the organization's bulk uploads from all of its groups, newest first. Every member of the organization can see them. A bulk upload appears in the list when processing starts. Use `GET /organizations/{organization_guid}/bulk_uploads/{bulk_upload_id}` to check an upload before that.", "operationId": "getOrganizationBulkUploads", "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}, {"name": "upload_type", "in": "query", "schema": {"type": "string", "enum": ["link", "qr_code", "coupled_link"]}}, {"name": "size", "in": "query", "description": "The quantity of items to be returned", "schema": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}}, {"$ref": "#/components/parameters/SearchAfter"}], "tags": ["Bulk Upload"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationBulkUploads"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/organizations/{organization_guid}/bulk_uploads/{bulk_upload_id}": {"get": {"summary": "Retrieve a bulk upload", "description": "Returns the status of one bulk upload. The status is `pending` after the file is uploaded and before processing starts, then `in_progress`, and then `success`, `partial_success`, or `failure`. When processing is complete, `report_url` links to the report. Every member of the organization can see the bulk uploads of all its groups. A bulk upload whose file was not uploaded returns 404.\n", "operationId": "getOrganizationBulkUpload", "parameters": [{"$ref": "#/components/parameters/OrganizationGUID"}, {"name": "bulk_upload_id", "in": "path", "required": true, "description": "The `id` returned when the bulk upload was created.", "schema": {"type": "string"}}], "tags": ["Bulk Upload"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationBulkUpload"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites": {"post": {"summary": "Creates a New Bitly Site for a Group", "description": "Creates an empty Bitly Site for a group using default appearance settings", "operationId": "createSite", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateLaunchpad"}, "example": {"group_guid": "Ba1bc23dE4F", "domain": "bit.ly", "keyword": "mysite", "uri": "bit.ly/m/mysite"}}}}, "tags": ["Bitly Sites"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySite"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/site_templates": {"get": {"summary": "Retrieve's Bitly templates", "description": "Retrieves all templates optionally sorted by a Site's onboarding category", "operationId": "getTemplates", "parameters": [{"$ref": "#/components/parameters/TemplateCategory"}], "tags": ["Bitly Sites"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Template"}}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/sites/{site_id}/template": {"post": {"summary": "Apply a template to a site", "description": "Applies a template's appearance and optionally sample content to a Bitly Site", "operationId": "applyTemplate", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "requestBody": {"required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApplyTemplateRequest"}, "example": {"template_guid": "T1234567890"}}}}, "tags": ["Bitly Sites"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySite"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}": {"patch": {"summary": "Updates an existing Bitly Site", "description": "Updates a Bitly Site's URI, display name, description and attached QR code. Changing the URI also creates a redirect from the previous URI.", "operationId": "updateSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSite"}, "example": {"uri": "bit.ly/m/bitlySocial", "display_name": "Bitly Social", "description": "All of our social links in one place", "qr_code_id": "Qabc123"}}}}, "tags": ["Bitly Sites"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySite"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}, "get": {"summary": "Retrieve All Data Necessary To Render a Bitly Site", "description": "Retrieves a Bitly Site by ID", "operationId": "getSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"name": "include_blocks", "in": "query", "required": false, "description": "When true, the response includes a blocks array holding the site's draft content blocks, ordered by container and then by sort order within that container. Blocks nested inside a grid or carousel carry that container's ID in container_id. The array is omitted entirely when this parameter is not set, and is an empty array when the site has no blocks.\n", "schema": {"type": "boolean"}}], "tags": ["Bitly Sites"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySiteWithBlocks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "delete": {"summary": "Deletes an existing Site", "description": "Deletes an existing Site", "operationId": "deleteSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "tags": ["Bitly Sites"], "responses": {"204": {"description": "NO_CONTENT"}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/appearance": {"put": {"summary": "Update the appearance of a Bitly Site", "description": "Updates the appearance of a Bitly Site", "operationId": "updateSiteAppearance", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySiteAppearance"}, "example": {"theme_id": 1, "layout": "default", "font": "Inter", "hide_bitly_logo": false, "style_preference": "theme", "background_color": "#ffffff", "bottom_background_color": "#f5f5f5", "text_color": "#000000", "description_color": "#333333", "default_button_background_color": "#000000", "default_button_text_color": "#ffffff", "default_button_shape": "rounded"}}}}, "parameters": [{"$ref": "#/components/parameters/SiteID"}], "tags": ["Bitly Sites"], "responses": {"204": {"description": "SUCCESS"}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/publish": {"post": {"summary": "Publishes a Draft Site to become Production Site", "description": "Replaces a production Site with its draft Site if changes are made", "operationId": "publishSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "tags": ["Bitly Sites"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySite"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/clone": {"post": {"summary": "Clone a Bitly Site from an existing one", "description": "Creates a new Bitly site by cloning content and appearance from an existing site", "operationId": "cloneSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteCloneRequest"}, "example": {"uri": "bit.ly/m/mysite-copy"}}}}, "tags": ["Bitly Sites"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySite"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/draft": {"delete": {"summary": "Discard a Site Draft", "description": "Discards a given site's in-progress draft", "operationId": "discardSiteDraft", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "tags": ["Bitly Sites"], "responses": {"204": {"description": "SUCCESS"}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/groups/{group_guid}/sites": {"get": {"summary": "Get Bitly Sites for Group", "description": "Gets all active Bitly Sites owned by the provided Group GUID", "operationId": "getSitesForGroup", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/SearchAfter"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/SitesURLParam"}], "tags": ["Bitly Sites"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlySites"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/sites/{site_id}/redirects/{domain}/{keyword}": {"delete": {"summary": "Delete a redirect for a site", "description": "Deletes a redirect for a site", "operationId": "deleteSiteRedirect", "tags": ["Bitly Sites"], "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"in": "path", "name": "domain", "description": "The custom domain the redirect is configured on", "schema": {"type": "string"}, "required": true, "example": "es.pn"}, {"in": "path", "name": "keyword", "description": "The keyword (back-half) of the redirect to delete", "schema": {"type": "string"}, "required": true, "example": "promo"}], "responses": {"204": {"description": "SUCCESS"}}}}, "/sites/{site_id}/containers": {"post": {"summary": "Creates a container", "description": "Creates a container which contains a set of other content", "operationId": "createContainer", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteBlockContainerRequest"}, "examples": {"Grid": {"value": {"type": "grid"}}, "Carousel": {"value": {"type": "carousel"}}}}}}, "tags": ["Bitly Sites"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteBlock"}, "example": {"site_id": "M0000guid01", "block_id": "L0000guid01", "type": "grid", "content": {}, "sort_order": 1, "is_active": true, "is_pinned": false, "container_id": "root"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/blocks": {"post": {"summary": "Create a block on the provided Site ID", "description": "Creates a block of the given type on the provided Site ID (excluding grid and carousel; see Creates a container to create those)", "operationId": "createSiteBlock", "parameters": [{"$ref": "#/components/parameters/SiteID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteBlockCreateRequest"}, "examples": {"Bitlink": {"value": {"type": "bitlink", "content": {"bitlink_id": "bit.ly/GzmMT6", "link_title": "Short links, big results", "description": "my description"}, "is_active": true}}, "TextBlock": {"value": {"type": "text_block", "content": {"text": "Hello, world!"}, "appearance": {"background_color": "#fcba03", "text_color": "#e30b2c", "alignment": "center", "font_size": "medium"}, "is_active": true}}, "Social": {"value": {"type": "social", "content": {"url": "facebook.com/profile", "channel": "facebook"}, "is_active": true}}, "YouTube": {"value": {"type": "youtubeVideo", "content": {"video_url": "https://www.youtube.com/embed/dQw4w9WgXcQ", "thumbnail_url": "https://i.ytimg.com", "link_title": "My Video"}, "is_active": true}}, "Image": {"value": {"type": "image", "content": {"image_guid": "Ia1bcd234eF", "image_url": "https://example.com/image.png", "aspect_ratio": "1:1", "link_title": "My Image"}, "is_active": true}}}}}}, "tags": ["Bitly Sites"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteBlock"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/blocks/{block_id}": {"patch": {"summary": "Update a block on the provided Site ID", "description": "Updates a block on the provided Site ID. The block type is derived from the stored block and cannot be changed.", "operationId": "updateSiteBlock", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/BlockID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteBlockRequest"}, "example": {"content": {"text": "Updated text content"}, "appearance": {"alignment": "center", "font_size": "large"}, "is_active": true, "is_pinned": true}}}}, "tags": ["Bitly Sites"], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteBlock"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}, "delete": {"summary": "Delete Site Block", "description": "Deletes a block of any type from a given site - does not deactivate. Does not delete the link tied to the block. Deleting a container block (grid or carousel) also deletes the blocks it contains.", "operationId": "deleteSiteBlock", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/BlockID"}], "tags": ["Bitly Sites"], "responses": {"204": {"description": "NO_CONTENT"}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{launchpad_id}/buttons/youtubeVideo/prevalidate": {"post": {"summary": "Prevalidate a youtube video button", "description": "constructs the content blob required to create a YouTube video button", "operationId": "prevalidateYouTubeVideoButton", "parameters": [{"$ref": "#/components/parameters/LaunchpadGUID"}], "tags": ["Bitly Sites"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PrevalidateYouTubeVideoRequest"}, "example": {"video_id": "dQw4w9WgXcQ"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/YoutubeVideoRequest"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/sites/{site_id}/images": {"post": {"summary": "Create a microsite image for a site", "description": "Takes a previously uploaded image and attaches it to a site", "operationId": "createSiteImage", "tags": ["Bitly Sites"], "parameters": [{"$ref": "#/components/parameters/SiteID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteImageUpload"}, "example": {"image_guid": "Ia1bcd234eF", "url": "https://example.com/image.png", "image_use": "profile", "crop": "{\"Min\": {\"X\": 0, \"Y\": 0}, \"Max\": {\"X\": 1, \"Y\": 1}}"}}}}, "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ImageUploadResponse"}}}}}}}, "/aggregate/sites/overview": {"get": {"operationId": "getAggregateSitesOverview", "tags": ["Bitly Sites"], "description": "Returns total button clicks and page views for the requested Sites.", "summary": "Get Overview Metrics for Sites", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"type": "object", "properties": {"views": {"type": "number"}, "clicks": {"type": "number"}, "info": {"type": "string"}}}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/views/over_time": {"get": {"operationId": "getAggregateSiteViewsOverTime", "tags": ["Bitly Sites"], "description": "Returns view counts over time for the requested Sites, grouped by the provided time unit.", "summary": "Get Site Views Over Time", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/views/cities": {"get": {"operationId": "getAggregateSiteViewsByCity", "tags": ["Bitly Sites"], "description": "Returns the city origins of view traffic for the requested Sites.", "summary": "Get Site Views by City", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinksByCitiesFacet"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/views/countries": {"get": {"operationId": "getAggregateSiteViewsByCountry", "tags": ["Bitly Sites"], "description": "Returns the country origins of view traffic for the requested Sites.", "summary": "Get Site Views by Country", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinksByFacet"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/views/devices": {"get": {"operationId": "getAggregateSiteViewsByDevice", "tags": ["Bitly Sites"], "description": "Returns the device types generating view traffic for the requested Sites.", "summary": "Get Site Views by Device", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinksByFacet"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/views/referrers": {"get": {"operationId": "getAggregateSiteViewsByReferrer", "tags": ["Bitly Sites"], "description": "Returns referrer view counts for the requested Sites.", "summary": "Get Site Views by Referrer", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinksByFacet"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/clicks/over_time": {"get": {"operationId": "getSiteClicksOverTime", "tags": ["Bitly Sites"], "description": "Returns button click counts over time for the requested Sites, grouped by the provided time unit.", "summary": "Get Site Button Clicks Over Time", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/clicks/cities": {"get": {"operationId": "getSiteClicksByCities", "tags": ["Bitly Sites"], "description": "Returns the city origins of button click traffic for the requested Sites.", "summary": "Get Site Button Clicks by City", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinksByCitiesFacet"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/clicks/countries": {"get": {"operationId": "getSiteClicksByCountries", "tags": ["Bitly Sites"], "description": "Returns the country origins of button click traffic for the requested Sites.", "summary": "Get Site Button Clicks by Country", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinksByFacet"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/clicks/devices": {"get": {"operationId": "getSiteClicksByDevices", "tags": ["Bitly Sites"], "description": "Returns the device types generating button click traffic for the requested Sites.", "summary": "Get Site Button Clicks by Device", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinksByFacet"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/clicks/top": {"get": {"operationId": "getSiteFilteredTopPageButtons", "tags": ["Bitly Sites"], "description": "Returns the top performing buttons by click count for the requested Sites.", "summary": "Get Top Performing Site Buttons by Clicks", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "brand_guid", "schema": {"type": "string"}}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SortedButtons"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/countries": {"get": {"summary": "Get Metrics for a Site by Country", "description": "Returns the country origins of view traffic for the specified Site.", "tags": ["Bitly Sites"], "operationId": "getMetricsForSitesByCountries", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteViewMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/cities": {"get": {"summary": "Get Metrics for a Site by City", "description": "Returns the city origins of view traffic for the specified Site.", "tags": ["Bitly Sites"], "operationId": "getMetricsForSiteByCities", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteCityViewMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/devices": {"get": {"summary": "Get Metrics for a Site by Device Type", "description": "Returns the device types generating view traffic to the specified site.", "tags": ["Bitly Sites"], "operationId": "getMetricsForSiteByDevices", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteViewMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/referrers": {"get": {"summary": "Get Metrics for a Site by Referrers", "description": "Returns referrer view counts for the specified site.", "tags": ["Bitly Sites"], "operationId": "getMetricsForSiteByReferrers", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteViewMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/aggregate/sites/digital_business_card_downloads/over_time": {"get": {"operationId": "getLaunchpadDigitalBusinessCardDownloadsOverTime", "tags": ["Bitly Sites"], "description": "Returns digital business card download counts over time for the requested Sites, grouped by the provided time unit.", "summary": "Get Site Digital Business Card Downloads Over Time", "parameters": [{"$ref": "#/components/parameters/SitesForMetrics"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"in": "query", "name": "report_guid", "schema": {"type": "string"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AggregateClicksForBitlinks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/link_performance": {"get": {"summary": "Get Link Performance counts for a Site", "description": "Returns the click counts for all active and inactive links that were associated with a site", "tags": ["Bitly Sites"], "operationId": "getLinkPerformanceForSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"$ref": "#/components/parameters/Page"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteLinkPerformance"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/views": {"get": {"summary": "Get Views for a Site", "description": "Returns the view counts for the specified link in an array based on a date.", "tags": ["Bitly Sites"], "operationId": "getViewsForSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteViewMetrics"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/sites/{site_id}/views/summary": {"get": {"summary": "Get a Views Summary for a Site", "description": "Returns the view counts for the specified site rolled up into a single field.", "tags": ["Bitly Sites"], "operationId": "getViewsSummaryForSite", "parameters": [{"$ref": "#/components/parameters/SiteID"}, {"$ref": "#/components/parameters/TimeUnitOptional"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SiteViewsSummary"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes": {"post": {"summary": "Create a QR Code", "description": "Create a new QR Code and return its metadata", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublicCreateQRCodeRequest"}, "examples": {"Minimal": {"value": {"title": "Minimal QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "tags": ["tag1", "tag2"]}}, "Link in Bio": {"value": {"title": "Link-in-Bio QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"site_id": "Mabc123"}}}, "Complex": {"value": {"title": "Complex QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "archived": false, "render_customizations": {"background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded", "corners": {"corner_1": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "concave"}, "corner_2": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_3": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "target"}}, "logo": {"image_guid": "bitlylogo"}, "frame": {"id": "text_top_and_bottom", "colors": {"primary": "#F55656", "background": "#FFFFFF"}, "text": {"primary": {"content": "QR Frame"}, "secondary": {"content": "Frame Text"}}}, "branding": {"bitly_brand": true}}}}, "Gradients": {"value": {"title": "Gradient QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "archived": false, "render_customizations": {"dot_pattern_type": "rounded", "corners": {"corner_1": {"shape": "leaf"}, "corner_2": {"shape": "leaf"}, "corner_3": {"shape": "leaf"}}, "gradient": {"style": "linear", "angle": 45, "colors": [{"color": "#C80404", "offset": 10}, {"color": "#042F86", "offset": 90}], "exclude_corners": false}, "background_gradient": {"style": "radial", "colors": [{"color": "#C696EE", "offset": 25}, {"color": "#D4E1A8", "offset": 50}]}}}}, "Framed": {"value": {"title": "Framed QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "archived": false, "render_customizations": {"frame": {"id": "arrow", "colors": {"primary": "#F55656", "background": "#FFFFFF"}, "text": {"primary": {"content": "Scan Here"}}}, "background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded", "corners": {"corner_1": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "concave"}, "corner_2": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_3": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "target"}}, "logo": {"image_guid": "bitlylogo"}}}}, "Lowest Error Correction": {"value": {"title": "Lowest Error Correction QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "render_customizations": {"spec_settings": {"error_correction": 1}}}}, "GS1": {"value": {"title": "GS1 QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "gs1": {"values": [{"key": "01", "value": "12345670"}]}}}, "With Expiration": {"value": {"group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "expiration_at": "2025-07-28T14:30:00+0000"}}, "Stand Alone QR Code": {"value": {"title": "Stand Alone QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"long_url": "https://example.com/page"}}}}}}}, "operationId": "createQRCodePublic", "tags": ["QR Codes"], "responses": {"201": {"description": "CREATED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QRCodeMinimal"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/qr-codes/static": {"post": {"summary": "Generate a static QR Code image", "description": "Generate a static QR code image without creating or saving a QR code resource. SVG and PNG output are supported via the Accept header\nContact your Account Manager to discuss enabling this feature for your account.\n\nThe `render_customizations` field supports basic appearance options. Customizations that require the rasterize API are not supported: `gradient`, `background_gradient`, `frame`, `text`, and `logo`.\n\nThe Accept header controls the response format:\n- `application/json` (default): Returns a JSON object with the image as a base64-encoded byte string.\n- `image/svg+xml`: Returns the raw SVG image.\n- `image/png`: Returns the raw PNG image.\n", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublicCreateStaticQRCodeRequest"}, "examples": {"Minimal": {"value": {"content": "https://bitly.com", "group_guid": "Ba1bc23dE4F"}}, "With Customizations": {"value": {"content": "https://bitly.com", "group_guid": "Ba1bc23dE4F", "render_customizations": {"background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded", "corners": {"corner_1": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_2": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_3": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}}}}}}}}}, "operationId": "createStaticQRCodePublic", "tags": ["QR Codes"], "parameters": [{"in": "header", "name": "Accept", "description": "Controls the response format. Use `application/json` (default) to receive a JSON-wrapped base64 image, `image/svg+xml` to receive the raw SVG, or `image/png` to receive the raw PNG.", "schema": {"type": "string", "enum": ["application/json", "image/svg+xml", "image/png"]}, "required": false, "example": "image/svg+xml"}, {"in": "query", "name": "format", "description": "The image format. Supports `svg` and `png`. Ignored if the Accept header specifies an image type.", "schema": {"type": "string", "enum": ["svg", "png"], "default": "svg"}, "required": false}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublicStaticQRCodeResponse"}}, "image/svg+xml": {"schema": {"type": "string"}, "example": "<svg>QR code svg</svg>"}, "image/png": {"schema": {"type": "string", "format": "binary"}, "example": "...png bytes..."}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "406": {"description": "NOT_ACCEPTABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/qr-codes/{qrcode_id}/image": {"get": {"summary": "Retrieve a QR Code image", "description": "Get the image of a given QR Code. The Accept header controls how this is returned (options are \"application/json\", \"image/svg+xml\", and \"image/png\").\nIf the Accept header is \"application/json\" the format query parameter will determine the image format inside of the json (which will be base64 encoded and prefixed with its mime type as would be suitable for a HTML image src tag).\nTo Return the QR Code image itself, set the Accept header to \"image/svg+xml\" or \"image/png\", or remove the Accept header and set the format query parameter to \u201csvg\u201d or \u201cpng\u201d (if no format is specified the default will be \u201csvg\u201d).\n", "operationId": "getQRCodeImagePublic", "tags": ["QR Codes"], "parameters": [{"in": "header", "name": "Accept", "description": "The file format for the QR code's image. If the accept header is application/json the image data will be wrapped in a json object, base64 encoded and prefixed with its mime type as would be suitable for a HTML image src tag.", "schema": {"type": "string"}, "required": false, "example": "image/svg+xml"}, {"$ref": "#/components/parameters/QRCodeID"}, {"in": "query", "name": "format", "description": "The format type of the image. If there is an image format in the header it takes precedence.", "schema": {"type": "string", "enum": ["svg", "png"], "default": "svg", "example": "svg"}, "required": false}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublicQRCodeImageResponse"}}, "image/svg+xml": {"schema": {"type": "string"}, "example": "<svg>QR code svg</svg>"}, "image/png": {"schema": {"type": "string"}, "example": "...png bytes..."}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/qr-codes/{qrcode_id}": {"patch": {"summary": "Update a QR Code", "description": "Updates the QR code with a matching id and returns it.", "operationId": "updateQRCodePublic", "tags": ["QR Codes"], "parameters": [{"in": "path", "name": "qrcode_id", "description": "The QR code ID", "schema": {"type": "string"}, "required": true, "example": "Qabc123"}], "requestBody": {"required": false, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublicUpdateQRCodeRequest"}, "examples": {"Minimal": {"value": {"title": "Minimal QR Code Updated", "tags": ["tag1", "tag2"]}}, "Complex": {"value": {"title": "Complex QR Code Updated", "archived": false, "render_customizations": {"background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded", "corners": {"corner_1": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "concave"}, "corner_2": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_3": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "target"}}, "logo": {"image_guid": "bitlylogo"}, "frame": {"id": "text_top_and_bottom", "colors": {"primary": "#F55656", "background": "#FFFFFF"}, "text": {"primary": {"content": "QR Frame"}, "secondary": {"content": "Frame Text"}}}, "branding": {"bitly_brand": true}}}}, "Gradients": {"value": {"title": "Gradient QR Code Updated", "archived": false, "render_customizations": {"dot_pattern_type": "rounded", "corners": {"corner_1": {"shape": "leaf"}, "corner_2": {"shape": "leaf"}, "corner_3": {"shape": "leaf"}}, "gradient": {"style": "linear", "angle": 45, "colors": [{"color": "#C80404", "offset": 10}, {"color": "#042F86", "offset": 90}], "exclude_corners": false}, "background_gradient": {"style": "radial", "colors": [{"color": "#C696EE", "offset": 25}, {"color": "#D4E1A8", "offset": 50}]}}}}, "Framed": {"value": {"title": "Framed QR Code Updated", "archived": false, "render_customizations": {"frame": {"id": "arrow", "colors": {"primary": "#F55656", "background": "#FFFFFF"}, "text": {"primary": {"content": "Scan Here"}}}, "background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded", "corners": {"corner_1": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "concave"}, "corner_2": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_3": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "target"}}, "logo": {"image_guid": "bitlylogo"}}}}, "Lowest Error Correction": {"value": {"title": "Lowest Error Correction QR Code Updated", "render_customizations": {"spec_settings": {"error_correction": 1}}}}, "With Expiration": {"value": {"expiration_at": "2025-07-28T14:30:00+0000"}}}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QRCodeMinimal"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}, "get": {"summary": "Retrieve a QR Code", "description": "Gets the QR code with a matching id.", "operationId": "getQRCodeByIdPublic", "tags": ["QR Codes"], "parameters": [{"$ref": "#/components/parameters/QRCodeID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QRCodeDetails"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}, "delete": {"summary": "Delete a QR Code", "description": "Delete a QR Code that has not been redirected and is not for a custom link. Also deletes the associated link (if applicable).", "operationId": "deleteQRCode", "tags": ["QR Codes"], "parameters": [{"$ref": "#/components/parameters/QRCodeID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublicDeleteQRCodeResponse"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/groups/{group_guid}/qr-codes": {"get": {"summary": "Retrieve QR Codes by Group", "description": "Retrieves a list of QR codes matching the filter settings. Values are in reverse chronological order.\nThe pagination occurs by calling the next link in the pagination response object.\n", "operationId": "listQRMinimal", "tags": ["QR Codes"], "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/FilterHasRenderCustomizations"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/SearchAfterQR"}, {"$ref": "#/components/parameters/Query"}, {"$ref": "#/components/parameters/HostnamePathQuery"}, {"$ref": "#/components/parameters/CreatedBefore"}, {"$ref": "#/components/parameters/CreatedAfter"}, {"$ref": "#/components/parameters/Archived"}, {"$ref": "#/components/parameters/CreatingLogin"}, {"$ref": "#/components/parameters/FilterQRCodeType"}, {"$ref": "#/components/parameters/FilterIsGS1"}, {"$ref": "#/components/parameters/FilterIsExpired"}, {"$ref": "#/components/parameters/FilterHasExpiration"}, {"$ref": "#/components/parameters/FilterHasDynamicRouting"}, {"$ref": "#/components/parameters/Tags"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QRCodesMinimal"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}, "patch": {"summary": "Bulk update QR codes", "description": "Bulk update can add or remove tags, or archive/un-archive, up to 100 QR codes at a time.\nPages QR codes cannot be updated with this endpoint.\nThe response includes a list of QR code ids that were updated.\n", "tags": ["QR Codes"], "operationId": "updateQRCodesByGroup", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QRCBulkUpdateRequest"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QRCBulkUpdate"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes/{qrcode_id}/scans": {"get": {"summary": "Get Scans for a QR Code", "description": "Returns an array of scan counts for the specified QR code. The array is comprised of scan counts for each time window, where the window is based on the provided unit.", "operationId": "getScanMetricsForQRCode", "tags": ["QR Codes"], "parameters": [{"$ref": "#/components/parameters/QRCodeID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkScans"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes/{qrcode_id}/scans/summary": {"get": {"summary": "Get Scans Summary for a QR Code", "description": "Returns the scan counts for a QR Code rolled up into a single field for a specified time window, where the window is based on the provided unit.", "operationId": "getScanMetricsSummaryForQRCode", "tags": ["QR Codes"], "parameters": [{"$ref": "#/components/parameters/QRCodeID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkScansSummary"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes/{qrcode_id}/scans/countries": {"get": {"summary": "Get Scans for a QR Code by Country", "description": "Returns the country origins of scan traffic for the specified QR Code.", "tags": ["QR Codes"], "operationId": "getScanMetricsForQRCodeByCountries", "parameters": [{"$ref": "#/components/parameters/QRCodeID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScanMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Country, Scans\nUS, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes/{qrcode_id}/scans/cities": {"get": {"summary": "Get Metrics for a QR Code by City", "description": "Returns the city origins of scan traffic for the specified QR Code.", "tags": ["QR Codes"], "operationId": "getScanMetricsForQRCodeByCities", "parameters": [{"$ref": "#/components/parameters/QRCodeID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CityScanMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "City, Subregion, Region, Country, Scans\nNew York, , NY, US, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes/{qrcode_id}/scans/device_os": {"get": {"summary": "Get Scans for a QR Code by Device OS", "description": "Returns the device os generating scan traffic for the specified QR Code.", "tags": ["QR Codes"], "operationId": "getScanMetricsForQRCodeByDevicesOS", "parameters": [{"$ref": "#/components/parameters/QRCodeID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScanMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Device OS, Scans\nApple, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes/{qrcode_id}/scans/browsers": {"get": {"summary": "Get Scans for a QR Code by Browser", "description": "Returns the browsers generating scan traffic to the specified QR Code.", "tags": ["QR Codes"], "operationId": "getScanMetricsForQRCodeByBrowser", "parameters": [{"$ref": "#/components/parameters/QRCodeID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScanMetrics"}}, "text/csv": {"schema": {"type": "string"}, "example": "Browser, Scans\nGoogle Chrome, 5\n"}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/qr-codes/{qrcode_id}/to-bitlink": {"put": {"summary": "Upgrade a QR Code to a bitlink", "description": "Upgrades a stand alone (decoupled) QR Code to a coupled QR Code by associating it with its underlying Bitly short link. This operation consumes one encode from the organization's monthly Link limit. If the QR Code is already coupled, no encode is consumed.", "operationId": "upgradeQRCodeToBitlink", "tags": ["QR Codes"], "parameters": [{"in": "path", "name": "qrcode_id", "schema": {"type": "string"}, "required": true}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BitlinkBody"}, "examples": {"Upgraded QR Code": {"value": {"link": "https://bit.ly/abc123", "id": "bit.ly/abc123", "long_url": "https://example.com/page", "title": "My Stand Alone QR Code", "archived": false, "created_at": "2024-01-15T10:00:00+0000", "created_by": "jane", "custom_bitlinks": [], "tags": [], "qr_code_ids": ["Ab1Cd2Ef3G4"]}}}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/qr-codes/{qrcode_id}/redirect": {"patch": {"summary": "Redirect a QR Code", "description": "Changes the destination URL that a stand alone QR Code redirects to. This only works for stand alone QR Codes; a QR Code already associated with a bitlink must be updated via the Bitlinks API.", "operationId": "redirectQRCodeDestination", "tags": ["QR Codes"], "parameters": [{"in": "path", "name": "qrcode_id", "schema": {"type": "string"}, "required": true}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RedirectQRCodeRequest"}}}}, "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QRCodeMinimal"}, "examples": {"Redirected QR Code": {"value": {"qrcode_id": "Ab1Cd2Ef3G4", "group_guid": "Ba1bc23dE4F", "title": "My Stand Alone QR Code", "is_customized": false, "qr_code_type": "long_url", "long_urls": ["https://example.com/new-page"], "is_gs1": false, "tags": [], "archived": false, "created": "2024-01-15T10:00:00+0000", "updated": "2024-01-16T09:30:00+0000"}}}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "402": {"description": "UPGRADE_REQUIRED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpgradeRequired"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "404": {"description": "NOT_FOUND", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/NotFound"}}}}, "410": {"description": "GONE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Gone"}}}}, "422": {"description": "UNPROCESSABLE_ENTITY", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnprocessableEntity"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/groups/{group_guid}/feature_usage": {"get": {"summary": "Get limit usage for a group", "description": "Get a group's current feature limit usage, optionally provide limit name(s) for usage on specific limit(s)", "operationId": "getGroupFeatureUsage", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/Name"}], "tags": ["Groups"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupFeatureUsage"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/groups/{group_guid}/historical_usage": {"get": {"summary": "Get historical usage for a group", "description": "Get a group's historical usage for specific limit(s) and date range. Refer to GET /v4/groups/{group_guid}/feature_usage endpoint response for available limit names.", "operationId": "getGroupHistoricalUsage", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/Name"}, {"$ref": "#/components/parameters/StartDate"}, {"$ref": "#/components/parameters/EndDate"}, {"$ref": "#/components/parameters/TimeUnitDWM"}], "tags": ["Groups"], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupHistoricalUsage"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/groups/{group_guid}/agentic_traffic/rollup": {"get": {"operationId": "getGroupAgenticTrafficRollup", "tags": ["Groups"], "description": "Get the total agentic traffic (AI agents and assistants) count over the last 90 days for a group.", "summary": "Get Group Agentic Traffic Rollup", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupBitlinksCountRollup"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "429": {"description": "MONTHLY_LIMIT_EXCEEDED", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MonthlyLimitExceeded"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}}}}, "/groups/{group_guid}/links/clicks/over_time": {"get": {"operationId": "getGroupLinkClicksOverTime", "tags": ["Groups"], "description": "Get link clicks over time for all links in a group.", "summary": "Get Group Link Clicks Over Time", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupClicks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/links/clicks/devices": {"get": {"operationId": "getGroupLinkClicksByDevice", "tags": ["Groups"], "description": "Get link clicks by device for all links in a group.", "summary": "Get Group Link Clicks by Device", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"type": "object", "properties": {"unit": {"type": "string", "x-faker": "internet.userName"}, "units": {"type": "integer", "x-faker": {"datatype.number": {"min": 1, "max": 100}}}, "facet": {"type": "string", "enum": ["countries", "cities", "devices", "referrers", "referrers_by_domain", "referring_domains", "referring_networks", "shorten_counts"]}, "unit_reference": {"type": "string", "x-faker": "date.past"}, "metrics": {"type": "array", "items": {"type": "object", "properties": {"clicks": {"type": "integer"}, "value": {"type": "string"}}}}}}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/links/clicks/referrers": {"get": {"operationId": "getGroupLinkClicksByReferrer", "tags": ["Groups"], "description": "Get link clicks by referrer for all links in a group.", "summary": "Get Group Link Clicks by Referrer", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/links/clicks/countries": {"get": {"operationId": "getGroupLinkClicksByCountry", "tags": ["Groups"], "description": "Get link clicks by country for all links in a group.", "summary": "Get Group Link Clicks by Country", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/links/clicks/cities": {"get": {"operationId": "getGroupLinkClicksByCity", "tags": ["Groups"], "description": "Get link clicks by city for all links in a group.", "summary": "Get Group Link Clicks by City", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CityMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/links/clicks/top": {"get": {"operationId": "getGroupTopLinkClicks", "tags": ["Groups"], "description": "Get top performing links by click for all links in a group.", "summary": "Get Group Top Performing Links by Click", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/Size"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SortedLinks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/codes/scans/over_time": {"get": {"operationId": "getGroupCodeScansOverTime", "tags": ["Groups"], "description": "Get QR code scan metrics over time for a group.", "summary": "Get Scan Metrics for a Group Over Time", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupClicks"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/codes/scans/countries": {"get": {"operationId": "getGroupCodeScansByCountry", "tags": ["Groups"], "description": "Get QR code scan metrics for a group broken down by country.", "summary": "Get Scan Metrics for a Group by Country", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClickMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/codes/scans/cities": {"get": {"operationId": "getGroupCodeScansByCity", "tags": ["Groups"], "description": "Get QR code scan metrics for a group broken down by city.", "summary": "Get Scan Metrics for a Group by City", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CityMetrics"}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}, "/groups/{group_guid}/codes/scans/top": {"get": {"operationId": "getGroupTopCodeScans", "tags": ["Groups"], "description": "Get top performing QR codes by scan count for all codes in a group.", "summary": "Get Top Performing QR Codes for a Group", "parameters": [{"$ref": "#/components/parameters/GroupGUID"}, {"$ref": "#/components/parameters/TimeUnit"}, {"$ref": "#/components/parameters/UnitAmount"}, {"$ref": "#/components/parameters/UnitReferenceTimeStamp"}, {"name": "decoupled", "in": "query", "required": false, "description": "When true, ranks results by decoupled QR scan count and returns a TopLinksAndQRCodes response with links and QR codes partitioned into separate lists and a unified sorted_engagements ordering.\n", "schema": {"type": "boolean"}}], "responses": {"200": {"description": "SUCCESS", "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/SortedLinks"}, {"$ref": "#/components/schemas/TopLinksAndQRCodes"}]}}}}, "400": {"description": "BAD_REQUEST", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BadRequest"}}}}, "403": {"description": "FORBIDDEN", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Forbidden"}}}}, "500": {"description": "INTERNAL_ERROR", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InternalError"}}}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemporarilyUnavailable"}}}}}}}}, "components": {"securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer"}}, "parameters": {"OrganizationGUID": {"name": "organization_guid", "description": "A GUID for a Bitly organization", "in": "path", "required": true, "schema": {"type": "string"}, "example": "Oa1bcd234eF"}, "OrganizationGUIDFilter": {"name": "organization_guid", "description": "A GUID for a Bitly organization", "in": "query", "schema": {"type": "string"}, "example": "Oa1bcd234eF"}, "OrganizationGUIDRequired": {"name": "organization_guid", "description": "A GUID for a Bitly organization", "in": "query", "required": true, "schema": {"type": "string"}, "example": "Oa1bcd234eF"}, "QRCodeID": {"name": "qrcode_id", "in": "path", "description": "The QR Code ID", "required": true, "schema": {"type": "string"}, "example": "Qabcde12345"}, "GroupGUID": {"name": "group_guid", "description": "A GUID for a Bitly group", "in": "path", "required": true, "schema": {"type": "string"}, "example": "Ba1bc23dE4F"}, "GroupGUIDFilter": {"name": "group_guid", "description": "A GUID for a Bitly group", "in": "query", "schema": {"type": "string"}, "example": "Ba1bc23dE4F"}, "CampaignGUIDFilter": {"name": "campaign_guid", "description": "A GUID for a Bitly campaign", "in": "query", "schema": {"type": "string"}, "example": "Ca1bcd2EFGh"}, "ChannelGUID": {"name": "channel_guid", "description": "A GUID for a Bitly Channel", "in": "path", "required": true, "schema": {"type": "string"}, "example": "Ha1bc2DefGh"}, "WebhookGUID": {"name": "webhook_guid", "description": "A GUID for a Bitly webhook", "in": "path", "required": true, "schema": {"type": "string"}, "example": "Wa1bcDefG23"}, "SortedSize": {"name": "size", "description": "The quantity of items to be be returned", "in": "query", "schema": {"type": "integer", "default": 50, "maximum": 100}, "example": 10}, "Size": {"name": "size", "description": "The quantity of items to be be returned", "in": "query", "schema": {"type": "integer", "default": 50}, "example": 10}, "Page": {"name": "page", "description": "Integer specifying the numbered result at which to start", "in": "query", "schema": {"type": "integer", "default": 1}, "example": 1}, "CreatedBefore": {"name": "created_before", "description": "Timestamp as an integer unix epoch (seconds only)", "in": "query", "schema": {"type": "integer"}, "example": 1694529902}, "CreatedAfter": {"name": "created_after", "description": "Timestamp as an integer unix epoch (seconds only)", "in": "query", "schema": {"type": "integer"}, "example": 1694529902}, "Archived": {"name": "archived", "description": "Whether or not to include archived resources", "in": "query", "schema": {"type": "string", "default": "off", "enum": ["on", "off", "both"]}, "example": "both"}, "Deeplinks": {"name": "deeplinks", "description": "Filter to only Bitlinks that contain deeplinks", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}, "example": "both"}, "DomainDeeplinks": {"name": "domain_deeplinks", "description": "Filter to only Bitlinks that contain deeplinks configured with a custom domain", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}, "example": "both"}, "FilterCampaignGUID": {"name": "campaign_guid", "description": "Filter to return only links for the given campaign GUID, can be provided", "schema": {"type": "string"}, "in": "query", "example": "Ca1bcd2EFGh"}, "FilterChannelGUID": {"name": "channel_guid", "description": "Filter to return only links for the given channel GUID, can be provided, overrides all other parameters", "schema": {"type": "string"}, "in": "query", "example": "Ha1bc2DefGh"}, "Tags": {"name": "tags", "description": "Filter by given tags", "in": "query", "style": "form", "explode": true, "schema": {"type": "array", "items": {"type": "string"}}, "example": ["bitly", "api"]}, "TagType": {"name": "type", "description": "Tag set to return; defaults to bitlink", "in": "query", "required": false, "schema": {"type": "string", "default": "bitlink", "enum": ["bitlink", "qr_code"]}}, "SitesForMetrics": {"name": "site", "description": "Filter by given Bitly Site guids", "in": "query", "style": "form", "explode": true, "schema": {"type": "array", "items": {"type": "string"}}, "example": ["M0123456789"]}, "LaunchpadIDs": {"name": "launchpad_ids", "description": "Filter by launchpad id", "in": "query", "style": "form", "explode": true, "schema": {"type": "array", "items": {"type": "string"}}, "example": ["M1234567890"]}, "EncodingLogin": {"name": "encoding_login", "description": "Filter by the login of the authenticated user that created the Bitlink", "in": "query", "schema": {"type": "array", "items": {"type": "string"}}, "style": "form", "explode": true, "example": ["chauncey"]}, "SearchAfter": {"name": "search_after", "description": "Token used to search next batch, only use response from API as input value.", "in": "query", "schema": {"type": "string"}}, "SearchAfterQR": {"name": "search_after", "description": "Token used to search next batch of qr codes, only use response from API as input value.", "in": "query", "schema": {"type": "string"}}, "FilterCustomBitlink": {"name": "custom_bitlink", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}, "example": "both"}, "FilterHasRenderCustomizations": {"name": "has_render_customizations", "description": "Whether or not QRCode has any render customizations (like color or shape changes)", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}, "example": "both"}, "FilterIsGS1": {"name": "is_gs1", "description": "a filter value if the resource is a GS1 QR code", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}, "example": "both"}, "FilterHasQRCodes": {"name": "has_qr_codes", "description": "a filter value if the resource has any QR codes", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}, "example": "both"}, "FilterIsExpired": {"name": "is_expired", "description": "filter bitlinks by expiration status", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}}, "FilterHasExpiration": {"name": "has_expiration", "description": "filter bitlinks by presence of expiration", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}}, "FilterHasDynamicRouting": {"name": "has_dynamic_routing", "description": "filter bitlinks by presence of dynamic routing rules", "in": "query", "schema": {"type": "string", "default": "both", "enum": ["on", "off", "both"]}}, "CreatingLogin": {"name": "creating_login", "description": "Filter by the login of the authenticated user that created the QR Code", "in": "query", "schema": {"type": "array", "items": {"type": "string"}}, "style": "form", "explode": true, "example": ["chauncey"]}, "FilterQRCodeType": {"name": "qrc_type", "in": "query", "schema": {"type": "array", "items": {"type": "string", "enum": ["bitlink", "long_url"]}, "example": ["bitlink"], "default": ["bitlink", "long_url"]}}, "Sort": {"name": "sort", "description": "The type of sorting that you would like to do", "in": "path", "required": true, "schema": {"type": "string", "enum": ["clicks"]}, "example": "clicks"}, "TimeUnit": {"name": "unit", "description": "A unit of time", "schema": {"$ref": "#/components/schemas/TimeUnit"}, "required": true, "in": "query", "example": "month"}, "TimeUnitDWM": {"name": "unit", "description": "A unit of time (day, week, or month)", "schema": {"$ref": "#/components/schemas/TimeUnitDWM"}, "in": "query", "example": "month"}, "TimeUnitOptional": {"name": "unit", "description": "A unit of time", "schema": {"$ref": "#/components/schemas/TimeUnit"}, "in": "query", "example": "month"}, "UnitAmount": {"name": "units", "description": "An integer representing the time units to query data for. pass -1 to return all units of time", "schema": {"type": "integer", "default": -1}, "required": true, "in": "query", "example": 1}, "UnitAmountOptional": {"name": "units", "description": "An integer representing the time units to query data for. pass -1 to return all units of time.", "schema": {"type": "integer", "default": -1}, "in": "query", "example": 1}, "UnitReferenceTimeStamp": {"name": "unit_reference", "description": "An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time. Timestamp values should be url encoded (i.e. replace '+' with '%2B' and ':' with '%3A'; 2022-02-02T15:53:02+0000 becomes 2022-02-02T15%3A53%3A02%2B0000)", "schema": {"type": "string"}, "required": false, "in": "query", "example": "2006-01-02T15:04:05-0700"}, "Bitlink": {"name": "bitlink", "description": "A Bitlink made of the domain and hash", "in": "path", "required": true, "schema": {"type": "string"}, "example": "bit.ly/12a4b6c"}, "CustomBitlink": {"name": "custom_bitlink", "description": "A Custom Bitlink made of the domain and keyword", "in": "path", "schema": {"type": "string"}, "required": true, "example": "chauncey.ly/chauncey"}, "CampaignGUID": {"name": "campaign_guid", "description": "A GUID for a Bitly campaign", "in": "path", "required": true, "schema": {"type": "string"}, "example": "Ca1bcd2EFGh"}, "ClientID": {"name": "client_id", "description": "The client ID of an OAuth app", "in": "path", "required": true, "schema": {"type": "string"}, "example": "1234a56b789cd0e123456fg7h8901j123km45n6p"}, "DomainSearchQuery": {"name": "query", "description": "the domain name to search for, in Unicode or punycode, up to 32 bytes. Punycode may be up to 42 bytes when its Unicode form is within 32 bytes.", "in": "query", "required": true, "schema": {"type": "string"}, "example": "acme"}, "DomainSearchLimit": {"name": "limit", "description": "limit the amount of results returned, 25 maximum", "in": "query", "schema": {"type": "integer", "default": 25}, "example": 10}, "Query": {"name": "query", "description": "The value that you would like to search", "in": "query", "schema": {"type": "string"}, "example": "api"}, "HostnamePathQuery": {"name": "hostname_path_query", "description": "The hostname and/or path you would like to search (case-insensitive). Subdomains included; query params and fragment ignored.", "in": "query", "schema": {"type": "string"}, "example": "dev.bitly.com/api-reference"}, "Name": {"name": "name", "description": "The limit name you would like usage for", "in": "query", "schema": {"type": "array", "items": {"type": "string"}}, "style": "form", "explode": true, "example": ["qr_codes"]}, "StartDate": {"name": "start_date", "description": "The start date for the date range", "in": "query", "schema": {"type": "string"}, "example": "2022-02-02"}, "EndDate": {"name": "end_date", "description": "The end date for the date range", "in": "query", "schema": {"type": "string"}, "example": "2023-10-04"}, "RegistrableDomain": {"name": "domain", "description": "a domain, in Unicode or punycode", "in": "path", "required": true, "schema": {"type": "string"}, "example": "bit.ly"}, "CustomDomain": {"name": "custom_domain", "description": "a custom domain on your account, in Unicode or punycode", "in": "path", "required": true, "schema": {"type": "string"}, "example": "chauncey.ly"}, "Path": {"name": "path", "description": "The specific path for which information is requested", "in": "query", "schema": {"type": "string"}, "example": "/organizations/{organization_guid}"}, "LaunchpadGUID": {"name": "launchpad_id", "description": "A GUID for a Bitly Link Launchpad", "in": "path", "required": true, "schema": {"type": "string"}, "example": "Sa1bcd234eF"}, "SiteID": {"name": "site_id", "description": "A GUID for a Bitly Site", "in": "path", "required": true, "schema": {"type": "string"}, "example": "M0000guid01"}, "BlockID": {"name": "block_id", "description": "A GUID for a Bitly Site content block", "in": "path", "required": true, "schema": {"type": "string"}, "example": "La1bcd234eF"}, "TemplateCategory": {"name": "category", "description": "A filter option for template categories", "in": "query", "required": false, "schema": {"type": "string", "enum": ["Link-in-bio", "Products and services", "Promotions", "Digital business card", "Image gallery", "Recommended"]}, "example": "Digital business card"}, "SitesURLParam": {"name": "sites_url_param", "in": "query", "required": false, "schema": {"type": "string"}, "example": "https://example.com"}}, "schemas": {"InstallPreference": {"type": "string", "enum": ["no_install", "auto_install", "promote_install"]}, "FieldError": {"type": "object", "properties": {"field": {"type": "string"}, "error_code": {"type": "string"}, "message": {"type": "string"}}}, "Error": {"type": "object", "properties": {"message": {"type": "string"}, "description": {"type": "string"}, "resource": {"type": "string"}, "errors": {"type": "array", "items": {"$ref": "#/components/schemas/FieldError"}}}}, "SimplifiedError": {"type": "object", "properties": {"message": {"type": "string"}, "description": {"type": "string"}, "resource": {"type": "string"}}}, "BitlinksPagination": {"type": "object", "properties": {"next": {"type": "string"}, "search_after": {"type": "string"}, "size": {"type": "integer"}}}, "MicrositePagination": {"type": "object", "description": "Specifies how to query the next set of results.", "properties": {"next": {"type": "string", "description": "A hyperlink to the next set of results."}, "search_after": {"type": "string", "description": "The identifier of where to begin searching for the next set of results.", "example": "bryhzW:Mo81ihn1syE"}, "size": {"type": "integer", "description": "The number of results returned from this query.", "example": 50}}}, "QRPagination": {"type": "object", "description": "This object specifies how to query the next set of results.", "properties": {"next": {"type": "string", "description": "a hyperlink to the next set of results."}, "search_after": {"type": "string", "description": "the identifier of where to begin searching for the next set of results.", "example": "Qn8sfFRC2tm"}, "size": {"type": "integer", "description": "the number of results returned from this query.", "example": 50}}}, "Group": {"type": "object", "required": ["guid", "organization_guid", "name", "created", "modified", "is_active", "role", "bsds"], "allOf": [{"$ref": "#/components/schemas/HasReferences"}, {"properties": {"name": {"type": "string"}, "guid": {"type": "string"}, "created": {"type": "string"}, "modified": {"type": "string"}, "is_active": {"type": "boolean"}, "role": {"type": "string"}, "organization_guid": {"type": "string"}, "bsds": {"type": "array", "items": {"type": "string"}}}}]}, "Groups": {"type": "object", "required": ["groups"], "properties": {"groups": {"type": "array", "items": {"$ref": "#/components/schemas/Group"}}}}, "GroupUpdate": {"type": "object", "properties": {"name": {"type": "string"}, "organization_guid": {"type": "string"}, "bsds": {"type": "array", "items": {"type": "string"}}}, "example": {"name": "My New Group", "organization_guid": "Oa1bcd234eF", "bsds": ["chauncey.ly"]}}, "Organization": {"type": "object", "required": ["guid", "name", "is_active", "tier", "tier_family", "tier_display_name", "role", "created", "modified", "bsds"], "allOf": [{"$ref": "#/components/schemas/HasReferences"}, {"properties": {"name": {"type": "string"}, "is_active": {"type": "boolean"}, "guid": {"type": "string"}, "tier": {"type": "string"}, "tier_family": {"type": "string"}, "tier_display_name": {"type": "string"}, "role": {"type": "string"}, "created": {"type": "string"}, "modified": {"type": "string"}, "bsds": {"type": "array", "items": {"type": "string"}}, "require_sso": {"type": "string", "description": "SSO authentication requirement for this organization. Possible values: \"none\", \"any\". Omitted when no auth requirements are configured.\n", "enum": ["none", "any"]}, "require_2fa": {"type": "string", "description": "Two-factor authentication requirement for this organization. Possible values: \"none\", \"sms\". Omitted when no auth requirements are configured.\n", "enum": ["none", "sms"]}}}]}, "Organizations": {"type": "object", "required": ["organizations"], "properties": {"organizations": {"type": "array", "items": {"$ref": "#/components/schemas/Organization"}}}}, "User": {"type": "object", "required": ["login", "is_active", "created", "modified", "is_2fa_enabled", "name", "emails", "is_sso_user"], "properties": {"login": {"type": "string"}, "name": {"type": "string"}, "is_active": {"type": "boolean"}, "created": {"type": "string"}, "modified": {"type": "string"}, "is_sso_user": {"type": "boolean"}, "emails": {"type": "array", "items": {"$ref": "#/components/schemas/Email"}}, "is_2fa_enabled": {"type": "boolean"}, "default_group_guid": {"type": "string"}}}, "UserUpdate": {"type": "object", "properties": {"name": {"type": "string"}, "default_group_guid": {"type": "string"}}, "example": {"name": "Chauncey McPufferson", "default_group_guid": "Ba1bc23dE4F"}}, "Email": {"type": "object", "properties": {"email": {"type": "string"}, "is_primary": {"type": "boolean"}, "is_verified": {"type": "boolean"}}}, "CountItem": {"type": "object", "properties": {"ts": {"type": "string"}, "count": {"type": "integer"}}}, "ShortenBitlinkBody": {"type": "object", "allOf": [{"$ref": "#/components/schemas/HasReferences"}, {"properties": {"link": {"type": "string"}, "id": {"type": "string"}, "long_url": {"type": "string"}, "archived": {"type": "boolean"}, "created_at": {"type": "string"}, "custom_bitlinks": {"type": "array", "items": {"type": "string"}, "description": "list of previously edited backhalfs for the bitlink - these are in reverse chronological order, with the most recently edited backhalf first"}, "tags": {"type": "array", "items": {"type": "string"}}, "deeplinks": {"type": "array", "items": {"$ref": "#/components/schemas/DeeplinkRule"}}}}]}, "LinkDeletionResponse": {"type": "object", "properties": {"links_deleted": {"type": "array", "items": {"$ref": "#/components/schemas/DeletedLink"}, "example": [{"id": "bit.ly/12a4b6c"}, {"id": "chauncey.ly/documentation"}]}}}, "DeletedLink": {"type": "object", "properties": {"id": {"type": "string"}}}, "DeletedQRCode": {"type": "object", "properties": {"id": {"type": "string"}}}, "BitlinkBody": {"type": "object", "allOf": [{"$ref": "#/components/schemas/HasReferences"}, {"$ref": "#/components/schemas/BitlinkUpdate"}]}, "BitlinkUpdate": {"type": "object", "properties": {"link": {"type": "string"}, "id": {"type": "string"}, "long_url": {"type": "string"}, "title": {"type": "string"}, "archived": {"type": "boolean"}, "created_at": {"type": "string"}, "created_by": {"type": "string"}, "client_id": {"type": "string"}, "custom_bitlinks": {"type": "array", "items": {"type": "string"}, "description": "list of previously edited backhalfs for the bitlink - these are in reverse chronological order, with the most recently edited backhalf first"}, "tags": {"type": "array", "items": {"type": "string"}}, "launchpad_ids": {"type": "array", "items": {"type": "string"}}, "qr_code_ids": {"type": "array", "items": {"type": "string"}, "description": "a list of qr code ids that are associated with this bitlink"}, "deeplinks": {"type": "array", "items": {"$ref": "#/components/schemas/DeeplinkRule"}}, "is_deleted": {"type": "boolean"}, "campaign_ids": {"type": "array", "items": {"type": "string"}}, "expiration_at": {"type": "string", "description": "Optional expiration timestamp for the bitlink (e.g., 2025-01-28T14:30:00+0000)"}, "dynamic_routing": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}, "description": "Dynamic routing rules for this bitlink. Only present when at least one rule is configured."}}}, "DynamicRoutingRule": {"type": "object", "description": "A dynamic routing rule that redirects traffic to a different destination based on user attributes.", "properties": {"long_url": {"type": "string", "description": "The destination URL for requests matching this rule."}, "country_match": {"type": "array", "items": {"type": "string"}, "description": "ISO 3166-1 alpha-2 country codes that trigger this rule (e.g., [\"US\", \"CA\"])."}, "country_exclude": {"type": "array", "items": {"type": "string"}, "description": "ISO 3166-1 alpha-2 country codes that must NOT match for this rule to apply."}, "region_match": {"type": "array", "items": {"type": "string"}, "description": "ISO 3166-2 region codes that trigger this rule (e.g., [\"US-CA\", \"CA-ON\"])."}, "region_exclude": {"type": "array", "items": {"type": "string"}, "description": "ISO 3166-2 region codes that must NOT match for this rule to apply (e.g., [\"US-CA\", \"CA-ON\"])."}, "device_match": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingDeviceEnum"}, "description": "Device types that trigger this rule (e.g., [\"mobile\", \"tablet\"])."}, "device_exclude": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingDeviceEnum"}, "description": "Device types that must NOT match for this rule to apply."}, "os_match": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingPlatformEnum"}, "description": "Operating systems that trigger this rule (e.g., [\"ios\", \"android\"])."}, "os_exclude": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingPlatformEnum"}, "description": "Operating systems that must NOT match for this rule to apply."}}}, "BitlinkUpdateBody": {"type": "object", "properties": {"title": {"type": "string"}, "archived": {"type": "boolean"}, "tags": {"type": "array", "items": {"type": "string"}}, "deeplinks": {"type": "array", "items": {"$ref": "#/components/schemas/DeeplinkRule"}}, "long_url": {"type": "string"}, "expiration_at": {"type": "string", "description": "Optional expiration timestamp for the bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year."}, "dynamic_routing": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}, "description": "Dynamic routing rules for this bitlink. Providing this field replaces all existing rules. Send an empty array to clear all rules."}}, "example": {"title": "Bitly API Documentation", "archived": false, "tags": ["bitly", "api"], "deeplinks": [{"guid": "Ra1bcD2eF3h", "bitlink": "bit.ly/documentation", "app_uri_path": "/store?id=123456", "install_url": "https://play.google.com/store/apps/details?id=com.bitly.app&hl=en_US", "app_guid": "Ab1cdE2fG3h", "os": "android", "install_type": "promote_install", "brand_guid": "Ba1bc23dE4F"}]}}, "Bitlinks": {"type": "object", "properties": {"links": {"type": "array", "items": {"$ref": "#/components/schemas/BitlinkBody"}}, "pagination": {"$ref": "#/components/schemas/BitlinksPagination"}}}, "ExpandBitlink": {"type": "object", "properties": {"bitlink_id": {"type": "string"}}, "example": {"bitlink_id": "bit.ly/12a4b6c"}}, "ExpandedBitlink": {"type": "object", "properties": {"link": {"type": "string"}, "id": {"type": "string"}, "long_url": {"type": "string"}, "long_urls": {"type": "array", "description": "The list of destination URLs for this bitlink, including the default long URL and any dynamically routed destination URLs.\n", "items": {"type": "string"}}, "created_at": {"type": "string"}}}, "ClickLink": {"type": "object", "properties": {"clicks": {"type": "integer"}, "id": {"type": "string"}}}, "EngagementSubtotal": {"description": "Engagement-count subtotal for a single bitlink or decoupled QR code. The `id` references either a bitlink (`<domain>/<hash>`) or a QR code guid, and `engagements` is the combined count of bitlink clicks or QR code scans for that entity.\n", "type": "object", "properties": {"engagements": {"type": "integer"}, "id": {"type": "string"}}}, "SortedLinks": {"type": "object", "properties": {"links": {"type": "array", "items": {"$ref": "#/components/schemas/BitlinkBody"}}, "sorted_links": {"type": "array", "items": {"$ref": "#/components/schemas/ClickLink"}}}}, "TopLinksAndQRCodes": {"description": "Response shape for top bitlinks and decoupled QR codes in a group, ranked together by engagement count. `links` and `qr_codes` are independent lists (a link and a decoupled QR code are never the same entity); `sorted_engagements` is the unified descending-by-engagement ordering across both, with each entry's id referencing either a bitlink or a QR code guid. Coupled QRCs are listed by their bitlink ID.\n", "type": "object", "properties": {"links": {"type": "array", "items": {"$ref": "#/components/schemas/BitlinkBody"}}, "qr_codes": {"type": "array", "items": {"$ref": "#/components/schemas/QRCodeMinimal"}}, "sorted_engagements": {"type": "array", "items": {"$ref": "#/components/schemas/EngagementSubtotal"}}}}, "SortedButtons": {"type": "object", "properties": {"info": {"type": "string"}, "sorted_buttons": {"type": "array", "items": {"$ref": "#/components/schemas/ClickLink"}}, "buttons": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string"}, "button_type": {"$ref": "#/components/schemas/LaunchpadButtonTypeEnum"}, "title": {"type": "string"}, "microsite_guid": {"type": "string"}}}}, "page_views": {"type": "array", "items": {"type": "object", "properties": {"microsite_guid": {"type": "string"}, "uri": {"type": "string"}, "views": {"type": "number"}}}}}}, "DeeplinkRule": {"type": "object", "properties": {"guid": {"type": "string"}, "bitlink": {"type": "string"}, "app_uri_path": {"type": "string"}, "install_url": {"type": "string"}, "app_guid": {"type": "string"}, "os": {"$ref": "#/components/schemas/MobileOS"}, "install_type": {"$ref": "#/components/schemas/InstallPreference"}, "created": {"type": "string", "description": "ISO timestamp"}, "modified": {"type": "string", "description": "ISO timestamp"}, "brand_guid": {"type": "string"}}}, "Deeplink": {"type": "object", "properties": {"app_id": {"type": "string"}, "app_uri_path": {"type": "string"}, "install_url": {"type": "string"}, "install_type": {"$ref": "#/components/schemas/InstallPreference"}}}, "TimeUnit": {"description": "the unit of time queried for (minute, hour, day, week, month)", "type": "string", "enum": ["minute", "hour", "day", "week", "month"], "default": "day"}, "TimeUnitDWM": {"description": "the unit of time queried for (day, week, month)", "type": "string", "enum": ["day", "week", "month"], "default": "month"}, "FullShorten": {"type": "object", "description": "Either long_url (for new bitlinks) or bitlink_id (for adding keywords to existing bitlinks) must be provided, but not both.", "properties": {"long_url": {"type": "string", "description": "URL to be shortened. Required when creating new bitlinks. Cannot be used with bitlink_id."}, "domain": {"type": "string", "default": "bit.ly"}, "group_guid": {"type": "string", "description": "Always include a specific group and custom domain in your shorten calls."}, "title": {"type": "string"}, "tags": {"type": "array", "items": {"type": "string"}}, "deeplinks": {"type": "array", "items": {"$ref": "#/components/schemas/Deeplink"}}, "force_new_link": {"type": "boolean"}, "keyword": {"type": "string", "description": "Custom keyword for creating keyword overrides. If provided, creates an override at domain/keyword"}, "bitlink_id": {"type": "string", "description": "Existing bitlink ID to add a keyword override to. Format: domain/hash. Cannot be used with long_url"}, "expiration_at": {"type": "string", "description": "Optional expiration timestamp for the bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year."}, "dynamic_routing": {"type": "array", "description": "dynamic routing rules for this bitlink.", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}}}, "example": {"long_url": "https://dev.bitly.com", "domain": "bit.ly", "group_guid": "Ba1bc23dE4F", "title": "Bitly API Documentation", "tags": ["bitly", "api"]}}, "Shorten": {"type": "object", "required": ["long_url"], "properties": {"long_url": {"type": "string"}, "domain": {"type": "string", "default": "bit.ly"}, "group_guid": {"type": "string"}, "force_new_link": {"type": "boolean"}}, "example": {"long_url": "https://dev.bitly.com", "domain": "bit.ly", "group_guid": "Ba1bc23dE4F"}}, "LinkClicks": {"type": "object", "properties": {"clicks": {"type": "integer"}, "date": {"type": "string"}}}, "QRScans": {"type": "object", "properties": {"scans": {"type": "integer"}, "date": {"type": "string"}}}, "Clicks": {"type": "object", "properties": {"link_clicks": {"type": "array", "items": {"$ref": "#/components/schemas/LinkClicks"}}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}}}, "TotalEngagements": {"type": "object", "properties": {"engagements": {"type": "array", "items": {"$ref": "#/components/schemas/Engagements"}}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}}}, "Engagements": {"type": "object", "properties": {"engagement_count": {"type": "integer"}, "engagements": {"$ref": "#/components/schemas/Engagement"}, "date": {"type": "string"}}}, "Engagement": {"type": "object", "properties": {"lib_button_clicks": {"type": "integer"}, "clicks": {"type": "integer"}, "scans": {"type": "integer"}}}, "TotalEngagementsSummary": {"type": "object", "properties": {"total_engagements": {"type": "integer"}, "engagements": {"$ref": "#/components/schemas/Engagement"}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}}}, "BitlinkScans": {"type": "object", "properties": {"scans": {"type": "array", "items": {"$ref": "#/components/schemas/QRScans"}}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}}}, "LaunchpadButtonTypeEnum": {"description": "Available button types for Launchpad content", "type": "string", "enum": ["bitlink", "youtubeVideo", "image", "carousel", "grid", "digital_business_card", "text_block"]}, "ClicksSummary": {"type": "object", "properties": {"total_clicks": {"type": "integer"}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}}}, "BitlinkScansSummary": {"type": "object", "properties": {"total_scans": {"type": "integer"}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}}}, "SiteViewMetrics": {"type": "object", "properties": {"site_views": {"type": "array", "items": {"$ref": "#/components/schemas/ViewMetric"}}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}, "facet": {"type": "string", "enum": ["views", "countries", "referrers", "devices"]}}}, "SiteCityViewMetrics": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseMetrics"}, {"properties": {"site_views": {"type": "array", "items": {"$ref": "#/components/schemas/ViewMetric"}}, "other_metrics": {"$ref": "#/components/schemas/OtherViewMetrics"}}}]}, "SiteViewsSummary": {"type": "object", "properties": {"total_views": {"type": "integer"}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}}}, "SiteButtonTypeEnum": {"description": "Available button types for Site content", "type": "string", "enum": ["bitlink", "youtubeVideo", "image", "carousel", "grid", "digital_business_card"]}, "SiteClicks": {"type": "object", "properties": {"clicks": {"type": "integer"}, "title": {"type": "string"}, "is_active": {"type": "boolean"}, "long_url": {"type": "string"}, "type": {"$ref": "#/components/schemas/SiteButtonTypeEnum"}, "bitlink_id": {"type": "string"}, "domain": {"type": "string"}, "keyword": {"type": "string"}}}, "SitesPagination": {"type": "object", "properties": {"prev": {"type": "string"}, "next": {"type": "string"}, "page": {"type": "integer"}, "total": {"type": "integer"}, "size": {"type": "integer"}}}, "SiteLinkPerformance": {"type": "object", "properties": {"total": {"type": "integer"}, "link_clicks": {"type": "array", "items": {"$ref": "#/components/schemas/SiteClicks"}}, "performance_start": {"type": "string"}, "performance_end": {"type": "string"}, "units": {"type": "integer"}, "unit": {"type": "string", "enum": ["minute", "hour", "day", "week", "month"]}, "unit_reference": {"type": "string"}, "page": {"$ref": "#/components/schemas/SitesPagination"}}}, "Tags": {"type": "object", "properties": {"tags": {"type": "array", "items": {"type": "string"}}}}, "GroupPreferences": {"type": "object", "properties": {"group_guid": {"type": "string"}, "domain_preference": {"type": "string"}}, "example": {"group_guid": "Ba1bc23dE4F", "domain_preference": "chauncey.ly"}}, "AddCustomBitlink": {"type": "object", "properties": {"custom_bitlink": {"type": "string"}, "bitlink_id": {"type": "string"}}, "example": {"custom_bitlink": "chauncey.ly/documentation", "bitlink_id": "chauncey.ly/1234abcd"}}, "UpdateCustomBitlink": {"type": "object", "properties": {"bitlink_id": {"type": "string"}}, "example": {"bitlink_id": "chauncey.ly/1234abcd"}}, "CustomBitlink": {"type": "object", "properties": {"custom_bitlink": {"type": "string"}, "bitlink": {"$ref": "#/components/schemas/BitlinkBody"}, "bitlink_history": {"type": "array", "items": {"$ref": "#/components/schemas/CustomBitlinkHistory"}}}}, "CustomBitlinkHistory": {"type": "object", "properties": {"group_guid": {"type": "string"}, "keyword": {"type": "string"}, "bsd": {"type": "string"}, "hash": {"type": "string"}, "login": {"type": "string"}, "long_url": {"type": "string"}, "created": {"type": "string"}, "first_created": {"type": "string"}, "deactivated": {"type": "string"}, "is_active": {"type": "boolean"}}}, "Metric": {"type": "object", "properties": {"key": {"type": "string"}, "value": {"type": "integer"}}}, "CityMetric": {"type": "object", "properties": {"clicks": {"type": "integer", "x-faker": "random.number"}, "city": {"type": "string", "x-faker": "address.city"}, "subregion": {"type": "string", "x-faker": "address.state"}, "region": {"type": "string", "x-faker": "address.state"}, "country": {"type": "string", "x-faker": "address.country"}}}, "OtherMetrics": {"type": "object", "properties": {"other_city_clicks": {"type": "integer", "x-faker": "random.number"}, "no_city_clicks": {"type": "integer", "x-faker": "random.number"}}}, "OtherScanMetrics": {"type": "object", "properties": {"other_city_scans": {"type": "integer"}, "no_city_scans": {"type": "integer"}}}, "OtherViewMetrics": {"type": "object", "properties": {"other_city_views": {"type": "integer"}, "no_city_views": {"type": "integer"}}}, "ClickMetric": {"type": "object", "properties": {"clicks": {"type": "integer", "example": 123, "x-faker": "random.number"}, "value": {"type": "string", "example": "bit.ly", "x-faker": "internet.domainName"}}}, "ViewMetric": {"type": "object", "properties": {"views": {"type": "integer"}, "value": {"type": "string"}}}, "DeviceMetric": {"type": "object", "properties": {"clicks": {"type": "integer"}, "device_type": {"type": "string"}}}, "BaseMetrics": {"type": "object", "properties": {"unit": {"type": "string", "x-faker": "internet.userName"}, "units": {"type": "integer", "x-faker": {"datatype.number": {"min": 1, "max": 100}}}, "facet": {"type": "string", "enum": ["countries", "cities", "devices", "referrers", "referrers_by_domain", "referring_domains", "referring_networks", "shorten_counts", "destinations", "agents"]}, "unit_reference": {"type": "string", "x-faker": "date.past"}}}, "Metrics": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseMetrics"}, {"properties": {"metrics": {"type": "array", "items": {"$ref": "#/components/schemas/Metric"}}}}]}, "ClickMetrics": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseMetrics"}, {"properties": {"metrics": {"type": "array", "items": {"$ref": "#/components/schemas/ClickMetric"}}}}]}, "DeviceMetrics": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseMetrics"}, {"properties": {"metrics": {"type": "array", "items": {"$ref": "#/components/schemas/DeviceMetric"}}}}]}, "CityMetrics": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseMetrics"}, {"properties": {"metrics": {"type": "array", "items": {"$ref": "#/components/schemas/CityMetric"}}, "other_metrics": {"$ref": "#/components/schemas/OtherMetrics"}}}]}, "CityScanMetric": {"type": "object", "properties": {"scans": {"type": "integer"}, "city": {"type": "string"}, "subregion": {"type": "string"}, "region": {"type": "string"}, "country": {"type": "string"}}}, "ScanMetric": {"type": "object", "properties": {"scans": {"type": "integer"}, "value": {"type": "string"}}}, "BaseScanMetrics": {"type": "object", "properties": {"unit": {"type": "string"}, "units": {"type": "integer"}, "facet": {"type": "string", "enum": ["countries", "cities", "device_os", "browsers", "destinations"]}, "unit_reference": {"type": "string"}}}, "ScanMetrics": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseScanMetrics"}, {"properties": {"metrics": {"type": "array", "items": {"$ref": "#/components/schemas/ScanMetric"}}}}]}, "CityScanMetrics": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseScanMetrics"}, {"properties": {"metrics": {"type": "array", "items": {"$ref": "#/components/schemas/CityScanMetric"}}, "other_metrics": {"$ref": "#/components/schemas/OtherScanMetrics"}}}]}, "ReferrersByDomain": {"type": "object", "properties": {"network": {"type": "string"}, "referrers": {"type": "array", "items": {"$ref": "#/components/schemas/Metric"}}}}, "ReferrersByDomains": {"type": "object", "properties": {"unit": {"type": "string"}, "units": {"type": "integer"}, "facet": {"type": "string", "enum": ["referrers_by_domains"]}, "unit_reference": {"type": "string"}, "referrers_by_domain": {"type": "array", "items": {"$ref": "#/components/schemas/ReferrersByDomain"}}}}, "AggregateClicksForBitlinks": {"type": "object", "properties": {"unit_reference": {"type": "string"}, "unit": {"type": "string"}, "units": {"type": "number"}, "info": {"type": "string"}, "clicks": {"type": "array", "items": {"$ref": "#/components/schemas/ClicksForAggregate"}}}}, "AggregateClicksForBitlinksByCitiesFacet": {"type": "object", "properties": {"unit_reference": {"type": "string"}, "unit": {"type": "string"}, "units": {"type": "number"}, "info": {"type": "string"}, "facet": {"type": "string"}, "totals_for_time_period": {"type": "array", "items": {"$ref": "#/components/schemas/ClicksByCitiesFacet"}}}}, "AggregateClicksForBitlinksByFacet": {"type": "object", "properties": {"unit_reference": {"type": "string"}, "unit": {"type": "string"}, "units": {"type": "number"}, "info": {"type": "string"}, "facet": {"type": "string"}, "totals_for_time_period": {"type": "array", "items": {"$ref": "#/components/schemas/ClicksByFacet"}}}}, "ClicksForAggregate": {"type": "object", "properties": {"date": {"type": "integer"}, "clicks": {"type": "integer"}}}, "ClicksByFacet": {"type": "object", "properties": {"value": {"type": "string"}, "clicks": {"type": "number"}}}, "ClicksByCitiesFacet": {"type": "object", "properties": {"city": {"type": "string"}, "clicks": {"type": "number"}, "region": {"type": "string"}, "subregion": {"type": "string"}, "country": {"type": "string"}}}, "Campaign": {"type": "object", "allOf": [{"$ref": "#/components/schemas/HasReferences"}, {"properties": {"guid": {"type": "string"}, "group_guid": {"type": "string"}, "created_by": {"type": "string"}, "name": {"type": "string"}, "description": {"type": "string"}, "created": {"type": "string", "description": "ISO timestamp"}, "modified": {"type": "string", "description": "ISO timestamp"}}}]}, "Campaigns": {"type": "object", "properties": {"campaigns": {"type": "array", "items": {"$ref": "#/components/schemas/Campaign"}}}}, "CampaignModify": {"type": "object", "properties": {"group_guid": {"type": "string"}, "name": {"type": "string"}, "description": {"type": "string"}, "channel_guids": {"type": "array", "items": {"type": "string"}}}, "example": {"group_guid": "Ba1bc23dE4F", "name": "My Campaign", "description": "my new campaign", "channel_guids": ["Ha1bc2DefGj", "Ha1bc2DefGk"]}}, "BaseChannelBitlink": {"type": "object", "properties": {"campaign_guid": {"type": "string"}, "bitlink_id": {"type": "string"}}}, "BaseChannel": {"type": "object", "properties": {"name": {"type": "string"}, "guid": {"type": "string"}, "created": {"type": "string", "description": "ISO TIMESTAMP"}, "modified": {"type": "string", "description": "ISO_TIMESTAMP"}, "group_guid": {"type": "string"}}}, "Channel": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseChannel"}, {"$ref": "#/components/schemas/HasReferences"}]}, "ChannelModify": {"type": "object", "allOf": [{"$ref": "#/components/schemas/BaseChannel"}, {"properties": {"bitlinks": {"type": "array", "items": {"$ref": "#/components/schemas/BaseChannelBitlink"}}}}], "example": {"name": "My Channel", "guid": "Ha1bc2DefGh", "group_guid": "Ba1bc23dE4F", "bitlinks": [{"campaign_guid": "Ca1bcd2EFGh", "bitlink_id": "bit.ly/1234abcd"}]}}, "Channels": {"type": "object", "properties": {"channels": {"type": "array", "items": {"$ref": "#/components/schemas/Channel"}}}}, "HasReferences": {"type": "object", "properties": {"references": {"type": "object", "additionalProperties": {"type": "string"}}}}, "AddChannelBitlinksRequest": {"type": "object", "required": ["campaign_guid", "bitlinks"], "properties": {"campaign_guid": {"type": "string", "description": "The campaign to associate the given bitlinks with on this channel. All bitlinks in the request are associated with this single campaign_guid."}, "bitlinks": {"type": "array", "items": {"type": "string"}, "minItems": 1, "maxItems": 100, "description": "Bitlink IDs to add to the channel, up to 100 per request. Bitlinks already associated with the channel are left untouched."}}, "example": {"campaign_guid": "Ca1bcd2EFGh", "bitlinks": ["bit.ly/1234abcd", "bit.ly/5678efgh"]}}, "AddChannelBitlinksResponse": {"type": "object", "properties": {"channel_guid": {"type": "string", "description": "The GUID of the channel the bitlinks were added to."}, "campaign_guid": {"type": "string", "description": "The GUID of the campaign the bitlinks are associated with on this channel."}, "bitlinks": {"type": "array", "items": {"type": "string"}, "description": "Bitlink IDs now associated with the channel."}}, "example": {"channel_guid": "Ha1bc2DefGh", "campaign_guid": "Ca1bcd2EFGh", "bitlinks": ["bit.ly/1234abcd", "bit.ly/5678efgh"]}}, "OAuthApp": {"type": "object", "required": ["name", "client_id", "link", "description", "require_oauth_pkce"], "properties": {"name": {"type": "string"}, "client_id": {"type": "string"}, "description": {"type": "string"}, "link": {"type": "string"}, "require_oauth_pkce": {"type": "boolean"}, "internal_app": {"type": "boolean", "description": "True for Bitly's own first-party apps (dashboard, mobile apps), as opposed to third-party integrations."}}}, "BSDsResponse": {"type": "object", "properties": {"bsds": {"type": "array", "items": {"type": "string"}}}}, "BSDSearchResult": {"type": "object", "properties": {"domain": {"description": "an available domain. An internationalized domain is returned in Unicode.", "type": "string"}}}, "BSDSearchResults": {"type": "object", "properties": {"results": {"type": "array", "items": {"$ref": "#/components/schemas/BSDSearchResult"}}, "input_domain": {"$ref": "#/components/schemas/InputDomain"}}}, "InputDomain": {"type": "object", "properties": {"domain": {"description": "the domain searched for. An internationalized domain is returned in Unicode.", "type": "string"}, "status": {"type": "string"}}}, "DomainValidateBody": {"type": "object", "description": "custom domain in validation queue", "required": ["organization_guid", "custom_domain"], "properties": {"organization_guid": {"type": "string"}, "custom_domain": {"type": "string"}, "group_guids": {"type": "array", "items": {"type": "string"}}, "prevalidate": {"type": "boolean", "description": "Check the domain without adding it. The response says whether the domain can be used, and no custom domain is created. Use this to catch a typo or a domain another account holds before you commit."}}}, "DomainValidate": {"type": "object", "description": "custom domain in validation queue", "required": ["organization_guid", "custom_domain"], "properties": {"organization_guid": {"type": "string"}, "custom_domain": {"type": "string"}, "domain": {"type": "string"}, "subdomain": {"type": "string"}, "group_guids": {"type": "array", "items": {"type": "string"}}, "prevalidate": {"type": "boolean"}}}, "DomainUpdate": {"type": "object", "description": "The settings to change on a custom domain. Send only the settings to change.", "properties": {"root_redirect": {"type": "string"}, "wildcard_redirect": {"type": "string"}, "https_enabled": {"type": "boolean"}, "hsts_enabled": {"type": "boolean"}, "upgrade_insecure_requests": {"type": "boolean"}}}, "CustomDomainBody": {"type": "object", "description": "information about given custom domain", "properties": {"custom_domain": {"type": "string"}, "is_active": {"type": "boolean"}, "group_guids": {"type": "array", "items": {"type": "string"}}, "ssl_configuration_error": {"type": "string"}, "configuration_last_check_ts": {"type": "string"}, "root_redirect": {"type": "string"}, "https_bitlinks": {"type": "boolean"}, "ssl_autoconfigure_error": {"type": "boolean"}, "https_enabled": {"type": "boolean"}, "hsts_enabled": {"type": "boolean"}, "created": {"type": "string", "description": "ISO_TIMESTAMP"}, "wildcard_redirect": {"type": "string"}, "validation_status": {"type": "string", "enum": ["ok", "pending", "error"]}, "validation_error": {"type": "string"}, "deeplink_apps": {"type": "array", "items": {"$ref": "#/components/schemas/MinimalDeeplinkApp"}}, "upgrade_insecure_requests": {"type": "boolean"}, "ssl_cert": {"$ref": "#/components/schemas/PublicSSLCert"}}}, "CustomDomains": {"type": "object", "properties": {"custom_domains": {"type": "array", "items": {"$ref": "#/components/schemas/CustomDomainBody"}}}}, "PublicSSLCert": {"type": "object", "description": "SSL Certification", "properties": {"valid_end": {"type": "string"}, "custom_cert": {"type": "boolean"}, "issuer": {"type": "string"}}}, "MinimalDeeplinkApp": {"type": "object", "description": "Deep Linking object", "properties": {"guid": {"type": "string"}, "os": {"$ref": "#/components/schemas/MobileOS"}}}, "MobileOS": {"type": "string", "enum": ["ios", "android"]}, "GroupBitlinksCountRollup": {"type": "object", "properties": {"unit": {"type": "string"}, "units": {"type": "integer"}, "unit_reference": {"type": "string"}, "total_clicks": {"type": "integer"}}}, "GroupClicks": {"type": "object", "properties": {"unit": {"type": "string"}, "units": {"type": "integer"}, "unit_reference": {"type": "string"}, "data": {"type": "array", "items": {"$ref": "#/components/schemas/CountItem"}}}}, "GroupConsumableFeatureUsage": {"type": "object", "properties": {"name": {"type": "string"}, "description": {"type": "string"}, "count": {"type": "integer"}}}, "HistoricalFeatureUsage": {"type": "object", "properties": {"name": {"type": "string", "description": "feature name"}, "usage": {"type": "array", "items": {"$ref": "#/components/schemas/HistoricalUsage"}}}}, "HistoricalUsage": {"type": "object", "properties": {"count": {"type": "integer", "description": "the usage count during the time period"}, "unit_start": {"type": "string", "description": "ISO_TIMESTAMP of the beginning of the time period"}}}, "GroupFeatureUsage": {"type": "object", "required": ["group_guid", "limit_usage"], "properties": {"group_guid": {"type": "string", "description": "the group's guid"}, "limit_usage": {"type": "array", "description": "an array of all of the group's consumable feature usage", "items": {"$ref": "#/components/schemas/GroupConsumableFeatureUsage"}}}}, "GroupHistoricalUsage": {"type": "object", "required": ["group_guid", "unit", "start_date", "end_date", "historical_limit_usage"], "properties": {"group_guid": {"type": "string", "description": "the group's guid"}, "unit": {"type": "string", "description": "A unit of time (day, week, or month)"}, "start_date": {"type": "string", "description": "Start date (format \"2006-01-02\") of the historical usage"}, "end_date": {"type": "string", "description": "End date (format \"2006-01-02\") of the historical usage"}, "historical_limit_usage": {"type": "array", "description": "an array of all of the group's historical feature usage", "items": {"$ref": "#/components/schemas/HistoricalFeatureUsage"}}}}, "PurchaseBSD": {"type": "object", "properties": {"agreement_keys": {"type": "array", "items": {"type": "string"}}, "domain": {"description": "the domain to register, in Unicode or punycode.", "type": "string"}, "organization_guid": {"type": "string"}}}, "PurchaseBSDResponse": {"type": "object", "properties": {"custom_domain": {"type": "string", "description": "the custom domain the registration created. An internationalized domain is returned in Unicode."}, "organization_guid": {"type": "string"}, "validation_status": {"type": "string", "enum": ["pending"], "description": "a registration always starts pending, because Bitly configures the DNS after it"}}}, "DomainAgreements": {"type": "object", "properties": {"domain_agreements": {"type": "array", "items": {"$ref": "#/components/schemas/DomainAgreement"}}}}, "DomainDNS": {"type": "object", "properties": {"domain": {"type": "string", "description": "the requested domain. An internationalized domain is returned in Unicode."}, "dns_provider": {"type": "string", "enum": ["unknown", "godaddy", "cloudflare", "namecheap"], "description": "the detected DNS provider for the requested domain", "example": "godaddy"}, "type": {"type": "string", "enum": ["A", "CNAME", "unknown"], "description": "the type of DNS record returned"}, "records": {"type": "array", "items": {"type": "string"}, "description": "the records returned by the lookup"}, "required_records": {"type": "array", "description": "The records to create at your registrar for the domain to verify. A root domain needs the A records. A subdomain needs the CNAME record.", "items": {"type": "object", "properties": {"type": {"type": "string", "description": "the DNS record type to create", "enum": ["A", "CNAME"]}, "host": {"type": "string", "description": "the record name at your registrar, where @ means the root of the zone"}, "value": {"type": "string", "description": "what the record points to"}}}}, "records_valid": {"type": "boolean", "description": "whether the returned records represent a valid configuration"}}, "example": {"dns_provider": "namecheap", "domain": "my.domain.com", "type": "CNAME", "records": ["cname.bitly.com"], "required_records": [{"type": "CNAME", "host": "my", "value": "cname.bitly.com"}], "records_valid": true}}, "DomainAgreement": {"type": "object", "properties": {"agreement_key": {"type": "string"}, "content": {"type": "string"}, "title": {"type": "string"}, "url": {"type": "string"}}}, "Webhook": {"type": "object", "allOf": [{"$ref": "#/components/schemas/HasReferences"}, {"properties": {"guid": {"type": "string"}, "created": {"type": "string"}, "modified": {"type": "string"}, "modified_by": {"type": "string"}, "alerted": {"type": "string"}, "deactivated": {"type": "string"}, "is_active": {"type": "boolean"}, "is_alert": {"type": "boolean"}, "organization_guid": {"type": "string"}, "group_guid": {"type": "string"}, "name": {"type": "string"}, "event": {"type": "string"}, "url": {"type": "string"}, "status": {"type": "string"}, "oauth_url": {"type": "string"}, "client_id": {"type": "string"}, "client_secret": {"type": "string"}, "fetch_tags": {"type": "boolean"}}}], "required": ["guid", "created", "modified", "modified_by", "alerted", "deactivated", "is_active", "is_alert", "organization_guid", "name", "event", "url"]}, "Webhooks": {"type": "object", "properties": {"webhooks": {"type": "array", "items": {"$ref": "#/components/schemas/Webhook"}}}}, "WebhookCreate": {"type": "object", "required": ["organization_guid", "name", "event", "url"], "properties": {"is_active": {"type": "boolean"}, "organization_guid": {"type": "string"}, "group_guid": {"type": "string"}, "name": {"type": "string"}, "event": {"type": "string"}, "url": {"type": "string"}, "oauth_url": {"type": "string"}, "client_id": {"type": "string"}, "client_secret": {"type": "string"}, "fetch_tags": {"type": "boolean"}}, "example": {"is_active": true, "organization_guid": "Oa1bcd234eF", "group_guid": "Ba1bc23dE4F", "name": "My Webhook", "event": "decodes", "url": "https://bitly.com/webhooks", "oauth_url": "https://fake.com/oauth", "client_id": "fakeclientid123", "client_secret": "itsasecreticanttellyou"}}, "WebhookUpdate": {"type": "object", "required": ["guid"], "properties": {"guid": {"type": "string"}, "is_active": {"type": "boolean"}, "organization_guid": {"type": "string"}, "group_guid": {"type": "string"}, "name": {"type": "string"}, "event": {"type": "string"}, "url": {"type": "string"}, "oauth_url": {"type": "string"}, "client_id": {"type": "string"}, "client_secret": {"type": "string"}, "fetch_tags": {"type": "boolean"}}, "example": {"guid": "Wa1bcDefG23", "is_active": true, "organization_guid": "Oa1bcd234eF", "group_guid": "Ba1bc23dE4F", "name": "My Webhook", "event": "decodes", "url": "https://bitly.com/webhooks", "oauth_url": "https://fake.com/oauth", "client_id": "fakeclientid123", "client_secret": "itsasecreticanttellyou"}}, "PlanLimits": {"type": "object", "allOf": [{"$ref": "#/components/schemas/HasReferences"}, {"properties": {"organization_guid": {"type": "string"}, "plan_limits": {"type": "array", "items": {"$ref": "#/components/schemas/PlanLimit"}}}}]}, "PlanLimit": {"type": "object", "properties": {"name": {"type": "string"}, "description": {"type": "string"}, "limit": {"type": "integer"}, "count": {"type": "integer"}}}, "PlatformLimits": {"type": "object", "properties": {"platform_limits": {"type": "array", "items": {"$ref": "#/components/schemas/PlatformLimit"}}}}, "PlatformLimit": {"type": "object", "properties": {"endpoint": {"type": "string"}, "methods": {"type": "array", "items": {"$ref": "#/components/schemas/MethodLimit"}}}}, "MethodLimit": {"type": "object", "properties": {"name": {"type": "string"}, "limit": {"type": "integer"}, "count": {"type": "integer"}}}, "GroupExportRequestBody": {"type": "object", "required": ["export_type"], "properties": {"export_type": {"type": "string", "description": "Which export shape to produce.", "enum": ["link_engagements_batch", "links_list", "qr_codes_list"]}, "bitlinks": {"type": "array", "description": "Fully qualified bitlinks (e.g. \"bit.ly/abc\"). Used by export_type link_engagements_batch when\nthe caller already knows the exact links. Mutually exclusive with filter (provide one or the other).\n", "items": {"type": "string"}}, "unix_from": {"type": "integer", "description": "Start of the metrics date range (Unix seconds, UTC). Clamped to the caller's tier data window.\nFor link_engagements_batch, required together with unix_to unless the tier max-history default applies.\nFor links_list or qr_codes_list, used when include_metrics is true.\n"}, "unix_to": {"type": "integer", "description": "End of the metrics date range (Unix seconds, UTC). See unix_from."}, "filter": {"$ref": "#/components/schemas/GroupExportFilter"}, "include_metrics": {"type": "boolean", "description": "When true on links_list or qr_codes_list, append clicks, scans, and button_clicks columns and apply\nthe 200-row cap. Requires unix_from and unix_to (or tier-default window behavior where applicable).\n"}}}, "GroupExportFilter": {"type": "object", "description": "Search constraints used to resolve links or QR codes for export. Required for links_list and qr_codes_list.", "properties": {"tags": {"type": "array", "items": {"type": "string"}}, "domain": {"type": "string"}, "archived": {"type": "string", "description": "Filter by archive state.", "enum": ["on", "off", "both"]}, "query": {"type": "string", "description": "Free-text search query."}, "created_after": {"type": "integer", "description": "Include items created at or after this Unix timestamp (UTC)."}, "created_before": {"type": "integer", "description": "Include items created before this Unix timestamp (UTC)."}, "campaign_guid": {"type": "string", "description": "Filter links by campaign GUID. Ignored for qr_codes_list."}}}, "GroupExportResponse": {"type": "object", "properties": {"export_type": {"type": "string", "enum": ["link_engagements_batch", "links_list", "qr_codes_list"]}, "filename": {"type": "string", "description": "Suggested download filename for the CSV."}, "media_type": {"type": "string", "example": "text/csv"}, "row_count": {"type": "integer", "description": "Number of data rows in the CSV (excluding the header row)."}, "column_count": {"type": "integer"}, "columns": {"type": "array", "description": "CSV column headers in order.", "items": {"type": "string"}}, "size_bytes": {"type": "integer", "description": "Size of the raw CSV bytes before base64 encoding."}, "data_uri": {"type": "string", "description": "CSV file as a data:text/csv;base64,... URI."}, "unix_from": {"type": "integer", "description": "Metrics window start (Unix seconds) when metrics are included in the export."}, "unix_to": {"type": "integer", "description": "Metrics window end (Unix seconds) when metrics are included in the export."}, "truncated": {"type": "boolean", "description": "True when the match set exceeded the per-request row cap and only the first cap rows were exported."}}}, "BulkUploadCreate": {"type": "object", "required": ["group_guid", "filename", "upload_type", "domain"], "properties": {"group_guid": {"type": "string", "description": "The group for the links and QR codes that the upload creates."}, "filename": {"type": "string", "description": "Name of the CSV or XLSX file, with its extension."}, "upload_type": {"type": "string", "description": "The item that each row creates. `link` creates a link, `qr_code` creates a QR code, and `coupled_link` creates a link and its QR code.", "enum": ["link", "qr_code", "coupled_link"]}, "domain": {"type": "string", "description": "A custom domain of the group."}, "template_id": {"type": "string", "description": "QR code template. Required for `qr_code` and `coupled_link`. Use `QTDTmplWLogo` to include the Bitly logo, or `QTDTmplNLogo` to exclude it."}}}, "OrganizationBulkUploads": {"type": "object", "properties": {"bulk_uploads": {"type": "array", "description": "The organization's bulk uploads on this page, newest first.", "items": {"$ref": "#/components/schemas/OrganizationBulkUpload"}}, "pagination": {"$ref": "#/components/schemas/BitlinksPagination"}}}, "OrganizationBulkUpload": {"type": "object", "required": ["id", "group_guid", "upload_type", "status", "created_at"], "properties": {"id": {"type": "string", "description": "The bulk upload ID. Use it to get the status of the bulk upload."}, "group_guid": {"type": "string", "description": "The group for the links and QR codes that the upload creates."}, "upload_type": {"type": "string", "description": "The item that each row creates. `link` creates a link, `qr_code` creates a QR code, and `coupled_link` creates a link and its QR code.", "enum": ["link", "qr_code", "coupled_link"]}, "domain": {"type": "string", "description": "Domain for the new short links. Present until processing starts."}, "status": {"type": "string", "description": "`awaiting_upload` until the file is uploaded, `pending` until processing starts, and `in_progress` during processing. Then `success`, `partial_success` when some rows failed, or `failure` when no rows were processed.", "enum": ["awaiting_upload", "pending", "in_progress", "partial_success", "success", "failure"]}, "created_at": {"type": "string", "description": "For `awaiting_upload`, the time of the create request. For `pending`, the time the file was uploaded. For later statuses, the time processing started."}, "upload_url": {"type": "string", "description": "Signed URL for the PUT request that uploads the file. Present only in the create response."}, "headers": {"type": "object", "description": "Headers to send without changes in the PUT request to `upload_url`. Present only in the create response.", "additionalProperties": {"type": "string"}}, "upload_url_expires_at": {"type": "string", "description": "Time the upload URL expires. Present only in the create response."}, "report_url": {"type": "string", "description": "Link to the report. Present when processing is complete and a report exists."}}}, "SiteRedirects": {"type": "object", "properties": {"redirect_guid": {"type": "string", "example": "E0000guid01"}, "microsite_guid": {"type": "string", "example": "M1234567890"}, "uri": {"type": "string", "example": "bit.ly/m/newKeyword"}, "domain": {"type": "string", "example": "bit.ly"}, "keyword": {"type": "string", "example": "newKeyword"}, "redirect_uri": {"type": "string", "example": "bit.ly/m/oldKeyword"}, "redirect_domain": {"type": "string", "example": "bit.ly"}, "redirect_keyword": {"type": "string", "example": "oldKeyword"}, "status": {"type": "string", "example": "active"}, "created": {"type": "string"}, "modified": {"type": "string"}}}, "SiteBannerType": {"description": "Enum of banner type options on a Bitly Site", "type": "string", "enum": ["none", "hero", "rounded_up", "gradient", "square", "frame"]}, "SiteProfileImageSize": {"description": "Enum of profile image sizes on a Bitly Site", "type": "string", "enum": ["xs", "sm", "med", "lg", "xl"]}, "SiteProfileImageBorderSize": {"description": "Enum of profile image border sizes on a Bitly Site", "type": "string", "enum": ["none", "xs", "sm", "med", "lg"]}, "SiteProfileImageType": {"description": "Enum of the profile image type options on a Bitly Site", "type": "string", "enum": ["single", "repeating"]}, "SiteProfileImageLocation": {"description": "Enum of the profile image locations available on a Bitly Site", "type": "string", "enum": ["left", "center", "right"]}, "SiteTextLocation": {"description": "Enum of the available text locations on a Bitly Site", "type": "string", "enum": ["top", "contain", "bottom"]}, "SiteProfileImageShape": {"description": "Enum of profile image shapes on a Bitly Site", "type": "string", "enum": ["round", "rounded_square", "square"]}, "SiteTextSizeEnum": {"description": "Enum of text sizes on a Bitly Site", "type": "string", "enum": ["xs", "sm", "med", "lg"]}, "SiteTextAlignmentEnum": {"description": "Enum of text alignment values on a Bitly Site", "type": "string", "enum": ["start", "center"]}, "SiteTextBorderTypeEnum": {"description": "Enum of border type values on a Bitly Site", "type": "string", "enum": ["none", "below", "above_and_below"]}, "SiteStylePreference": {"description": "Enum of style preference values on a Bitly Site", "type": "string", "enum": ["custom", "theme", "image"]}, "SiteTextWeightEnum": {"description": "Enum of text sizes on a Bitly Site", "type": "string", "enum": ["regular", "bold", "semi_bold"]}, "SiteBlockTypeEnum": {"description": "Available block types for Site blocks", "type": "string", "enum": ["bitlink", "youtubeVideo", "image", "carousel", "grid", "social", "digital_business_card", "text_block"]}, "SiteContainerTypeEnum": {"description": "Available container types", "type": "string", "enum": ["carousel", "grid"]}, "SiteBlockCreateTypeEnum": {"description": "Block types that can be created directly (grid and carousel are created as containers)", "type": "string", "enum": ["bitlink", "social", "youtubeVideo", "image", "digital_business_card", "text_block"]}, "SiteImageAlignment": {"description": "Available image alignment types for Site background images", "type": "string", "enum": ["stretch", "fit", "repeat"]}, "SiteBlockCommon": {"type": "object", "properties": {"site_id": {"type": "string", "example": "M1234567890"}, "block_id": {"type": "string", "example": "L1234567890"}, "sort_order": {"type": "integer"}, "schedule_start": {"type": "string"}, "schedule_end": {"type": "string"}, "is_active": {"type": "boolean"}, "is_pinned": {"type": "boolean"}, "is_sample": {"type": "boolean"}, "type": {"$ref": "#/components/schemas/SiteBlockTypeEnum"}}}, "SiteBlockContent": {"allOf": [{"$ref": "#/components/schemas/BlockContentYoutube"}, {"$ref": "#/components/schemas/BlockContentSocial"}, {"$ref": "#/components/schemas/BlockContentDigitalBusinessCard"}], "type": "object", "properties": {"link_title": {"type": "string"}, "description": {"type": "string"}, "bitlink_id": {"type": "string"}, "image_guid": {"type": "string"}, "image_url": {"type": "string"}, "crop": {"type": "string", "example": "{\"Min\": {\"X\": 0, \"Y\": 0}, \"Max\": {\"X\": 1, \"Y\": 1}}"}, "aspect_ratio": {"type": "string"}, "link_info": {"$ref": "#/components/schemas/PageLinkInfo"}}}, "BlockContentYoutube": {"type": "object", "properties": {"thumbnail_url": {"type": "string"}}}, "BlockContentSocial": {"type": "object", "properties": {"channel": {"type": "string"}, "channel_url": {"type": "string"}}}, "BlockContentDigitalBusinessCard": {"type": "object", "properties": {"digital_business_card_id": {"type": "string"}, "layout": {"type": "string", "$ref": "#/components/schemas/DigitalBusinessCardLayout"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "job_title": {"type": "string"}, "company": {"type": "string"}, "pronouns": {"type": "string"}, "contacts": {"type": "array", "items": {"$ref": "#/components/schemas/DigitalBusinessCardContact"}}, "download_enabled": {"type": "boolean", "example": true}}}, "Template": {"type": "object", "properties": {"template_guid": {"type": "string", "example": "T1234567890"}, "content": {"$ref": "#/components/schemas/BitlySiteContent"}, "appearance": {"$ref": "#/components/schemas/BitlySiteAppearance"}, "blocks": {"$ref": "#/components/schemas/SiteBlocks"}, "status": {"type": "string"}, "categories": {"type": "array", "items": {"type": "string"}}, "created": {"type": "string"}, "modified": {"type": "string"}, "is_active": {"type": "boolean"}, "is_paid": {"type": "boolean"}}}, "ApplyTemplateRequest": {"type": "object", "properties": {"template_guid": {"type": "string", "example": "T1234567890"}}}, "SiteBlock": {"allOf": [{"$ref": "#/components/schemas/SiteBlockCommon"}, {"type": "object"}], "required": ["is_active"], "properties": {"container_id": {"type": "string", "example": "L1234567890"}, "scheme": {"type": "string", "example": "https"}, "content": {"type": "object", "$ref": "#/components/schemas/SiteBlockContent"}, "appearance": {"type": "object", "$ref": "#/components/schemas/TextBlockAppearance"}}}, "SiteBlocks": {"type": "array", "items": {"$ref": "#/components/schemas/SiteBlock"}}, "SiteBlockContainerRequest": {"type": "object", "properties": {"type": {"$ref": "#/components/schemas/SiteContainerTypeEnum"}}}, "ImageCommon": {"type": "object", "properties": {"image_guid": {"type": "string"}, "image_url": {"type": "string"}, "crop": {"type": "string", "example": "{\"Min\": {\"X\": 0, \"Y\": 0}, \"Max\": {\"X\": 1, \"Y\": 1}}"}}}, "BitlinkContent": {"type": "object", "properties": {"bitlink_id": {"type": "string", "description": "The bitlink ID (domain/hash) of the short link displayed on this block", "example": "bit.ly/GzmMT6"}, "link_title": {"type": "string", "description": "Display title of the bitlink block, up to 255 characters", "example": "Short links, big results"}, "description": {"type": "string", "description": "Optional subtitle shown on the bitlink block, up to 255 characters", "example": "my description"}, "is_pinned": {"type": "boolean", "description": "Whether this bitlink block is pinned to the top of the site"}, "image_url": {"type": "string", "description": "Public URL of the thumbnail image shown on this bitlink block"}, "image_guid": {"type": "string", "description": "GUID of the uploaded thumbnail image for this bitlink block"}, "crop": {"type": "string", "description": "JSON-encoded crop rectangle for the thumbnail image, with Min and Max coordinates in the range 0-1", "example": "{\"Min\": {\"X\": 0, \"Y\": 0}, \"Max\": {\"X\": 1, \"Y\": 1}}"}}}, "PageLinkInfo": {"type": "object", "description": "Versioned bitlink data from decodes_api for rendering links on Sites and Launchpads", "properties": {"link": {"type": "string", "description": "The fully qualified short URL (e.g., \"https://bit.ly/abc123\")"}, "long_url": {"type": "string", "description": "The destination URL that the short link redirects to"}, "expiration_at": {"type": "integer", "format": "int64", "description": "Unix timestamp when the link expires, if set"}, "has_override": {"type": "boolean", "description": "Indicates if this link has a custom backhalf override"}, "is_override": {"type": "boolean", "description": "Indicates if this link IS an override of another link"}, "is_deleted": {"type": "boolean", "description": "Indicates if the link has been deleted"}, "dynamic_routing": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}, "description": "Dynamic routing rules for this link. Only present when at least one rule is configured."}}}, "SiteContentUnion": {"anyOf": [{"$ref": "#/components/schemas/BitlinkContent"}, {"$ref": "#/components/schemas/YoutubeVideoRequest"}, {"$ref": "#/components/schemas/SocialContent"}, {"$ref": "#/components/schemas/ImageContent"}, {"$ref": "#/components/schemas/DigitalBusinessCardContent"}, {"$ref": "#/components/schemas/TextBlockContent"}]}, "SiteBlockRequest": {"type": "object", "properties": {"content": {"$ref": "#/components/schemas/SiteContentUnion"}, "appearance": {"$ref": "#/components/schemas/TextBlockAppearanceRequest"}, "schedule_start": {"type": "string"}, "schedule_end": {"type": "string"}, "is_active": {"type": "boolean"}, "is_pinned": {"type": "boolean"}, "parent": {"type": "string"}}}, "SiteBlockCreateRequest": {"allOf": [{"$ref": "#/components/schemas/SiteBlockRequest"}, {"type": "object", "required": ["type", "content"], "properties": {"type": {"description": "Type of site block to create. Grid and carousel are created as containers, not via this request.", "$ref": "#/components/schemas/SiteBlockCreateTypeEnum"}}}]}, "YoutubeVideoRequest": {"type": "object", "properties": {"video_url": {"type": "string", "example": "youtube.com/embed/"}, "thumbnail_url": {"type": "string", "example": "https://i.ytimg.com"}, "link_title": {"type": "string", "example": "myvideo"}, "domain": {"type": "string", "example": "bit.ly"}}}, "SocialContent": {"type": "object", "properties": {"url": {"type": "string", "example": "facebook.com/profile"}, "channel": {"type": "string", "example": "facebook"}}}, "DigitalBusinessCardLayout": {"type": "string", "example": "button", "enum": ["button", "card", "inline"]}, "DigitalBusinessCardContent": {"type": "object", "properties": {"digital_business_card_id": {"type": "string"}, "link_title": {"type": "string", "example": "My Contact Info"}, "layout": {"type": "string", "$ref": "#/components/schemas/DigitalBusinessCardLayout"}, "first_name": {"type": "string", "example": "Jane"}, "last_name": {"type": "string", "example": "Doe"}, "pronouns": {"type": "string", "example": "she/them"}, "company": {"type": "string", "example": "Bitly"}, "job_title": {"type": "string", "example": "Developer"}, "contacts": {"type": "array", "items": {"$ref": "#/components/schemas/DigitalBusinessCardContact"}}, "download_enabled": {"type": "boolean", "example": true}, "file": {"type": "object", "required": ["file_name", "data"], "properties": {"file_name": {"type": "string", "example": "JaneDoe.vcf"}, "data": {"type": "string", "example": "BEGIN:VCARD\\nVERSION:3.0\\nFN:Jane Doe\\nORG:Bitly\\nTITLE:Developer\\nTEL;TYPE=WORK,VOICE:555-555-5555\\nEMAIL:"}}}}}, "DigitalBusinessCardContact": {"type": "object", "required": ["contact_method", "value", "sort_order"], "properties": {"contact_method": {"type": "string", "enum": ["email", "phone", "location", "note", "website"]}, "method_type": {"type": "string", "enum": ["no_label", "email", "work", "personal", "home", "other", "mobile", "direct", "main", "fax", "office", "address", "company", "homepage"]}, "value": {"type": "string", "example": "chauncey@bit.ly"}, "sort_order": {"type": "integer", "example": 1}, "bitlink_id": {"type": "string", "example": "bit.ly/123"}}}, "TextBlockContent": {"type": "object", "properties": {"text": {"type": "string", "example": "Hello, world!"}}}, "TextBlockAppearanceRequestAlignmentEnum": {"type": "string", "enum": ["left", "center", "right", "justified"]}, "TextBlockAppearanceRequestFontSizeEnum": {"type": "string", "enum": ["small", "medium", "large", "extra_large"]}, "TextBlockAppearance": {"type": "object", "properties": {"background_color": {"type": "string", "example": "#fcba03"}, "text_color": {"type": "string", "example": "#e30b2c"}, "alignment": {"$ref": "#/components/schemas/TextBlockAppearanceRequestAlignmentEnum"}, "text_block_style": {"$ref": "#/components/schemas/TextBlockStyle"}, "font_size": {"$ref": "#/components/schemas/TextBlockAppearanceRequestFontSizeEnum"}}}, "TextBlockAppearanceRequest": {"type": "object", "properties": {"background_color": {"type": "string", "example": "#fcba03"}, "text_color": {"type": "string", "example": "#e30b2c"}, "alignment": {"$ref": "#/components/schemas/TextBlockAppearanceRequestAlignmentEnum"}, "font_size": {"$ref": "#/components/schemas/TextBlockAppearanceRequestFontSizeEnum"}, "text_block_style": {"$ref": "#/components/schemas/TextBlockStyle"}}}, "TextBlockStyle": {"type": "object", "properties": {"bold": {"type": "boolean"}, "italic": {"type": "boolean"}, "underline": {"type": "boolean"}}}, "ImageContent": {"allOf": [{"$ref": "#/components/schemas/ImageCommon"}, {"type": "object", "properties": {"aspect_ratio": {"type": "string", "example": "1:1"}, "link_title": {"type": "string", "example": "my image"}, "description": {"type": "string", "example": "more about my image"}, "bitlink_id": {"type": "string", "example": "bit.ly/123"}}}]}, "CreateLaunchpad": {"description": "@deprecated LL-2507", "type": "object", "required": ["group_guid", "domain", "keyword"], "properties": {"group_guid": {"type": "string", "example": "B1234567890"}, "domain": {"type": "string", "example": "bit.ly"}, "keyword": {"type": "string", "example": "bitlySocial"}, "uri": {"type": "string", "example": "bit.ly/m/bitlySocial"}}}, "SiteCloneRequest": {"type": "object", "properties": {"uri": {"type": "string", "example": "bit.ly/m/bitlySocial"}}}, "UpdateSite": {"type": "object", "properties": {"uri": {"type": "string", "description": "The domain and keyword the site is served from. Changing it creates a redirect from the previous URI.", "example": "bit.ly/m/bitlySocial"}, "display_name": {"type": "string", "description": "The name displayed on the site. An empty value clears the current one.", "example": "Bitly Social"}, "description": {"type": "string", "description": "The description displayed on the site. An empty value clears the current one.", "example": "All of our social links in one place"}, "qr_code_id": {"type": "string", "description": "The ID of the QR code to attach to the site. Only allowed when the site does not already have a QR code attached.", "example": "Qabc123"}}}, "BitlySiteContent": {"type": "object", "properties": {"display_name": {"type": "string"}, "description": {"type": "string"}}}, "BitlySiteHeaderAppearance": {"type": "object", "properties": {"banner_type": {"$ref": "#/components/schemas/SiteBannerType"}, "profile_image_size": {"$ref": "#/components/schemas/SiteProfileImageSize"}, "profile_image_shape": {"$ref": "#/components/schemas/SiteProfileImageShape"}, "profile_image_border_size": {"$ref": "#/components/schemas/SiteProfileImageBorderSize"}, "profile_image_type": {"$ref": "#/components/schemas/SiteProfileImageType"}, "profile_image_location": {"$ref": "#/components/schemas/SiteProfileImageLocation"}, "profile_image_overflow": {"type": "boolean"}, "text_location": {"$ref": "#/components/schemas/SiteTextLocation"}, "title_size": {"$ref": "#/components/schemas/SiteTextSizeEnum"}, "title_alignment": {"$ref": "#/components/schemas/SiteTextAlignmentEnum"}, "title_weight": {"$ref": "#/components/schemas/SiteTextWeightEnum"}, "title_border_type": {"$ref": "#/components/schemas/SiteTextBorderTypeEnum"}, "description_size": {"$ref": "#/components/schemas/SiteTextSizeEnum"}, "description_alignment": {"$ref": "#/components/schemas/SiteTextAlignmentEnum"}, "description_weight": {"$ref": "#/components/schemas/SiteTextWeightEnum"}, "description_border_type": {"$ref": "#/components/schemas/SiteTextBorderTypeEnum"}, "header_background_color": {"type": "string"}, "banner_image_url": {"type": "string"}, "header_style_preference": {"$ref": "#/components/schemas/SiteStylePreference"}, "banner_image_alignment": {"$ref": "#/components/schemas/SiteImageAlignment"}}}, "BitlySiteAppearance": {"type": "object", "properties": {"layout_v2": {"type": "integer"}, "header_appearance": {"$ref": "#/components/schemas/BitlySiteHeaderAppearance"}, "theme_id": {"type": "integer"}, "hide_bitly_logo": {"type": "boolean"}, "layout": {"type": "string"}, "font": {"type": "string"}, "style_preference": {"$ref": "#/components/schemas/SiteStylePreference"}, "background_color": {"type": "string"}, "bottom_background_color": {"type": "string"}, "text_color": {"type": "string"}, "description_color": {"type": "string"}, "background_preference": {"type": "string"}, "background_image_alignment": {"$ref": "#/components/schemas/SiteImageAlignment"}, "background_image_url": {"type": "string"}, "background_image_guid": {"type": "string"}, "avatar_image_url": {"type": "string"}, "avatar_image_guid": {"type": "string"}, "default_button_background_color": {"type": "string"}, "default_button_text_color": {"type": "string"}, "default_button_shape": {"type": "string"}, "default_button_shadow": {"type": "string"}, "default_social_icon_color": {"type": "string"}, "default_social_icon_layout": {"type": "string"}, "default_social_icon_position": {"type": "string"}}}, "BitlySite": {"type": "object", "allOf": [{"properties": {"site_guid": {"type": "string"}, "group_guid": {"type": "string"}, "status": {"type": "string"}, "is_edited": {"type": "boolean"}, "url": {"type": "string"}, "content": {"$ref": "#/components/schemas/BitlySiteContent"}, "appearance": {"$ref": "#/components/schemas/BitlySiteAppearance"}, "button_count": {"type": "integer"}, "last_published": {"type": "string"}, "created": {"type": "string"}, "modified": {"type": "string"}, "qr_code_id": {"type": "string"}, "redirects": {"type": "array", "items": {"$ref": "#/components/schemas/SiteRedirects"}}}}]}, "BitlySiteWithBlocks": {"description": "A Bitly Site plus its content blocks. Returned by getSite; the blocks field is only present when the request sets include_blocks to true.\n", "allOf": [{"$ref": "#/components/schemas/BitlySite"}, {"type": "object", "properties": {"blocks": {"type": "array", "description": "The site's draft content blocks, ordered by container and then by sort order within that container. Blocks nested inside a grid or carousel carry that container's ID in container_id. The field is absent unless include_blocks is true, and is an empty array when the site has no blocks.\n\nBlocks taken down by a Bitly admin are not returned. Every other draft block is, including ones that do not appear on the published site: check is_active for blocks that are hidden or scheduled, and is_sample for template placeholders that are still missing their destination. A block with is_sample true never renders on the published site, regardless of is_active.\n", "items": {"$ref": "#/components/schemas/SiteBlock"}}}}]}, "BitlySites": {"type": "object", "required": ["group_guid", "sites"], "properties": {"group_guid": {"type": "string"}, "sites": {"type": "array", "items": {"$ref": "#/components/schemas/BitlySite"}}, "pagination": {"$ref": "#/components/schemas/MicrositePagination"}}}, "PrevalidateYouTubeVideoRequest": {"type": "object", "properties": {"video_id": {"type": "string"}}}, "SiteImageUpload": {"type": "object", "properties": {"image_guid": {"type": "string"}, "url": {"type": "string"}, "image_use": {"type": "string", "enum": ["profile", "background", "banner", "profile_life", "background_live", "banner_live"]}, "crop": {"type": "string", "example": "{\"Min\": {\"X\": 0, \"Y\": 0}, \"Max\": {\"X\": 1, \"Y\": 1}}"}}}, "ImageUploadResponse": {"type": "object", "properties": {"image_url": {"type": "string"}, "image_guid": {"type": "string"}}}, "BulkUpdateRequest": {"type": "object", "required": ["action"], "properties": {"action": {"type": "string", "enum": ["archive", "edit_tags"], "description": "archive or edit_tags"}, "archive": {"type": "boolean"}, "add_tags": {"type": "array", "items": {"type": "string"}}, "remove_tags": {"type": "array", "items": {"type": "string"}}, "links": {"type": "array", "items": {"type": "string"}, "description": "this is limited to 100 bitlink ids"}}, "example": {"action": "edit_tags", "add_tags": ["tag1", "tag2"], "links": ["bit.ly/1234abcd", "bit.ly/5678efgh"]}}, "BulkUpdate": {"type": "object", "properties": {"links": {"type": "array", "items": {"type": "string"}}}}, "QRCBulkUpdateRequest": {"type": "object", "required": ["action"], "properties": {"action": {"type": "string", "enum": ["archive", "edit_tags"], "description": "archive or edit_tags"}, "archive": {"type": "boolean"}, "add_tags": {"type": "array", "items": {"type": "string"}}, "remove_tags": {"type": "array", "items": {"type": "string"}}, "qr_code_ids": {"type": "array", "items": {"type": "string"}, "description": "this is limited to 100 QR code ids; Pages QR codes are not supported"}}, "example": {"action": "edit_tags", "add_tags": ["tag1", "tag2"], "qr_code_ids": ["Qo9id25UxtOcnns", "Qb1a2c3d4e5f6g7"]}}, "QRCBulkUpdate": {"type": "object", "properties": {"qr_code_ids": {"type": "array", "items": {"type": "string"}}}}, "QRCodeDetails": {"type": "object", "properties": {"qrcode_id": {"type": "string"}, "group_guid": {"type": "string"}, "title": {"type": "string"}, "gs1": {"$ref": "#/components/schemas/GS1Metadata"}, "render_customizations": {"$ref": "#/components/schemas/QRCodeCustomizationsPublic"}, "qr_code_type": {"$ref": "#/components/schemas/QRCodeTypeEnum"}, "bitlink_id": {"description": "The bitlink associated with the qr code. Not all qr codes are associated with one.", "type": "string"}, "domain": {"description": "The short domain the qr code redirects from. Present for both bitlink and long_url qr codes.", "type": "string"}, "long_urls": {"description": "A list of destination URLs that the qr code leads to.", "type": "array", "items": {"type": "string"}}, "serialized_content": {"description": "The serialized string of the QR code's content", "type": "string"}, "archived": {"type": "boolean"}, "created": {"type": "string"}, "modified": {"type": "string"}, "expiration_at": {"type": "string", "description": "Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000)"}, "tags": {"description": "A list of tags associated with QR code", "type": "array", "items": {"type": "string"}}, "dynamic_routing": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}, "description": "Dynamic routing rules for this QR code. Only present when at least one rule is configured."}}}, "QRCodeDestination": {"type": "object", "properties": {"bitlink_id": {"type": "string"}, "long_url": {"type": "string"}, "site_id": {"type": "string"}}}, "QRCodeMinimal": {"type": "object", "properties": {"qrcode_id": {"type": "string"}, "group_guid": {"type": "string"}, "title": {"type": "string"}, "is_customized": {"description": "Set to true if the QR code's customization values have been changed from their default setting", "type": "boolean"}, "serialized_content": {"description": "A serialized string of the QR code's content", "type": "string"}, "qr_code_type": {"$ref": "#/components/schemas/QRCodeTypeEnum"}, "long_urls": {"description": "A list of destination URLs that the qr code leads to.", "type": "array", "items": {"type": "string"}}, "bitlink_id": {"description": "The bitlink ID associated with the qr code. Not all qr codes are associated with one.", "type": "string"}, "domain": {"description": "The short domain the qr code redirects from. Present for both bitlink and long_url qr codes.", "type": "string"}, "is_gs1": {"description": "Set to true if QR code has GS1 values.", "type": "boolean"}, "created_by": {"description": "User that created the code.", "type": "string"}, "tags": {"description": "A list of tags associated with QR code", "type": "array", "items": {"type": "string"}}, "archived": {"type": "boolean"}, "expiration_at": {"type": "string", "description": "Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000)"}, "dynamic_routing": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}, "description": "Dynamic routing rules for this QR code. Only present when at least one rule is configured."}, "created": {"type": "string"}, "modified": {"type": "string"}}}, "GS1Metadata": {"description": "Contains GS1 related metadata", "type": "object", "properties": {"values": {"description": "A list of GS1 application identifiers and their values", "type": "array", "items": {"$ref": "#/components/schemas/GS1Value"}}}}, "GS1Value": {"type": "object", "properties": {"key": {"type": "string", "description": "A valid GS1 application identifier, qualifier, attribute, etc."}, "value": {"type": "string", "description": "A syntactically correct value associated with the application identifier in the key field."}}}, "QRCodeCustomizationsPublic": {"description": "Options for customizing a QR Code's appearance", "type": "object", "properties": {"background_color": {"description": "The QR code's background color in hex code format with values for alpha channel", "type": "string", "example": "#ff07d280"}, "dot_pattern_color": {"description": "The QR code's dot pattern color in hex code format", "type": "string", "example": "#ff07d2"}, "dot_pattern_type": {"$ref": "#/components/schemas/QRCodeDotPatternType"}, "corners": {"$ref": "#/components/schemas/QRCodeCorners"}, "gradient": {"$ref": "#/components/schemas/QRCodeGradient"}, "background_gradient": {"$ref": "#/components/schemas/QRCodeGradient"}, "logo": {"$ref": "#/components/schemas/QRCodeLogoPublic"}, "frame": {"$ref": "#/components/schemas/QRCodeFrameRequest"}, "text": {"$ref": "#/components/schemas/QRCodeText"}, "branding": {"$ref": "#/components/schemas/QRCodeBranding"}, "spec_settings": {"$ref": "#/components/schemas/QRCodeSpecSettingsPublic"}}}, "PublicCreateQRCodeRequest": {"description": "Customization and content values for a QR code created through the public API", "type": "object", "required": ["group_guid", "destination"], "properties": {"title": {"type": "string", "description": "The title of the QR Code"}, "group_guid": {"type": "string", "description": "Identify which group to place the QR Code."}, "render_customizations": {"$ref": "#/components/schemas/QRCodeCustomizationsPublic"}, "archived": {"description": "A boolean representing if the QR code should be archived (hidden from the UI) upon creation", "type": "boolean"}, "destination": {"$ref": "#/components/schemas/QRCodeDestination"}, "gs1": {"$ref": "#/components/schemas/GS1Metadata"}, "expiration_at": {"type": "string", "description": "Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year."}, "tags": {"description": "A list of tags to add to the QR code", "type": "array", "items": {"type": "string"}}, "dynamic_routing": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}, "description": "Optional dynamic routing rules for this decoupled QR code. Only supported for long_url destinations. Providing this field replaces all existing rules. Send an empty array to clear all rules."}, "domain": {"type": "string", "default": "bit.ly"}}, "example": {"title": "A QR Code", "group_guid": "Ba1bc23dE4F", "destination": {"bitlink_id": "bit.ly/abc123"}, "archived": false, "tags": ["tag1", "tag2"], "render_customizations": {"background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded", "corners": {"corner_1": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_2": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_3": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}}, "gradient": {"style": "linear", "angle": 45, "colors": [{"color": "#c80404", "offset": 10}, {"color": "#042f86", "offset": 90}], "exclude_corners": false}, "background_gradient": {"style": "radial", "colors": [{"color": "#c696ee", "offset": 25}, {"color": "#d4e1a8", "offset": 50}]}, "logo": {"image_guid": "bitlylogo"}, "frame": {"id": "text_bottom", "colors": {"primary": "#f55656", "background": "#ffffff"}, "text": {"primary": {"content": "QR Frame"}, "secondary": {"content": "Frame Text"}}}, "branding": {"bitly_brand": true}, "spec_settings": {"error_correction": 4}}}}, "PublicCreateStaticQRCodeRequest": {"description": "Request body for generating a static QR code image. Customizations such as gradient, background_gradient, frame, text and logo are not supported.", "type": "object", "required": ["content", "group_guid"], "properties": {"content": {"type": "string", "description": "The raw content to encode in the QR code (e.g. a URL).", "example": "https://bitly.com"}, "group_guid": {"type": "string", "description": "The group (brand) GUID used for access control and analytics.", "example": "Ba1bc23dE4F"}, "render_customizations": {"$ref": "#/components/schemas/QRCodeCustomizationsStaticPublic"}}, "example": {"content": "https://bitly.com", "group_guid": "Ba1bc23dE4F", "render_customizations": {"background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded"}}}, "QRCodeCustomizationsStaticPublic": {"description": "Appearance options for a static QR code. gradient, background_gradient, frame, text, and logo are not supported.", "type": "object", "properties": {"background_color": {"description": "The QR code's background color in hex code format with values for alpha channel", "type": "string", "example": "#ff07d280"}, "dot_pattern_color": {"description": "The QR code's dot pattern color in hex code format", "type": "string", "example": "#ff07d2"}, "dot_pattern_type": {"$ref": "#/components/schemas/QRCodeDotPatternType"}, "corners": {"$ref": "#/components/schemas/QRCodeCorners"}, "branding": {"$ref": "#/components/schemas/QRCodeBranding"}, "spec_settings": {"$ref": "#/components/schemas/QRCodeSpecSettingsPublic"}}}, "PublicStaticQRCodeResponse": {"description": "Response containing a generated static QR code image.", "type": "object", "properties": {"image": {"type": "string", "format": "byte", "description": "The image data, base64-encoded. Format is SVG or PNG depending on the requested format."}}}, "PublicUpdateQRCodeRequest": {"description": "Customization and content values for a QR code created through the public API", "type": "object", "properties": {"title": {"type": "string"}, "render_customizations": {"$ref": "#/components/schemas/QRCodeCustomizationsPublic"}, "archived": {"description": "A boolean representing if the QR code has been archived", "type": "boolean"}, "expiration_at": {"type": "string", "description": "Optional expiration timestamp for the QR code's bitlink (e.g., 2025-01-28T14:30:00+0000). Minimum expiration time is 5 minutes from now and maximum is 1 year."}, "tags": {"description": "A list of tags to add to the QR code", "type": "array", "items": {"type": "string"}}, "dynamic_routing": {"type": "array", "items": {"$ref": "#/components/schemas/DynamicRoutingRule"}, "description": "Dynamic routing rules for this QR code. Providing this field replaces all existing rules. Send an empty array to clear all rules."}}, "example": {"title": "Updated Title", "archived": true, "tags": ["tag1", "tag2"], "render_customizations": {"background_color": "#ffffff", "dot_pattern_color": "#EF8000", "dot_pattern_type": "rounded", "corners": {"corner_1": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_2": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}, "corner_3": {"inner_color": "#EF8000", "outer_color": "#EF8000", "shape": "leaf"}}, "gradient": {"style": "linear", "angle": 45, "colors": [{"color": "#c80404", "offset": 10}, {"color": "#042f86", "offset": 90}], "exclude_corners": false}, "background_gradient": {"style": "radial", "colors": [{"color": "#c696ee", "offset": 25}, {"color": "#d4e1a8", "offset": 50}]}, "logo": {"image_guid": "bitlylogo"}, "frame": {"id": "text_bottom", "colors": {"primary": "#f55656", "background": "#ffffff"}, "text": {"primary": {"content": "QR Frame"}, "secondary": {"content": "Frame Text"}}}, "branding": {"bitly_brand": true}, "spec_settings": {"error_correction": 4}}}}, "PublicQRCodeImageResponse": {"description": "Wraps the image data for a QR code.", "type": "object", "properties": {"qr_code_image": {"description": "The stringified data for the QR code's image", "type": "string"}}}, "QRCodesMinimal": {"description": "QR code paginated list Response", "type": "object", "properties": {"qr_codes": {"type": "array", "items": {"$ref": "#/components/schemas/QRCodeMinimal"}}, "pagination": {"$ref": "#/components/schemas/QRPagination"}}}, "PublicDeleteQRCodeResponse": {"description": "QR Code delete response", "type": "object", "properties": {"qrcodes_deleted": {"type": "array", "items": {"$ref": "#/components/schemas/DeletedQRCode"}}, "links_deleted": {"type": "array", "items": {"$ref": "#/components/schemas/DeletedLink"}}}}, "RedirectQRCodeRequest": {"description": "Request to redirect a QRCode", "type": "object", "required": ["long_url"], "properties": {"long_url": {"type": "string", "example": "https://www.google.com"}}}, "QRCodeCorners": {"description": "An object representing all three corners of the QR code. The corners corresponding to each property are: corner_1 = top left, corner_2 = top right, and corner_3 = bottom right", "type": "object", "properties": {"corner_1": {"$ref": "#/components/schemas/QRCodeCorner"}, "corner_2": {"$ref": "#/components/schemas/QRCodeCorner"}, "corner_3": {"$ref": "#/components/schemas/QRCodeCorner"}}}, "QRCodeCorner": {"description": "Represents one corner, both inner and outer, of a QR code, with color and shape values", "type": "object", "properties": {"inner_color": {"description": "The inner color of a corner of the QR code in hex code format", "type": "string"}, "outer_color": {"description": "The outer color of a corner of the QR code in hex code format", "type": "string"}, "shape": {"description": "The shape one of the QR code's corners should take", "type": "string", "enum": ["standard", "slightly_round", "rounded", "extra_round", "leaf", "leaf_inner", "leaf_outer", "target", "concave"], "default": "standard"}}}, "QRCodeGradient": {"type": "object", "properties": {"style": {"description": "The style of the gradient. Can be either linear or radial.", "type": "string", "enum": ["no_gradient", "linear", "radial"], "default": "no_gradient"}, "angle": {"description": "The angle by which the gradient will be rotated. Only applies to linear gradients.", "type": "number"}, "colors": {"description": "The list of hex colors and their offsets to be used in the gradient.", "type": "array", "items": {"$ref": "#/components/schemas/GradientColor"}}, "exclude_corners": {"description": "Ignore gradient mask on corners", "type": "boolean"}}}, "GradientColor": {"type": "object", "properties": {"color": {"description": "A color in hexadecimal format to be used in one of the gradient's <stop> elements", "type": "string", "example": "#ff0098"}, "offset": {"description": "A number between 0-100 denoting the offset of the gradient color, interpreted as a percentage", "type": "integer", "default": 0}}}, "QRCodeLogoPublic": {"type": "object", "properties": {"image_guid": {"type": "string", "description": "A GUID for an image uploaded to Bitly"}}}, "QRCodeBranding": {"type": "object", "properties": {"bitly_brand": {"description": "A boolean that determines if the QR code should have the bitly brand in its bottom right corner", "type": "boolean"}}}, "QRCodeFrameRequest": {"type": "object", "required": ["id"], "properties": {"id": {"description": "The unique id of the selected frame", "$ref": "#/components/schemas/QRCodeFrameType"}, "colors": {"description": "An object of named colors denoting which color should go to which area of the frame", "type": "object", "properties": {"primary": {"description": "The primary color of the frame in hex code format", "type": "string"}, "secondary": {"description": "The secondary color of the frame in hex code format", "type": "string"}, "background": {"description": "The background color of the frame in hex code format", "type": "string"}}}, "text": {"description": "The text to be inserted into the QR code's frame", "type": "object", "properties": {"primary": {"$ref": "#/components/schemas/Text"}, "secondary": {"$ref": "#/components/schemas/Text"}}}}}, "QRCodeText": {"description": "Contains the center, top, and bottom text to be used in the QR code", "type": "object", "properties": {"center": {"$ref": "#/components/schemas/Text"}, "top": {"$ref": "#/components/schemas/Text"}, "bottom": {"$ref": "#/components/schemas/Text"}}, "example": {"center": {"content": "Some example center text!", "color": "#ff0098", "font": "Helvetica"}, "top": {"content": "Some example bottom text!", "color": "#00ff00", "font": "Helvetica"}, "bottom": {"content": "Some example bottom text!", "color": "#000000", "font": "Helvetica"}}}, "Text": {"description": "An object describing text with color", "type": "object", "required": ["content"], "properties": {"content": {"description": "The text to be used", "type": "string"}, "color": {"description": "The color of the text in hex code format", "type": "string", "default": "#ffffff"}}}, "QRCodeTypeEnum": {"description": "The type of dynamic/static content the QR serves, e.g. Link In Bio page, micro site, bitlink, email, text, Wifi, etc.", "type": "string", "enum": ["bitlink", "long_url", "link_in_bio", "v_card", "wifi", "email", "phone", "text"]}, "DynamicRoutingPlatformEnum": {"description": "Platform (OS) values for use in dynamic routing rules (os_match / os_exclude)", "type": "string", "enum": ["ios", "android"]}, "DynamicRoutingDeviceEnum": {"description": "Device type values for use in dynamic routing rules (device_match / device_exclude)", "type": "string", "enum": ["mobile", "tablet", "desktop"]}, "QRCodeFrameType": {"type": "string", "enum": ["none", "border_only", "text_bottom", "tooltip_bottom", "arrow", "text_top", "text_bottom_in_frame", "script", "text_top_and_bottom", "url", "instagram"], "default": "none"}, "QRCodeDotPatternType": {"type": "string", "enum": ["standard", "circle", "block", "blob", "rounded", "vertical", "horizontal", "triangle", "heart", "star", "diamond"], "default": "standard"}, "QRCodeSpecSettingsPublic": {"description": "The QR code's editable spec settings, which for now is just the error correction", "type": "object", "properties": {"error_correction": {"description": "The amount of error correction that the QR code was generated with", "type": "integer"}}}, "BadRequest": {"description": "BAD_REQUEST", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "UnprocessableEntity": {"description": "UNPROCESSABLE_ENTITY", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "TooManyRequests": {"description": "TOO_MANY_REQUESTS", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "MonthlyLimitExceeded": {"description": "MONTHLY_LIMIT_EXCEEDED", "allOf": [{"$ref": "#/components/schemas/SimplifiedError"}], "example": {"message": "API_USAGE_LIMIT_EXCEEDED"}}, "NotFound": {"description": "NOT_FOUND", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "Conflict": {"description": "CONFLICT", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "UpgradeRequired": {"description": "UPGRADE_REQUIRED", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "Forbidden": {"description": "FORBIDDEN", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "InternalError": {"description": "INTERNAL_ERROR", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "BadGateway": {"description": "BAD_GATEWAY", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "TemporarilyUnavailable": {"description": "TEMPORARILY_UNAVAILABLE", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "ExpectationFailed": {"description": "EXPECTATION_FAILED", "allOf": [{"$ref": "#/components/schemas/Error"}], "example": {"code": "DNS_CONFIGURATION_ERROR"}}, "Timeout": {"description": "TIMEOUT", "allOf": [{"$ref": "#/components/schemas/Error"}]}, "Gone": {"description": "GONE", "allOf": [{"$ref": "#/components/schemas/Error"}]}}}}