· 6 years ago · Sep 26, 2019, 03:54 PM
1{"info": {"termsOfService": "https://bitly.com/pages/terms-of-service", "description": "# Introduction\nWelcome to the Bitly API! If you'd like to use Bitly to shorten, brand, share, or retrieve data from links programmatically, you've come to the right place.\n\nIf you're interested in integrating your app or software platform with Bitly, you'll need to [register and authenticate your service with our API](/app_guidelines.html). To do so please contact us at [API_sales@bit.ly](mailto:API_sales@bit.ly)\n\nWe currently provide our documentation in the form of an OpenAPI 2.0 document. We do not support any code-generation at this time but feel free to use the specification if you would like.\n# Authentication\n## OAuth 2\nIf you are shortening URLs on behalf of end-users, we ask that you use our OAuth 2 implementation to authenticate end-users before shortening. URLs shortened in this manner will be added to the specified end-user\u2019s history, allowing the end-user to manage and track the shortened URLs. To register an OAuth application, see the page on [authentication](/v4/#section/Authentication).\n\nPrevious versions of the API used a query parameter to submit the token. This is no longer applicable in v4.0. Tokens should be made using the OAuth Bearer Token specification, using the Authorization header in the request.\n\nHere is an example: `Authorization: Bearer {token}`.\n\n## OAuth Web Flow\nWeb applications can easily acquire an OAuth access token for a Bitly end user by following these steps:\n1. Register your application [here](https://bitly.com/a/oauth_apps) -- your application will be assigned a `client_id` and a `client_secret`.\n2. Redirect the user to `https://bitly.com/oauth/authorize`, using the `client_id` and `redirect_uri` parameters to pass your client ID and the page you would like to redirect to upon acquiring an access token. You can also pass an optional `state` parameter which will be included unchanged in the redirect. An example redirect URL looks like: `https://bitly.com/oauth/authorize?client_id=...&state=...&redirect_uri=http://myexamplewebapp.com/oauth_page`\n3. Upon authorizing your application, the user is directed to the page specified in the `redirect_uri` parameter. We append a code parameter to this URI that contains a value that can be exchanged for an OAuth access token using the oauth/access_token endpoint documented below. For example, if you passed a redirect_uri value of `http://myexamplewebapp.com/oauth_page`, a successful authentication will redirect the user to `http://myexamplewebapp.com/oauth_page?code=.....` If the state parameter was included in the request, it will be added unchanged to the redirect URI, eg. `http://myexamplewebapp.com/oauth_page?code=...&state=...`\n4. Use the `/oauth/access_token` API endpoint documented below to acquire an OAuth access token, passing the `code` value appended by Bitly to the previous redirect and the same `redirect_uri` value that was used previously. This API endpoint will return an OAuth access token, as well as the specified Bitly user's login and API key, allowing your application to utilize the Bitly API on that user's behalf.\n\nAn example request might look like:\n```\nPOST /oauth/access_token HTTP/1.1\nHost: api-ssl.bitly.com\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&code=CODE&redirect_uri=REDIRECT_URI\n```\n\nAnd an example response:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/x-www-form-urlencoded\nContent-Length: 57\n\naccess_token=TOKEN&login=BITLY_LOGIN&apiKey=BITLY_API_KEY\n```\n\n\n### Parameters for OAuth Web Flow\n\n* `client_id` - your application's Bitly client id.\n* `client_secret` - your application's Bitly client secret.\n* `code` - the OAuth verification code acquired via OAuth's webauthentication protocol.\n* `redirect_uri` - the page to which a user was redirected upon successfully authenticating.\n* `state` - optional state to include in the redirect URI.\n* `grant_type` - optional, if present must be `authorization_code`.\n\n### Response Value\n\nBy default, a URL encoded string in the format of `access_token=%s&login=%s&apiKey=%s`. If you set the `Accept` request header to `application/json`, we'll return a JSON dictionary and appropriate `Content-Type` response header.\n\n* `access_token` - the OAuth access token for specified user.\n* `login` - the end-user's Bitly username.\n\n## Exchanging a Username and Password for an Access Token\n\nThere are two ways to convert a username and password directly into an access token:\n\n* Resource Owner Credentials Grants\n* HTTP Basic Authentication\n\n### Resource Owner Credentials Grants\nBitly supports the [Resource Owner Credential Grant](https://tools.ietf.org/html/rfc6749#section-4.3) flow of the OAuth2 specification to exchange a user's Bitly username and password for an access token.\n\nA `POST` request is made to `/oauth/access_token` with `grant_type` set to `password`, and the `Authorization` header set with the `client_id` and `client_secret`.\n\n***NOTE: You should only make this call once and store the returned token securely. You should not make this call per shorten or at any other high-frequency interval. To protect our users' security, we aggressively rate limit calls to these endpoints.***\n\nFor example:\n\n```\nPOST /oauth/access_token HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW\nContent-Type: application/x-www-form-urlencoded\n\ngrant_type=password&username=bitlyuser&password=bitlypassword\n```\n\nWhere `Authorization:` is set to `\"Basic \" + base64encode(client_id + \":\" + client_secret)`. An example response might look like:\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/javascript; charset=UTF-8\nContent-Length: 60\n\n{\"access_token\": \"e663e30818201d28dd07803e57333bed4f15803a\"}\n```\n\nApplications MUST NOT store the Bitly credentials locally.\n\nYou can use the following `curl` command to generate an access token for your own application (line breaks inserted for readability):\n\n```\ncurl -u \"CLIENT_ID:CLIENT_SECRET\" -d \"grant_type=password\" -d \"username=USERNAME\" \\\n-d \"password=PASSWORD\" https://api-ssl.bitly.com/oauth/access_token\n```\n### Parameters for Resource Owner Credentials Grant Flow\n\n`grant_type` - must be `password`.\n`username` - the user's Bitly username.\n`password` - the user's Bitly password.\n\n\n## HTTP Basic Authentication Flow\nFor some applications it's impractical to use a web flow for access tokens (e.g.: command line scripts). An OAuth access token can be acquired by making a single call to the /oauth/access_token API endpoint documented below. The easiest way to do so is by running the `curl` command also documented below.\n\n```\ncurl -u \"username:password\" -X POST \"https://api-ssl.bitly.com/oauth/access_token\"\n```\n\nApplications using OAuth Basic Authentication Flow **MUST NOT** store Bitly end-user passwords.\n\nSpecifically, applications using this flow should make the authentication call *once* and store the returned access token in a secure manner for use in all subsequent API calls. Frequent calls to this endpoint (e.g. making a call per-shorten) will result in your account getting rate limited.\n\nAn example request:\n```\nPOST /oauth/access_token HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Basic czZCaGRSa3F0MzpnWDF\nContent-Type: application/x-www-form-urlencoded\n\nclient_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET\n```\nAnd an example response:\n\n```\nHTTP/1.1 200 OK\nContent-Type: text/plain\nContent-Length: 40\n\ne663e30818201d28dd07803e57333bed4f15803a\n```\n\n### Parameters for HTTP Basic Authentication flow\n\n* `client_id` - (optional) your application's Bitly client id.\n* `client_secret` - (optional) your application's Bitly client secret.\n* `Authorization` Header with the value `\"Basic \" + base64encode(username + \":\" + password)`\n\n**Note:**\n\n* This request MUST be a HTTP POST request.\n* This endpoint is only available on https://api-ssl.bitly.com/.\n\n## Application using a single account\nMost folks using the Bitly API will be writing one or more applications that are used within a single account, such as a CMS integration or bulk shortening script that creates all short URLs in a single account. For this use case, you don't need to worry about implementing entire OAuth 2.0 flows just to obtain an access token. Instead, you can use our [Generic Access Token](https://bitly.is/accesstoken). Log in to Bitly and navigate to the OAuth Apps page, click \"Generic Access Token\", enter your Bitly password, copy the access token, and paste it into your application for use in making API requests.\n\n\n# Best Practices\n\n## OAUTH TOKEN / API KEY SECURITY\nOAuth access tokens (and API keys) should be treated as secret data and not exposed to any users. To ensure the security of your OAuth access token or API key, we strongly suggest that you make requests to the Bitly API server-side whenever possible.\n\nAny requests to the Bitly API made via client-side JavaScript present the risk of your OAuth token or API key being compromised. It is possible to partially obfuscate the token or key, but anything sent to the browser can be read by a determined user. Most importantly, never include your api_key or access_token inline in the page. Keep any references to your api_key or access_token in code that is contained in external javascript files which are included in the page. For additional security, don't have the key or token itself contained anywhere in your JavaScript code, but rather make an ajax call to load it, and keep it in a variable stored in a privately scoped method.\n\n## URL Encoding\nAll long URLs sent to the Bitly API must be URL encoded, even if these links already contain escaped characters. For more information about URL encoding, see this [Wikipedia article](https://en.wikipedia.org/wiki/Percent-encoding).\n\n## Rate Limiting\nBitly currently institutes per-month, per-hour, per-minute, and per-IP rate limits for each API method, and limits API users to a maximum of five concurrent connections from a single IP address. Our default limits are more than sufficient for nearly all use cases. Please read through this documentation in its entirety to avoid common causes of rate limiting issues. If you would like to increase your rate limits, please [contact us](mailto:API_sales@bit.ly) to find out more about the Bitly Enterprise plan.\nHere are the rate limits of a non-Enterprise account for our most popular API method, /v4/shorten:\n\n* You can find your monthly Bitlink limit by looking at your Account Details within your Bitly account. If you are currently logged in, you can find that <a href=\"https://app.bitly.com/organization/1/detail\" target=\"_blank\">here</a>.\n* 1,000 calls per hour\n* 100 calls per minute\nIf you subscribe to the Enterprise plan, these rates will differ and you should visit the Organization Details within the Bitly dashboard. To access the Organization, click on the Group selector and select \"Manage\" next to the Organization that you would like to see the usage for.\n\nPlease note that some API rate limits reset once each hour. If you are experiencing rate limiting errors, please wait 60 minutes to resume making API calls.\n\nWhen contacting [Bitly Support](mailto:api@bitly.com) include a description of how you are using the Bitly API, which API endpoints you are using, an estimate of current request volumes for a 24 hour period, and the email associated with your Bitly account.\n\n## Timestamps\nThe V4 API uses the following format for timestamps: `[YYYY]-[MM]-[DD]T[HH]:[MM]:[SS]\u00b1hhmm`. Another Example would be: `2006-01-02T15:04:05-0700`.\n## Caching\nSince Bitlinks never change or expire, we ask that you cache data locally wherever possible.\n\n# Migrating from V3\nAt Bity we are always updating our products and technology to make them more modern, secure, efficient, and usable. To that end we are proud to introduce the latest version of the Bitly API 4.0.0 (V4). This documentation will highlight some of the changes that we\u2019ve made and how to adapt your V3 integrations to work with V4.\n## Authentication\nHow you authenticate to the Bitly API has changed with V4. Previously your authentication token would be provided as the **access_token** query parameter on each request. V4 instead requires that the token be provided as part of the Authorization header on each request. For example:\n```\nAuthorization: Bearer {token}\n```\nFor further information including full details on how to request an access token via the API, please see the documentation [here](/v4/#section/Authentication).\n## Group Aware\nWith [Group Permissions](https://support.bitly.com/hc/en-us/articles/115004396107), Bitlinks and other data elements roll up into a group. In V3 you were required to generate a different OAuth token to view each group\u2019s data, but in V4 you can provide the group GUID as part of the request. If you\u2019re not subscribed to the Enterprise plan, you only have a single group associated with your account. If you\u2019re an Enterprise customer, you may have multiple groups associated with your account. These groups can be retrieved via the following request:\n```\nGET https://api-ssl.bitly.com/v4/groups HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Bearer {ACCESS_TOKEN}\nAccept: application/json\n```\nSome endpoints within the application, especially those dealing with Bitlinks and metrics, will require a group GUID to request the data. For example, to request all the bitlinks for a group requires the following request:\n```\nGET https://api-ssl.bitly.com/v4/groups/GUID/bitlinks HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Bearer ACCESS_TOKEN\n```\nThe API also provides a default group GUID on the user. There are endpoints and dashboard functionality available to set this default group GUID. This is used in the event of a group GUID not being provided on shortening calls. The default group GUID is **only** used for shortening endpoints.\n\n**One important note, even if you are a subscriber to the Free Bitly plan, the group GUID will still be required in these requests.**\n## RESTfulness\nThe Bitly V4 API follows the more standard REST convention of utilizing the HTTP response codes to identify the status of the response. These include, but are not limited to:\n* **200 - SUCCESS**\n* **400 - INVALID**\n* **403 - FORBIDDEN**\n* **404 - NOT FOUND**\n* **500 - INTERNAL ERROR**\n\nIn addition, V4 makes better use of the the various methods for submitting data. GET requests will return data, POST requests are for creation, PATCH requests are for modification and DELETE requests are for removal.\n\nA major difference is how the data is delivered. Under V3 responses were contained in a data envelope and would look like this:\n```json\n{\n \u201cstatus_code\u201d: 200,\n \u201cstatus_text\u201d: \u201cSUCCESS\u201d,\n \u201cdata\u201d: {\n //response data object\n }\n}\n```\nV4 instead returns a JSON object containing all the data provided by the response. For example a standard Bitlink response is structured like this:\n```json\n{\n \"references\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"archived\": true,\n \"tags\": [\n \"string\"\n ],\n \"created_at\": \"string\",\n \"title\": \"string\",\n \"deeplinks\": [\n {\n \"bitlink\": \"string\",\n \"install_url\": \"string\",\n \"created\": \"string\",\n \"app_uri_path\": \"string\",\n \"modified\": \"string\",\n \"install_type\": \"string\",\n \"app_guid\": \"string\",\n \"guid\": \"string\",\n \"os\": \"string\"\n }\n ],\n \"created_by\": \"string\",\n \"long_url\": \"string\",\n \"custom_bitlinks\": [\n \"string\"\n ],\n \"link\": \"string\",\n \"id\": \"string\"\n}\n```\nV4 has also simplified how much data is returned on an individual request. Because of the nested nature of some of our data and to improve the overall performance of the API we include a collection of **references** which provide request URLs for returning additional data. For example, here is the **references** collection for a Bitlink:\n```json\n\"references\":{\n \"group\":\"https://api-ssl.bitly.com/v4/groups/GUID\"\n}\n```\nInstead of nesting the full Group object and any additional objects it may reference, this request URL is provided to retrieve that additional data if required.\n\nThe goal of the Bitly V4 API is to improve our customers\u2019 interactions with our platform. With the latest version of the Bitly API, we are implementing standards, reducing complexity, improving documentation, and decreasing the level of effort for integrations. Full documentation for the Bitly V4 API is available below.\n## V3 Documentation\nThe V3 documentation is available [here](/api.html).\n\n# Transitioning from Google\nFor those of you coming to Bitly from Google, welcome! If you formerly used Google to shorten links and retrieve data programmatically, or simply want to start doing so with Bitly, this guide is for you. The Bitly API allows you to shorten, brand, and share links through existing or custom integrations, retrieve link-level and user-level analytics programmatically, and more. For inspiration on how the Bitly API can help you streamline your current processes and user experiences, check out some of its most popular [uses](https://bitly.com/blog/bitly-api/).\n\nMigrating from Google's URL Shortener API to the Bitly API is straightforward and simple, though our API has additional endpoints that offer more options. We'll go through each of those endpoints in detail, but first you'll need to know how to obtain authorization and different levels of access to the Bitly API.\n## Authorization\nSimilar to Google URL Shortener, the Bitly API uses OAuth 2.0 access tokens to identify your application and authorize your account. Unlike Google's tokens, Bitly access tokens do not expire after a set period of time. You can generate a token and reuse it in perpetuity. If your token leaks, you can expire it through our web application.\n\nAn OAuth 2.0 access token both identifies the account and authorizes API endpoint requests.\n### Rate Limits\nYou can find the monthly rate limit for your non-Enterprise Bitly account in your Account Management view on Bitly.com, and you are limited to 1,000 requests to our URL shorten endpoint per hour, and 100 requests to our URL shorten endpoint per minute. Higher limits are available for Enterprise plans, as are additional functionality, including deep linking. If you are interested in an Enterprise account, please contact our [sales team](https://bitly.com/pages/landing/get-enterprise?utm_source=APIDocumentation&utm_medium=BitlyWebsite&utm_campaign=GetStartedForm).\n### Application using a single account\nMost folks using the Bitly API will be writing one or more applications that are used within a single account, such as a CMS integration or bulk shortening script that creates all short URLs in a single account. For this use case, you don't need to worry about implementing entire OAuth 2.0 flows just to obtain an access token. Instead, you can use our [Generic Access Token](https://bitly.is/accesstoken). Log in to Bitly and navigate to the [OAuth Apps page](https://bitly.com/a/oauth_apps), click \"Generic Access Token\", enter your Bitly password, copy the access token, and paste it into your application for use in making API requests.\n### Application designed for multiple users\nFor applications where you expect to have multiple users, each with their own Bitly account, you may need to implement the full OAuth 2.0 web flow, as described on our [Authentication](/v4/#section/Authentication).\n## API Endpoints\nGoogle's URL Shortener has four functions: shortening a long URL, expanding a short URL, retrieving a short URL's analytics, and retrieving a user's link history. The Bitly API has matching API endpoints for shortening, expanding, retrieving link history, and multiple endpoints that allow retrieval of different types of analytics data.\n### Shorten a long URL\nFirst, you will need to retrieve the guid of the group that you would like this Bitlink to belong to.\n```\nGET https://api-ssl.bitly.com/v4/groups HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Bearer {ACCESS_TOKEN}\nAccept: application/json\n```\nYou will get the following response:\n\n```json\n{\n \"groups\": [\n {\n \"references\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"name\": \"string\",\n \"bsds\": [],\n \"created\": \"string\",\n \"is_active\": true,\n \"modified\": \"string\",\n \"organization_guid\": \"string\",\n \"role\": \"string\",\n \"guid\": \"string\"\n }\n ]\n}\n```\nOnce you have the guid for the group that you would like, you are ready to shorten a link. To shorten a long URL `http://google.com/`, send the following request replacing ACCESS_TOKEN and GROUP_GUID with the appropriate values:\n```\nPOST https://api-ssl.bitly.com/v4/shorten HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Bearer ACCESS_TOKEN\nContent-Type: application/json\n{\n \"long_url\": \"http://google.com\",\n \"group_guid\": \"GROUP_GUID\"\n}\n```\nYou will get a response that will contain values like:\n```json\n{\n \"references\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"archived\": true,\n \"tags\": [],\n \"created_at\": \"string\",\n \"title\": \"string\",\n \"deeplinks\": [],\n \"created_by\": \"string\",\n \"long_url\": \"string\",\n \"custom_bitlinks\": [],\n \"link\": \"string\",\n \"id\": \"string\"\n}\n```\n### Expand a Bitlink\nTo expand a short URL http://bit.ly/ze6poY, send the following request:\n```\nPOST https://api-ssl.bitly.com/v4/expand HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Bearer ACCESS_TOKEN\nContent-Type: application/json\n{\n \"bitlink_id\": \"bit.ly/ze6poY\",\n}\n\n```\nand you will receive the following response:\n```json\n{\n \"long_url\": \"http://google.com/\",\n \"id\": \"bit.ly/ze6poY\",\n \"link\": \"http://bit.ly/ze6poY\",\n \"created_at\": \"2012-03-12T16:18:23+0000\"\n}\n```\n### Retrieving your Group's Bitlink History\nYou can only retrieve the link history for the group guid. To retrieve your link history, send the following request:\n```\nGET https://api-ssl.bitly.com/v4/groups/:guid/bitlinks HTTP/1.1\nHost: api-ssl.bitly.com\nAuthorization: Bearer ACCESS_TOKEN\n```\nand you will get an example response:\n```json\n{\n \"links\": [\n {\n \"references\": {\n \"property1\": \"string\",\n \"property2\": \"string\"\n },\n \"archived\": true,\n \"tags\": [],\n \"created_at\": \"string\",\n \"title\": \"string\",\n \"deeplinks\": [],\n \"created_by\": \"string\",\n \"long_url\": \"string\",\n \"custom_bitlinks\": [],\n \"link\": \"string\",\n \"id\": \"string\"\n }\n ],\n \"pagination\": {\n \"total\": 1,\n \"size\": 50,\n \"prev\": \"string\",\n \"page\": 1,\n \"next\": \"string\"\n }\n}\n```\nAs part of the response, you will see a field output `total` under pagination, which tells you how many links are in your history. By default results are paginated, with the default page size being 50 results returned. You can add `size` and `page` parameters to the query to control the number of results returned, and which page of results to return. Full documentation for the endpoint is available at [/v4/groups/:guid/bitlinks](/v4/#operation/getBitlinksByGroup).\n\n## Analytics\nGoogle provides analytics that are all wrapped into a single call, including all-time totals of clicks on the specific short URL, clicks on the long URL, referrers counts, clicks by country, clicks by browser and platform, and most-recent clicks for the last month, week, day and last two hours. Bitly's API breaks these analytics out into different endpoints and combinations of calls.\n\n### Clicks\nThe primary endpoint you will need for retrieving click counts is [/v4/bitlinks/:bitlink/clicks](/v4/#operation/getClicksForBitlink). By varying the query parameters you include, you can control the time period for which you want to retrieve clicks. The parameters you will need to use are `unit`, `units`, and `unit_reference`.\n\nThe `unit` parameter controls the scope of the request, and can be `month`, `week`, `day`, `hour`, or `minute`. The parameter defaults to `day`.\n\nThe `units` parameter controls the number of units to count backwards, and must be a positive integer or -1. The default for units is -1, which means 'for all time'.\n\nThese three units are a bit complicated, so they deserve a few examples to make things clear. For our first example, we want to know clicks for all time, so we use the defaults, `day`, `-1` and `now`. We can omit the parameters entirely, since we are asking for default values:\n```\nGET https://api-ssl.bitly.com/v4/bitlinks/:bitlink/clicks HTTP/1.1 Host: api-ssl.bitly.com Authorization: Bearer ACCESS_TOKEN\n```\nand we receive the following response:\n```\n{\n \"units\": -1,\n \"unit_reference\": \"string\",\n \"unit\": \"day\",\n \"link_clicks\": [\n {\n \"date\": \"string\",\n \"clicks\": 0\n }\n ]\n}\n```\n### Clicks per referrer\nTo retrieve clicks per referrer, your primary endpoint should be [/v4/bitlinks/:bitlink/referrers](/v4/#operation/getMetricsForBitlinkByReferrers). This endpoint will return click counts per referring domain. The endpoint, much like [/v4/bitlinks/:bitlink/clicks](/v4/#operation/getClicksForBitlink), also takes `unit`, `units` and `unit_reference` to establish the time period for which you want to retrieve data.\nWe also have additional endpoints for referrer information, [/v4/bitlinks/:bitlink/referrers](/v4/#operation/getMetricsForBitlinkByReferrers) and /v4/bitlinks/:bitlink/referrers_by_domain. The /v3/link/referrers endpoint will return specific referring web pages and their referring click counts, and /v3/link/referrers_by_domain groups the same data by domain. However, these endpoints have significantly lower rate limits than [/v4/bitlinks/:bitlink/referring_domains](/v4/#operation/getMetricsForBitlinkByReferringDomains), so if the information returned by /v3/link/referring_domains meets your needs, you are better off using that endpoint. You will be able to make more calls and retrieve more information.\n\n### Clicks per country\nTo retrieve clicks per country, you will call [/bitlinks/:bitlink/countries](v4/#operation/getMetricsForBitlinkByCountries). This endpoint also takes `unit`, `units` and `unit_reference` to specify the time period. The returned data consists of a list of two-letter country codes and the number of clicks per country.\n### Clicks by operating system or platform\nBitly does not currently offer API endpoints to retrieve clicks by operating system or platform. Instead, we offer that information as part of our [data stream](mailto:API_sales@bit.ly), an option we offer to our paid customers.\n", "license": {"url": "http://www.apache.org/licenses/LICENSE-2.0.html", "name": "Apache 2.0"}, "title": "Bitly API", "version": "4.0.0", "contact": {"email": "api@bitly.com"}, "x-logo": {"url": "/v4/header-logo.png"}}, "paths": {"/custom_bitlinks/{custom_bitlink}": {"patch": {"x-premium": true, "responses": {"422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/CustomBitlink"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/CustomBitlink"}, {"$ref": "#/parameters/UpdateCustomBitlink"}], "tags": ["Custom Bitlinks"], "produces": ["application/json"], "summary": "Update Custom Bitlink", "operationId": "updateCustomBitlink", "description": "Move a Keyword to a different Bitlink"}, "get": {"x-premium": true, "responses": {"402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/CustomBitlink"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}}, "parameters": [{"$ref": "#/parameters/CustomBitlink"}], "tags": ["Custom Bitlinks"], "produces": ["application/json"], "summary": "Retrieve Custom Bitlink", "operationId": "getCustomBitlink", "description": "Retrieve the details and history of a Custom Bitlink"}}, "/bitlinks/{bitlink}/qr": {}, "/domains/{domain}/register": {}, "/campaigns/{campaign_guid}/clicks": {}, "/custom_domains/{custom_domain}": {}, "/groups/{group_guid}/tags": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Tags"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}], "tags": ["Groups"], "operationId": "getGroupTags", "produces": ["application/json"], "summary": "Retrieve Tags by Group", "description": "Retrieve the currently used tags for a group"}}, "/organizations/{organization_guid}/payment_invoices": {"get": {"description": "make a call to billing provider to get a payment invoice summary", "tags": ["organizations", "billing"], "responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/PaymentInvoices"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/OrganizationGUID"}], "operationId": "getPaymentInvoices"}}, "/deeplinks/rules/{deeplink_rule_guid}": {}, "/deeplinks/apps/{deeplink_app_guid}": {}, "/custom_domains": {}, "/apps/{client_id}": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/OAuthApp"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/ClientID"}], "produces": ["application/json"], "operationId": "getOAuthApp", "summary": "Retrieve OAuth App", "description": "Retrieve the details for the provided OAuth App client ID"}}, "/channels": {"post": {"x-premium": true, "responses": {"422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Channel"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/ChannelModify"}], "produces": ["application/json"], "tags": ["Campaigns"], "summary": "Create Channel", "operationId": "createChannel", "description": "Create a new channel"}, "get": {"x-premium": true, "responses": {"402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Channels"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}}, "parameters": [{"$ref": "#/parameters/GroupGUIDFilter"}, {"$ref": "#/parameters/CampaignGUIDFilter"}], "produces": ["application/json"], "tags": ["Campaigns"], "summary": "Retrieve Channels", "operationId": "getChannels", "description": "Retrieve the channels available to a user"}}, "/groups/{group_guid}/referring_networks": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ClickMetrics"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}], "produces": ["application/json"], "operationId": "GetGroupMetricsByReferringNetworks", "tags": ["Groups"], "summary": "Get Click Metrics for a Group by referring networks", "description": "This endpoint will return metrics about the referring network click traffic rolled up to a Group"}}, "/bitlinks/{bitlink}/countries": {"get": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ClickMetrics"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}, {"$ref": "#/parameters/TimeUnit"}, {"$ref": "#/parameters/UnitAmount"}, {"$ref": "#/parameters/Size"}, {"$ref": "#/parameters/UnitReferenceTimeStamp"}], "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByCountries", "produces": ["application/json"], "summary": "Get Metrics for a Bitlink by countries", "description": "This endpoint will return metrics about the countries referring click traffic to a single Bitlink."}}, "/bitlinks/{bitlink}/clicks": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Clicks"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}, {"$ref": "#/parameters/TimeUnit"}, {"$ref": "#/parameters/UnitAmount"}, {"$ref": "#/parameters/Size"}, {"$ref": "#/parameters/UnitReferenceTimeStamp"}], "tags": ["Bitlinks"], "operationId": "getClicksForBitlink", "produces": ["application/json"], "summary": "Get Clicks for a Bitlink", "description": "This will return the click counts for a specified Bitlink. This returns an array with clicks based on a date."}}, "/deeplinks/bitlinks/{bitlink}/metrics/rollup": {}, "/groups/{group_guid}/shorten_counts": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Metrics"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}], "produces": ["application/json"], "operationId": "getGroupShortenCounts", "tags": ["Groups"], "summary": "Retrieve Group Shorten Counts", "description": "Get all the shorten counts for a specific group"}}, "/groups": {"get": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Groups"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/OrganizationGUIDFilter"}], "tags": ["Groups"], "operationId": "getGroups", "produces": ["application/json"], "summary": "Retrieve Groups", "description": "Retrieve a list of Groups"}}, "/organizations/{organization_guid}/payment_invoices/{invoiceID}": {}, "/deeplinks/bitlinks/{bitlink}/rules": {}, "/organizations/{organization_guid}/access_features": {}, "/domains/{domain}/status": {}, "/organizations": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Organizations"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "produces": ["application/json"], "operationId": "getOrganizations", "tags": ["Organizations"], "summary": "Retrieve Organizations", "description": "Retrieve a list of organizations"}}, "/tiers": {}, "/organizations/{organization_guid}/shorten_counts": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Metrics"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/OrganizationGUID"}], "produces": ["application/json"], "operationId": "getOrganizationShortenCounts", "tags": ["Organizations"], "summary": "Retrieve Organization Shorten Counts", "description": "Retrieve all the shorten counts for a specific organization"}}, "/user": {"patch": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/User"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/User"}], "tags": ["User"], "operationId": "updateUser", "produces": ["application/json"], "summary": "Update a User", "description": "Update fields in the user"}, "get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/User"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "tags": ["User"], "operationId": "getUser", "produces": ["application/json"], "summary": "Retrieve a User", "description": "Retrive information for the current authenticated user"}}, "/bsds": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/BSDsResponse"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"headers": {"X-Ratelimit-Reason": {"type": "string", "description": "An explanation of the ratelimit received."}}, "description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "produces": ["application/json"], "operationId": "getBSDs", "tags": ["BSDs"], "summary": "Get BSDs", "description": "Fetch all Branded Short Domains"}}, "/domains/{domain}/agreements": {}, "/groups/{group_guid}/preferences": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/GroupPreferences"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}], "produces": ["application/json"], "operationId": "getGroupPreferences", "tags": ["Groups"], "summary": "Retrieve Group Preferences", "description": "Retrieve preferences for a specific group"}, "patch": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/GroupPreferences"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}, {"$ref": "#/parameters/GroupPreferences"}], "produces": ["application/json"], "operationId": "updateGroupPreferences", "tags": ["Groups"], "summary": "Update Group Preferences", "description": "Update preferences for a specific group"}}, "/expand": {"post": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ExpandedBitlink"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/ExpandBitlink"}], "produces": ["application/json"], "operationId": "expandBitlink", "tags": ["Bitlinks"], "summary": "Expand a Bitlink", "description": "This endpoint returns public information for a Bitlink."}}, "/groups/{group_guid}/bitlinks_count/rollup": {}, "/bsds/search": {}, "/organizations/{organization_guid}": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Organization"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/OrganizationGUID"}], "tags": ["Organizations"], "operationId": "getOrganization", "produces": ["application/json"], "summary": "Retrieve an Organization", "description": "Retrive details for an organization"}}, "/bitlinks/{bitlink}/referrers": {"get": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ClickMetrics"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}, {"$ref": "#/parameters/TimeUnit"}, {"$ref": "#/parameters/UnitAmount"}, {"$ref": "#/parameters/Size"}, {"$ref": "#/parameters/UnitReferenceTimeStamp"}], "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByReferrers", "produces": ["application/json"], "summary": "Get Metrics for a Bitlink by referrers", "description": "This endpoint will return metrics about the referrers referring click traffic to a single Bitlink."}}, "/organizations/{organization_guid}/billing_info": {}, "/bitlinks": {"post": {"responses": {"417": {"headers": {"X-Bsd-Error": {"type": "string", "description": "An explanation of the DNS error recieved"}}, "description": "EXPECTATION_FAILED", "schema": {"$ref": "#/definitions/ExpectationFailed"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Bitlink"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/FullShorten"}], "tags": ["Bitlinks"], "operationId": "createFullBitlink", "produces": ["application/json"], "summary": "Create a Bitlink", "description": "Convert a long url to a Bitlink and set additional parameters"}}, "/tiers/{TierName}": {}, "/sso/organizations/{organization_guid}/settings": {}, "/custom_bitlinks": {"post": {"responses": {"409": {"description": "Conflict", "schema": {"$ref": "#/definitions/Error"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/CustomBitlink"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}}, "parameters": [{"$ref": "#/parameters/AddCustomBitlink"}], "tags": ["Custom Bitlinks"], "operationId": "addCustomBitlink", "produces": ["application/json"], "summary": "Add Custom Bitlink", "description": "Add a Keyword to a Bitlink"}}, "/groups/{group_guid}/bitlinks": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Bitlinks"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}, {"$ref": "#/parameters/Size"}, {"$ref": "#/parameters/Page"}, {"$ref": "#/parameters/Keyword"}, {"$ref": "#/parameters/Query"}, {"$ref": "#/parameters/CreatedBefore"}, {"$ref": "#/parameters/CreatedAfter"}, {"$ref": "#/parameters/ModifiedAfter"}, {"$ref": "#/parameters/Archived"}, {"$ref": "#/parameters/Deeplinks"}, {"$ref": "#/parameters/DomainDeeplinks"}, {"$ref": "#/parameters/FilterCampaignGUID"}, {"$ref": "#/parameters/FilterChannelGUID"}, {"$ref": "#/parameters/FilterCustomBitlink"}, {"$ref": "#/parameters/Tags"}, {"$ref": "#/parameters/EncodingLogin"}], "tags": ["Groups", "Bitlinks"], "operationId": "getBitlinksByGroup", "produces": ["application/json"], "summary": "Retrieve Bitlinks by Group", "description": "Retrieve a paginated collection of Bitlinks for a Group"}}, "/deeplinks/rules": {}, "/campaigns": {"post": {"x-premium": true, "responses": {"422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Campaign"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/CampaignModify"}], "produces": ["application/json"], "tags": ["Campaigns"], "summary": "Create Campaign", "operationId": "createCampaign", "description": "Create a new campaign"}, "get": {"x-premium": true, "responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Campaigns"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "502": {"description": "BAD_GATEWAY", "schema": {"$ref": "#/definitions/BadGateway"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/GroupGUIDFilter"}], "produces": ["application/json"], "tags": ["Campaigns"], "summary": "Retrieve Campaigns", "operationId": "getCampaigns", "description": "Retrieve the campaigns for the current user"}}, "/groups/{group_guid}/countries": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ClickMetrics"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}], "produces": ["application/json"], "operationId": "getGroupMetricsByCountries", "tags": ["Groups"], "summary": "Get Click Metrics for a Group by countries", "description": "This endpoint will return metrics about the countries referring click traffic rolled up to a Group"}}, "/share_accounts/{group_guid}": {}, "/bitlinks/{bitlink}/clicks/summary": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ClicksSummary"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}, {"$ref": "#/parameters/TimeUnit"}, {"$ref": "#/parameters/UnitAmount"}, {"$ref": "#/parameters/Size"}, {"$ref": "#/parameters/UnitReferenceTimeStamp"}], "tags": ["Bitlinks"], "operationId": "getClicksSummaryForBitlink", "produces": ["application/json"], "summary": "Get Clicks Summary for a Bitlink", "description": "This will return the click counts for a specified Bitlink. This rolls up all the data into a single field of clicks."}}, "/users": {}, "/custom_bitlinks/{custom_bitlink}/clicks_by_destination": {"get": {"x-premium": true, "responses": {"402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ClickMetrics"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}}, "parameters": [{"$ref": "#/parameters/CustomBitlink"}], "tags": ["Custom Bitlinks"], "produces": ["application/json"], "summary": "Get Metrics for a Custom Bitlink by destination", "operationId": "getCustomBitlinkMetricsByDestination", "description": "Get Click Metrics for a Custom Bitlink by historical Bitlink destinations"}}, "/events": {}, "/share": {}, "/bitlinks/{bitlink}": {"patch": {"responses": {"422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Bitlink"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}, {"$ref": "#/parameters/BitlinkBody"}], "tags": ["Bitlinks"], "operationId": "updateBitlink", "produces": ["application/json"], "summary": "Update a Bitlink", "description": "Update fields in the Bitlink"}, "get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Bitlink"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}], "produces": ["application/json"], "operationId": "getBitlink", "tags": ["Bitlinks"], "summary": "Retrieve a Bitlink", "description": "This endpoint returns information for a Bitlink."}}, "/campaigns/{campaign_guid}": {"get": {"x-premium": true, "responses": {"402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Campaign"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}}, "parameters": [{"$ref": "#/parameters/CampaignGUID"}], "produces": ["application/json"], "tags": ["Campaigns"], "summary": "Retrieve a Campaign", "operationId": "getCampaign", "description": "Retrive details for a campaign"}, "patch": {"x-premium": true, "responses": {"422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Campaign"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/CampaignGUID"}, {"$ref": "#/parameters/CampaignModify"}], "produces": ["application/json"], "tags": ["Campaigns"], "summary": "Update Campaign", "operationId": "updateCampaign", "description": "Update a campaign's details"}}, "/domains": {}, "/shorten": {"post": {"responses": {"417": {"headers": {"X-Bsd-Error": {"type": "string", "description": "An explanation of the DNS error recieved"}}, "description": "EXPECTATION_FAILED", "schema": {"$ref": "#/definitions/ExpectationFailed"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"headers": {"X-Bsd-Error": {"type": "string", "description": "An explanation of the DNS error recieved"}}, "description": "SUCCESS", "schema": {"$ref": "#/definitions/Bitlink"}}, "201": {"headers": {"X-Bsd-Error": {"type": "string", "description": "An explanation of the DNS error recieved"}}, "description": "CREATED", "schema": {"$ref": "#/definitions/Bitlink"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"headers": {"X-Ratelimit-Reason": {"type": "string", "description": "An explanation of the ratelimit received."}}, "description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/Shorten"}], "tags": ["Bitlinks"], "operationId": "createBitlink", "produces": ["application/json"], "summary": "Shorten a Link", "description": "Convert a long url to a Bitlink"}}, "/deeplinks/apps": {}, "/users/{login}/delete": {}, "/custom_domains/{custom_domain}/appassociations": {}, "/bitlinks/{bitlink}/referrers_by_domains": {"get": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ReferrersByDomains"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}, {"$ref": "#/parameters/TimeUnit"}, {"$ref": "#/parameters/UnitAmount"}, {"$ref": "#/parameters/Size"}, {"$ref": "#/parameters/UnitReferenceTimeStamp"}], "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByReferrersByDomains", "produces": ["application/json"], "summary": "Get Metrics for a Bitlink by referrers by domain", "description": "This endpoint will group referrers metrics about a single Bitlink."}}, "/shareable_reports": {}, "/users/{login}/groups": {}, "/sso/slugs/{url_slug}": {}, "/organizations/{organization_guid}/payment_methods": {}, "/groups/{group_guid}/bitlinks/{sort}": {"get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/SortedLinks"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}, {"$ref": "#/parameters/Sort"}, {"$ref": "#/parameters/TimeUnit"}, {"$ref": "#/parameters/UnitAmount"}, {"$ref": "#/parameters/UnitReferenceTimeStamp"}, {"$ref": "#/parameters/Size"}], "produces": ["application/json"], "operationId": "getSortedBitlinks", "tags": ["Groups", "Bitlinks"], "summary": "Retrieve Sorted Bitlinks for Group", "description": "This will retrieve a paginated response for Bitlinks that are sorted for the Group"}}, "/organizations/{organization_guid}/billing_account": {}, "/org_emails": {}, "/bitlinks/{bitlink}/referring_domains": {"get": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/ClickMetrics"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/Bitlink"}, {"$ref": "#/parameters/TimeUnit"}, {"$ref": "#/parameters/UnitAmount"}, {"$ref": "#/parameters/Size"}, {"$ref": "#/parameters/UnitReferenceTimeStamp"}], "tags": ["Bitlinks"], "operationId": "getMetricsForBitlinkByReferringDomains", "produces": ["application/json"], "summary": "Get Metrics for a Bitlink by referring domains", "description": "This endpoint will rollup the click counts to a referrer about a single Bitlink."}}, "/groups/{group_guid}": {"patch": {"responses": {"400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Group"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}, {"$ref": "#/parameters/Group"}], "tags": ["Groups"], "operationId": "updateGroup", "produces": ["application/json"], "summary": "Update a Group", "description": "Update the details of a group"}, "get": {"responses": {"200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Group"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "parameters": [{"$ref": "#/parameters/GroupGUID"}], "tags": ["Groups"], "operationId": "getGroup", "produces": ["application/json"], "summary": "Retrieve a Group", "description": "Retrive details for a group"}, "delete": {"responses": {"204": {"description": "SUCCESS"}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}}, "x-internal-only": true, "produces": ["application/json"], "operationId": "deleteGroup", "tags": ["Groups"], "summary": "Delete a Group", "parameters": [{"$ref": "#/parameters/GroupGUID"}], "description": "deletes a group"}}, "/channels/{channel_guid}": {"get": {"x-premium": true, "responses": {"402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Channel"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}}, "parameters": [{"$ref": "#/parameters/ChannelGUID"}], "produces": ["application/json"], "tags": ["Campaigns"], "summary": "Get A Channel", "operationId": "getChannel", "description": "Get a channel's details"}, "patch": {"x-premium": true, "responses": {"422": {"description": "UNPROCESSABLE_ENTITY", "schema": {"$ref": "#/definitions/UnprocessableEntity"}}, "200": {"description": "SUCCESS", "schema": {"$ref": "#/definitions/Channel"}}, "400": {"description": "BAD_REQUEST", "schema": {"$ref": "#/definitions/BadRequest"}}, "402": {"description": "UPGRADE_REQUIRED", "schema": {"$ref": "#/definitions/UpgradeRequired"}}, "403": {"description": "FORBIDDEN", "schema": {"$ref": "#/definitions/Forbidden"}}, "404": {"description": "NOT_FOUND", "schema": {"$ref": "#/definitions/NotFound"}}, "503": {"description": "TEMPORARILY_UNAVAILABLE", "schema": {"$ref": "#/definitions/TemporarilyUnavailable"}}, "500": {"description": "INTERNAL_ERROR", "schema": {"$ref": "#/definitions/InternalError"}}}, "parameters": [{"$ref": "#/parameters/ChannelGUID"}, {"$ref": "#/parameters/ChannelModify"}], "tags": ["Campaigns"], "operationId": "updateChannel", "summary": "Update A Channel", "description": "Update an existing Channel"}}, "/groups/{group_guid}/bitlinks_count": {}, "/organizations/{organization_guid}/consumable_features": {}}, "schemes": ["https"], "parameters": {"ModifiedAfter": {"in": "query", "type": "integer", "description": "Timestamp as an integer unix epoch", "name": "modified_after"}, "ChannelGUID": {"required": true, "type": "string", "description": "A GUID for a Bitly Channel", "in": "path", "name": "channel_guid"}, "Archived": {"description": "Whether or not to include archived bitlinks", "default": "off", "enum": ["on", "off", "both"], "in": "query", "type": "string", "name": "archived"}, "Group": {"schema": {"$ref": "#/definitions/GroupUpdate"}, "required": true, "description": "The object used for updating a group", "name": "group", "in": "body"}, "UpdateBillingInfo": {"schema": {"$ref": "#/definitions/BillingInfo"}, "required": true, "name": "updateBillingInfo", "in": "body"}, "SSOVerifySlug": {"required": true, "type": "string", "description": "A potential slug for SSO", "in": "path", "name": "url_slug"}, "PurchaseBSD": {"schema": {"$ref": "#/definitions/PurchaseBSD"}, "required": true, "description": "the object used to purchase a bsd", "name": "purchase_bsd", "in": "body"}, "Deeplinks": {"description": "Filter to only Bitlinks that contain deeplinks", "default": "both", "enum": ["on", "off", "both"], "in": "query", "type": "string", "name": "deeplinks"}, "Shorten": {"schema": {"$ref": "#/definitions/Shorten"}, "required": true, "description": "The object used to create a Bitlink", "name": "shorten", "in": "body"}, "FilterCampaignGUID": {"in": "query", "type": "string", "description": "Filter to return only links for the given campaign GUID, can be provided", "name": "campaign_guid"}, "CreateShare": {"schema": {"$ref": "#/definitions/CreateShare"}, "required": true, "description": "The object used to create a share", "name": "create_share", "in": "body"}, "TierName": {"required": true, "type": "string", "description": "The name of a pricing plan", "in": "path", "name": "TierName"}, "ExpandBitlink": {"schema": {"$ref": "#/definitions/ExpandBitlink"}, "required": true, "description": "The object used to expand a Bitlink", "name": "expand_bitlink", "in": "body"}, "FilterChannelGUID": {"in": "query", "type": "string", "description": "Filter to return only links for the given channel GUID, can be provided, overrides all other parameters", "name": "channel_guid"}, "CampaignGUID": {"required": true, "type": "string", "description": "A GUID for a Bitly campaign", "in": "path", "name": "campaign_guid"}, "DomainDeeplinks": {"description": "Filter to only Bitlinks that contain deeplinks configured with a custom domain", "default": "both", "enum": ["on", "off", "both"], "in": "query", "type": "string", "name": "domain_deeplinks"}, "OrganizationGUIDFilter": {"in": "query", "type": "string", "description": "A GUID for a Bitly rganization", "name": "organization_guid"}, "LoginFilter": {"required": true, "type": "string", "description": "The login for a Bitly user", "in": "query", "name": "login"}, "GroupGUIDFilter": {"in": "query", "type": "string", "description": "A GUID for a Bitly group", "name": "group_guid"}, "GroupPreferences": {"schema": {"$ref": "#/definitions/GroupPreferences"}, "required": true, "description": "The object used to update group preferences", "name": "group_preferences", "in": "body"}, "EncodingLogin": {"description": "Filter by the login of the authenticated user that created the Bitlink", "items": {"type": "string"}, "collectionFormat": "multi", "in": "query", "type": "array", "name": "encoding_login"}, "CampaignGUIDFilter": {"in": "query", "type": "string", "description": "A GUID for a Bitly campaign", "name": "campaign_guid"}, "OrgEmailBody": {"schema": {"$ref": "#/definitions/OrgEmailBody"}, "required": true, "description": "an org email", "name": "orgEmailBody", "in": "body"}, "Tags": {"description": "filter by given tags", "items": {"type": "string"}, "collectionFormat": "multi", "in": "query", "type": "array", "name": "tags"}, "CustomDomain": {"required": true, "type": "string", "description": "find out more about your custom domain", "in": "path", "name": "custom_domain"}, "ExtendedResults": {"default": false, "in": "query", "type": "boolean", "description": "fetch more results from search that can be complimentary", "name": "extended_results"}, "ClientID": {"required": true, "type": "string", "description": "The client ID of an OAuth app", "in": "path", "name": "client_id"}, "FilterCustomBitlink": {"default": "both", "enum": ["on", "off", "both"], "type": "string", "name": "custom_bitlink", "in": "query"}, "Sort": {"enum": ["clicks"], "description": "The type of sorting that you would like to do", "required": true, "in": "path", "type": "string", "name": "sort"}, "CreatedBefore": {"in": "query", "type": "integer", "description": "Timestamp as an integer unix epoch", "name": "created_before"}, "UnitReferenceTimeStamp": {"required": false, "type": "string", "description": "An ISO-8601 timestamp, indicating the most recent time for which to pull metrics. Will default to current time.", "in": "query", "name": "unit_reference"}, "CustomBitlink": {"required": true, "type": "string", "description": "A Custom Bitlink made of the domain and keyword", "in": "path", "name": "custom_bitlink"}, "Domain": {"required": true, "type": "string", "description": "a web domain", "in": "path", "name": "domain"}, "CampaignModify": {"schema": {"$ref": "#/definitions/CampaignModify"}, "required": true, "description": "The object used for creating/updating a campaign", "name": "campaign", "in": "body"}, "User": {"schema": {"$ref": "#/definitions/UserUpdate"}, "required": true, "description": "The object used for updating a user", "name": "user", "in": "body"}, "SSOSettings": {"schema": {"$ref": "#/definitions/SSOSettings"}, "required": true, "description": "The object used for updating SSO Settings", "name": "sso_settings", "in": "body"}, "InvoiceID": {"required": true, "type": "string", "name": "invoiceID", "in": "path"}, "DeeplinkAppGUID": {"required": true, "type": "string", "description": "the guid reference to a deeplink app", "in": "path", "name": "deeplink_app_guid"}, "Keyword": {"in": "query", "type": "string", "description": "Custom keyword to filter on history entries", "name": "keyword"}, "UnitAmount": {"description": "An integer representing the time units to query data for. pass -1 to return all units of time.", "default": -1, "required": true, "in": "query", "type": "integer", "name": "units"}, "GroupGUID": {"required": true, "type": "string", "description": "A GUID for a Bitly group", "in": "path", "name": "group_guid"}, "ShareableReport": {"required": true, "type": "string", "description": "Shareable Report URL to validate", "in": "query", "name": "shareable_report"}, "FetchPrice": {"default": false, "in": "query", "type": "boolean", "description": "Include pricing information for a domain", "name": "fetch_price"}, "DeactivateUser": {"schema": {"$ref": "#/definitions/DeactivateUser"}, "required": true, "description": "the object used to deactivate a user", "name": "deactivate_user", "in": "body"}, "Limit": {"in": "query", "type": "integer", "description": "limit the amount of results returned", "name": "limit"}, "Query": {"in": "query", "type": "string", "description": "the value that you would like to search", "name": "query"}, "Organization": {"schema": {"$ref": "#/definitions/Organization"}, "required": true, "description": "The object used for updating an organization", "name": "organization", "in": "body"}, "Login": {"required": true, "type": "string", "description": "The login for a Bitly user", "in": "path", "name": "login"}, "Page": {"default": 1, "in": "query", "type": "integer", "description": "Integer specifying the numbered result at which to start", "name": "page"}, "UpdateCustomBitlink": {"schema": {"$ref": "#/definitions/UpdateCustomBitlink"}, "required": true, "description": "The object used to update a custom Bitlink", "name": "update_custom_bitlink", "in": "body"}, "Bitlink": {"required": true, "type": "string", "description": "A Bitlink made of the domain and hash", "in": "path", "name": "bitlink"}, "DeeplinkApp": {"schema": {"$ref": "#/definitions/MinimalDeeplinkApp"}, "required": true, "description": "the body which can be modified for a deeplink app object", "name": "deeplink_app", "in": "body"}, "BitlinkBody": {"schema": {"$ref": "#/definitions/Bitlink"}, "required": true, "description": "The object used to update attributes on a Bitlink", "name": "bitlink_body", "in": "body"}, "CreatePaymentMethodRequest": {"schema": {"$ref": "#/definitions/CreatePaymentMethodRequest"}, "required": true, "name": "createPaymentMethodRequest", "in": "body"}, "OrganizationGUID": {"required": true, "type": "string", "description": "A GUID for a Bitly organization", "in": "path", "name": "organization_guid"}, "CreatedAfter": {"in": "query", "type": "integer", "description": "Timestamp as an integer unix epoch", "name": "created_after"}, "SSOSlug": {"schema": {"$ref": "#/definitions/SSOSlug"}, "required": true, "description": "The object used for creating SSO Settings", "name": "sso_settings", "in": "body"}, "AddCustomBitlink": {"schema": {"$ref": "#/definitions/AddCustomBitlink"}, "required": true, "description": "The object used to add a custom Bitlink", "name": "add_custom_bitlink", "in": "body"}, "ChannelModify": {"schema": {"$ref": "#/definitions/ChannelModify"}, "required": true, "description": "The object used for creating/updating a channel", "name": "channel_modify", "in": "body"}, "FullShorten": {"schema": {"$ref": "#/definitions/FullShorten"}, "required": true, "description": "The object used to create a Bitlink", "name": "full_shorten", "in": "body"}, "TimeUnit": {"enum": ["minute", "hour", "day", "week", "month"], "name": "unit", "default": "day", "required": true, "in": "query", "type": "string", "description": "A unit of time"}, "DeeplinkRuleGUID": {"required": true, "type": "string", "description": "the guid of a deeplink rule", "in": "path", "name": "deeplink_rule_guid"}, "DeeplinkRule": {"schema": {"$ref": "#/definitions/DeeplinkRule"}, "required": true, "description": "deeplink rule edit/create body", "name": "deeplink_rule", "in": "body"}, "Event": {"schema": {"$ref": "#/definitions/Event"}, "required": true, "description": "the object used to create an event", "name": "event", "in": "body"}, "Size": {"default": 50, "in": "query", "type": "integer", "description": "The quantity of items to be be returned", "name": "size"}}, "tags": [{"name": "Groups", "description": "Groups are a subdivision within an organization. A user will belong to a group within an organization. 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 part of our hierarchy. This is the top level where a group and user will belong.\n"}, {"name": "User", "description": "User operations such as changing your name or fetching basic user information apply only to the authenticated user.\n"}, {"name": "Bitlinks", "description": "Bitlinks is how we refer to shortened links. You can see these with the bit.ly domain or your custom branded short domain. (Example\\: bit.ly/ABCDE)\n"}, {"name": "Custom Bitlinks", "description": "Custom Bitlinks have both a branded short domain (BSD) AND a customized backend. For example, bit.ly/bitlinks would not be considered a Custom Bitlink because it does not have a branded short domain. es.pn/2yxklu would not be considered a custom Bitlink because while it has a branded short domain, it doesn't have a customized backhalf. An example of a link that would live in this section is es.pn/SuperBowl\n"}, {"name": "Campaigns", "description": "Bitly Campaigns allows you to build and manage omnichannel campaigns.\n"}, {"name": "BSDs", "description": "BSDs is an acronym for branded short domains. This is a custom 15 character or less domain for bitlinks. This allows you to customize the domain to your brand.\n"}], "basePath": "/v4", "host": "api-ssl.bitly.com", "definitions": {"PurchaseBSD": {"type": "object", "properties": {"domain": {"type": "string"}, "agreed_at": {"type": "string", "description": "ISO_TIMESTAMP"}, "organization_guid": {"type": "string"}, "agreement_keys": {"items": {"type": "string"}, "type": "array"}}}, "PaymentInvoices": {"type": "object", "properties": {"payment_invoices": {"items": {"$ref": "#/definitions/PaymentInvoice"}, "type": "array"}}}, "DeactivateUser": {"type": "object", "properties": {"feedback": {"allOf": [{"$ref": "#/definitions/Feedback"}]}, "confirm_text": {"type": "string"}}}, "ExpandBitlink": {"type": "object", "properties": {"bitlink_id": {"type": "string"}}}, "Organization": {"type": "object", "allOf": [{"$ref": "#/definitions/HasReferences"}, {"properties": {"name": {"type": "string"}, "bsds": {"items": {"type": "string"}, "type": "array"}, "created": {"type": "string"}, "is_active": {"type": "boolean"}, "modified": {"type": "string"}, "tier_display_name": {"type": "string"}, "tier_family": {"type": "string"}, "tier": {"type": "string"}, "role": {"type": "string"}, "guid": {"type": "string"}}}]}, "AccessFeatures": {"type": "object", "properties": {"access_features": {"items": {"$ref": "#/definitions/AccessFeature"}, "type": "array"}}}, "Clicks": {"type": "object", "properties": {"units": {"type": "integer"}, "unit_reference": {"type": "string"}, "unit": {"enum": ["minute", "hour", "day", "week", "month"], "type": "string"}, "link_clicks": {"items": {"$ref": "#/definitions/LinkClicks"}, "type": "array"}}}, "ShareAccounts": {"type": "object", "properties": {"share_accounts": {"items": {"$ref": "#/definitions/ShareAccount"}, "type": "array"}}}, "ChannelBitlinks": {"type": "object", "properties": {"total": {"type": "integer"}, "bitlinks": {"items": {"$ref": "#/definitions/ChannelBitlink"}, "type": "array"}}}, "CustomBitlinkHistory": {"type": "object", "properties": {"hash": {"type": "string"}, "uuid": {"type": "string"}, "keyword": {"type": "string"}, "created": {"type": "string"}, "group_guid": {"type": "string"}, "first_created": {"type": "string"}, "is_active": {"type": "boolean"}, "long_url": {"type": "string"}, "deactivated": {"type": "string"}, "bsd": {"type": "string"}, "login": {"type": "string"}}}, "CustomDomain": {"type": "object", "description": "information about given custom domain", "properties": {"deeplink_apps": {"items": {"$ref": "#/definitions/MinimalDeeplinkApp"}, "type": "array"}, "hsts_enabled": {"type": "boolean"}, "upgrade_insecure_requests": {"type": "boolean"}, "custom_domain": {"type": "string"}, "validation_error": {"type": "string"}, "created": {"type": "integer"}, "is_active": {"type": "boolean"}, "root_redirect": {"type": "string"}, "ssl_configuration_error": {"type": "string"}, "ssl_autoconfigure_error": {"type": "boolean"}, "group_guids": {"items": {"type": "string"}, "type": "array"}, "ssl_cert": {"items": {"$ref": "#/definitions/PublicSSLCert"}, "type": "array"}, "wildcard_redirect": {"type": "string"}, "configuration_last_check_ts": {"type": "string"}, "https_enabled": {"type": "boolean"}, "validation_status": {"type": "string"}, "https_bitlinks": {"type": "boolean"}}}, "SSOSettings": {"type": "object", "properties": {"slo_endpoint": {"type": "string"}, "idp_url": {"type": "string"}, "certificate": {"type": "string"}, "organization_guid": {"type": "string"}, "saml_endpoint": {"type": "string"}, "identity_provider": {"type": "string"}, "domains": {"items": {"type": "string"}, "type": "array"}, "issuer_url": {"type": "string"}, "url_slug": {"type": "string"}}}, "BitlinkQR": {"type": "object", "properties": {"qr_code": {"type": "string", "description": "Data URI of QR Code image"}, "link": {"type": "string"}, "id": {"type": "string"}}}, "CustomBitlink": {"type": "object", "properties": {"bitlink": {"$ref": "#/definitions/Bitlink"}, "bitlink_history": {"items": {"$ref": "#/definitions/CustomBitlinkHistory"}, "type": "array"}, "custom_bitlink": {"type": "string"}}}, "BillingAccount": {"type": "object", "properties": {"last_four_digits": {"type": "string"}, "subscription_price": {"type": "number"}, "billing_info": {"$ref": "#/definitions/BillingInfo"}, "account_id": {"type": "string"}, "end_date": {"type": "string", "description": "ISO timestamp"}, "account_num": {"type": "string"}, "card_type": {"type": "string"}, "subscription_status": {"type": "string"}, "renewal_date": {"type": "string", "description": "ISO timestamp"}}}, "Bitlink": {"type": "object", "allOf": [{"$ref": "#/definitions/HasReferences"}, {"properties": {"archived": {"type": "boolean"}, "tags": {"items": {"type": "string"}, "type": "array"}, "created_at": {"type": "string"}, "title": {"type": "string"}, "deeplinks": {"items": {"$ref": "#/definitions/DeeplinkRule"}, "type": "array"}, "created_by": {"type": "string"}, "long_url": {"type": "string"}, "client_id": {"type": "string"}, "custom_bitlinks": {"items": {"type": "string"}, "type": "array"}, "link": {"type": "string"}, "id": {"type": "string"}}}]}, "ClickMetric": {"type": "object", "properties": {"clicks": {"type": "integer"}, "value": {"type": "string"}}}, "PurchaseBSDResponse": {"type": "object", "properties": {"order_id": {"type": "integer"}, "domain": {"type": "string"}, "total": {"type": "string"}, "organization_guid": {"type": "string"}}}, "DomainRegister": {"type": "object", "properties": {"redirect_url": {"type": "string"}}}, "Campaign": {"type": "object", "allOf": [{"$ref": "#/definitions/HasReferences"}, {"properties": {"name": {"type": "string"}, "created": {"type": "string", "description": "ISO timestamp"}, "group_guid": {"type": "string"}, "modified": {"type": "string", "description": "ISO timestamp"}, "created_by": {"type": "string"}, "guid": {"type": "string"}, "description": {"type": "string"}}}]}, "HasReferences": {"type": "object", "properties": {"references": {"additionalProperties": {"type": "string"}, "type": "object"}}}, "Share": {"type": "object", "properties": {"numeric_id": {"type": "integer"}, "account_type": {"enum": ["twitter", "facebook"], "type": "string"}, "account_id": {"type": "string"}, "text": {"type": "string"}, "link": {"type": "string"}, "account_name": {"type": "string"}}}, "OAuthApp": {"type": "object", "properties": {"link": {"type": "string"}, "name": {"type": "string"}, "client_id": {"type": "string"}, "description": {"type": "string"}}}, "Channels": {"type": "object", "properties": {"channels": {"items": {"$ref": "#/definitions/Channel"}, "type": "array"}}}, "DeeplinkApps": {"type": "object", "properties": {"apps": {"items": {"$ref": "#/definitions/DeeplinkApp"}, "type": "array"}}}, "AddCustomBitlink": {"type": "object", "properties": {"bitlink_id": {"type": "string"}, "custom_bitlink": {"type": "string"}}}, "Event": {"required": ["action", "login", "org_guid", "ui_action", "ui_action_date", "initiated_by"], "type": "object", "properties": {"ui_action": {"type": "string"}, "referrer": {"type": "string"}, "action": {"type": "string"}, "initiated_by": {"enum": ["app", "user"], "type": "string"}, "group_guid": {"type": "string"}, "ui_action_date": {"type": "string"}, "login": {"type": "string"}, "org_guid": {"type": "string"}}}, "Forbidden": {"description": "FORBIDDEN", "allOf": [{"$ref": "#/definitions/Error"}]}, "CampaignClicks": {"type": "object", "properties": {"unit_reference": {"type": "string"}, "rollup": {"type": "boolean"}, "limit": {"type": "integer"}, "units": {"type": "integer"}, "data": {"$ref": "#/definitions/CampaignClicksData"}, "unit": {"enum": ["minute", "hour", "day", "week", "month"], "type": "string"}}}, "ConsumableFeature": {"type": "object", "properties": {"name": {"type": "string"}, "created": {"type": "string", "description": "ISO_TIMESTAMP"}, "modified": {"type": "string", "description": "ISO_TIMESTAMP"}, "limit": {"type": "integer"}, "is_tier_default": {"type": "boolean"}, "id": {"type": "string"}}}, "Pagination": {"type": "object", "properties": {"total": {"type": "integer"}, "size": {"type": "integer"}, "prev": {"type": "string"}, "page": {"type": "integer"}, "next": {"type": "string"}}}, "DomainStatus": {"type": "object", "properties": {"status": {"enum": ["unavailable", "available", "complimentary"], "type": "string"}, "domain": {"type": "string"}, "price": {"type": "string"}, "zone": {"type": "string"}}}, "BSDsResponse": {"type": "object", "properties": {"bsds": {"items": {"type": "string"}, "type": "array"}}}, "UpdateCustomBitlink": {"type": "object", "properties": {"bitlink_id": {"type": "string"}}}, "GroupPreferences": {"type": "object", "properties": {"group_guid": {"type": "string"}, "domain_preference": {"type": "string"}}}, "ClicksSummary": {"type": "object", "properties": {"units": {"type": "integer"}, "unit": {"enum": ["minute", "hour", "day", "week", "month"], "type": "string"}, "total_clicks": {"type": "integer"}, "unit_reference": {"type": "string"}}}, "BaseMetrics": {"type": "object", "properties": {"units": {"type": "integer"}, "facet": {"enum": ["countries", "referrers", "referrers_by_domain", "referring_domains", "referring_networks", "shorten_counts"], "type": "string"}, "unit_reference": {"type": "string"}, "unit": {"type": "string"}}}, "BadGateway": {"description": "BAD_GATEWAY", "allOf": [{"$ref": "#/definitions/Error"}]}, "Email": {"type": "object", "properties": {"is_primary": {"type": "boolean"}, "is_verified": {"type": "boolean"}, "email": {"type": "string"}}}, "Channel": {"type": "object", "allOf": [{"$ref": "#/definitions/BaseChannel"}, {"$ref": "#/definitions/HasReferences"}]}, "PublicSSLCert": {"type": "object", "description": "SSL Certification", "properties": {"custom_cert": {"type": "boolean"}, "valid_end": {"type": "integer"}, "issuer": {"type": "string"}}}, "Campaigns": {"type": "object", "properties": {"campaigns": {"items": {"$ref": "#/definitions/Campaign"}, "type": "array"}}}, "ExpandedBitlink": {"type": "object", "properties": {"long_url": {"type": "string"}, "created_at": {"type": "string"}, "link": {"type": "string"}, "id": {"type": "string"}}}, "BaseChannel": {"type": "object", "properties": {"group_guid": {"type": "string"}, "guid": {"type": "string"}, "name": {"type": "string"}, "modified": {"type": "string", "description": "ISO_TIMESTAMP"}, "created": {"type": "string", "description": "ISO TIMESTAMP"}}}, "SortedLinks": {"type": "object", "properties": {"sorted_links": {"items": {"$ref": "#/definitions/ClickLink"}, "type": "array"}, "links": {"items": {"$ref": "#/definitions/Bitlink"}, "type": "array"}}}, "BillingAddress": {"type": "object", "properties": {"city": {"type": "string"}, "country": {"type": "string"}, "state": {"type": "string"}, "address_1": {"type": "string"}, "address_2": {"type": "string"}, "zip_code": {"type": "string"}}}, "ClickLink": {"type": "object", "properties": {"clicks": {"type": "integer"}, "id": {"type": "string"}}}, "Shorten": {"required": ["long_url"], "type": "object", "properties": {"group_guid": {"type": "string"}, "domain": {"default": "bit.ly", "type": "string"}, "long_url": {"type": "string"}}}, "BillingInfo": {"type": "object", "properties": {"billing_address": {"type": "object", "$ref": "#/definitions/BillingAddress"}, "billing_contact": {"type": "object", "$ref": "#/definitions/BillingContact"}}}, "ShareableReport": {"type": "object", "properties": {"bitlink_id": {"type": "string"}, "shareable_report": {"type": "string"}}}, "BSDSearchResults": {"type": "object", "properties": {"results": {"items": {"$ref": "#/definitions/BSDSearchResult"}, "type": "array"}}}, "NotFound": {"description": "NOT_FOUND", "allOf": [{"$ref": "#/definitions/Error"}]}, "PaymentInvoice": {"type": "object", "properties": {"total_tax": {"type": "number"}, "description": {"type": "string"}, "charges": {"type": "object", "$ref": "#/definitions/Charges"}, "invoice_id": {"type": "string"}, "invoice_date": {"type": "string"}, "payments": {"type": "object", "$ref": "#/definitions/Payments"}, "invoice_number": {"type": "string"}, "total": {"type": "number"}, "subtotal": {"type": "number"}, "invoice_due_date": {"type": "string"}}}, "UserInternal": {"type": "object", "allOf": [{"$ref": "#/definitions/User"}, {"properties": {"role_name": {"type": "string"}}}]}, "UserUpdate": {"type": "object", "properties": {"default_group_guid": {"type": "string"}, "name": {"type": "string"}}}, "CampaignClicksData": {"type": "object", "properties": {"created_ts": {"type": "integer"}, "description": {"type": "string"}, "brand_guid": {"type": "string"}, "campaign_channels": {"items": {"$ref": "#/definitions/CampaignChannelClicks"}, "type": "array"}, "created_by": {"type": "string"}, "modified_ts": {"type": "integer"}, "total_clicks": {"type": "integer"}, "guid": {"type": "string"}, "name": {"type": "string"}}}, "ReferrersByDomains": {"type": "object", "properties": {"units": {"type": "integer"}, "facet": {"enum": ["referrers_by_domains"], "type": "string"}, "referrers_by_domain": {"items": {"$ref": "#/definitions/ReferrersByDomain"}, "type": "array"}, "unit_reference": {"type": "string"}, "unit": {"type": "string"}}}, "Group": {"type": "object", "allOf": [{"$ref": "#/definitions/HasReferences"}, {"properties": {"name": {"type": "string"}, "bsds": {"items": {"type": "string"}, "type": "array"}, "created": {"type": "string"}, "is_active": {"type": "boolean"}, "modified": {"type": "string"}, "organization_guid": {"type": "string"}, "role": {"type": "string"}, "guid": {"type": "string"}}}]}, "SSOVerifySlug": {"type": "object", "properties": {"available": {"type": "boolean"}, "url_slug": {"type": "string"}}}, "Bitlinks": {"type": "object", "properties": {"pagination": {"$ref": "#/definitions/Pagination"}, "links": {"items": {"$ref": "#/definitions/Bitlink"}, "type": "array"}}}, "ShareAccount": {"type": "object", "properties": {"numeric_id": {"type": "integer"}, "account_login": {"type": "string"}, "account_type": {"enum": ["twitter", "facebook"], "type": "string"}, "account_id": {"type": "string"}, "oauth_error": {"type": "string"}, "primary": {"type": "boolean"}, "visible": {"type": "boolean"}, "connected": {"type": "string", "description": "ISO timestamp"}, "account_name": {"type": "string"}}}, "DefaultConsumableFeature": {"type": "object", "description": "the tier default values for a single consumable feature", "properties": {"limit": {"type": "integer"}, "name": {"type": "string"}}}, "GroupUpdate": {"type": "object", "properties": {"bsds": {"items": {"type": "string"}, "type": "array"}, "name": {"type": "string"}, "organization_guid": {"type": "string"}}}, "ExpectationFailed": {"description": "EXPECTATION_FAILED", "allOf": [{"$ref": "#/definitions/Error"}]}, "OrgEmailBody": {"type": "object", "properties": {"login": {"type": "string"}, "org_guid": {"type": "string"}, "email": {"type": "string"}}}, "Tags": {"type": "object", "properties": {"tags": {"items": {"type": "string"}, "type": "array"}}}, "User": {"type": "object", "properties": {"default_group_guid": {"type": "string"}, "name": {"type": "string"}, "created": {"type": "string"}, "is_active": {"type": "boolean"}, "modified": {"type": "string"}, "is_sso_user": {"type": "boolean"}, "is_2fa_enabled": {"type": "boolean"}, "login": {"type": "string"}, "emails": {"items": {"$ref": "#/definitions/Email"}, "type": "array"}}}, "Groups": {"type": "object", "properties": {"groups": {"items": {"$ref": "#/definitions/Group"}, "type": "array"}}}, "BillingPaymentMethodID": {"type": "string"}, "Tier": {"type": "object", "description": "a single tier", "properties": {"display_name": {"type": "string"}, "name": {"type": "string"}, "family": {"type": "string"}, "price": {"type": "integer"}, "billing_period_type": {"type": "string"}, "consumable_features": {"items": {"$ref": "#/definitions/DefaultConsumableFeature"}, "type": "array"}, "sort_order": {"type": "integer"}, "is_self_service": {"type": "boolean"}, "access_features": {"items": {"$ref": "#/definitions/DefaultAccessFeature"}, "type": "array"}, "display_icon": {"type": "string"}, "is_paid": {"type": "boolean"}, "description": {"type": "string"}}}, "UnitReferenceTimeStamp": {"type": "string", "description": "data returned up to this reference timestamp"}, "OrgEmails": {"type": "object", "description": "an array of org emails", "properties": {"emails": {"items": {"$ref": "#/definitions/OrgEmail"}, "type": "array"}}}, "AppAssociationDetail": {"type": "object", "properties": {"priority": {"type": "integer"}, "fallback": {"type": "boolean"}, "app_guid": {"type": "string"}, "os": {"type": "string"}}}, "ChannelBitlink": {"required": ["bitlink_id", "campaign_guid", "channel_guid", "created_ts"], "type": "object", "properties": {"keyword_link": {"type": "string"}, "created_ts": {"type": "integer"}, "bitlink_id": {"type": "string"}, "channel_guid": {"type": "string"}, "title": {"type": "string"}, "campaign_ids": {"items": {"type": "string"}, "type": "array"}, "total_clicks": {"type": "integer"}, "aggregate_link": {"type": "string"}, "campaign_guid": {"type": "string"}, "link": {"type": "string"}, "client_id": {"type": "string"}, "long_url": {"type": "string"}, "clicks": {"items": {"$ref": "#/definitions/CampaignClickData"}, "type": "array"}}}, "OrgEmail": {"type": "object", "properties": {"org_guid": {"type": "string"}, "created_ts": {"type": "integer"}, "login": {"type": "string"}, "email": {"type": "string"}}}, "DeeplinkMetric": {"type": "object", "properties": {"app_installs": {"type": "integer"}, "store_visits": {"type": "integer"}, "interstital_views": {"type": "integer"}, "app_opens": {"type": "integer"}, "web_opens": {"type": "integer"}}}, "UnitAmount": {"default": -1, "type": "integer", "description": "the number of units queried for"}, "DomainAgreement": {"type": "object", "properties": {"content": {"type": "string"}, "url": {"type": "string"}, "agreement_key": {"type": "string"}, "title": {"type": "string"}}}, "Timeout": {"description": "TIMEOUT", "allOf": [{"$ref": "#/definitions/Error"}]}, "Error": {"type": "object", "properties": {"message": {"type": "string"}, "errors": {"items": {"$ref": "#/definitions/FieldError"}, "type": "array"}, "resource": {"type": "string"}, "description": {"type": "string"}}}, "UpgradeRequired": {"description": "UPGRADE_REQUIRED", "allOf": [{"$ref": "#/definitions/Error"}]}, "LinkClicks": {"type": "object", "properties": {"date": {"type": "string"}, "clicks": {"type": "integer"}}}, "CreatePaymentMethodRequest": {"type": "object", "properties": {"stripe_token": {"type": "string"}}}, "BaseChannelBitlink": {"type": "object", "properties": {"campaign_guid": {"type": "string"}, "bitlink_id": {"type": "string"}}}, "DeeplinkApp": {"required": ["third_party_app_id", "name", "install_url", "os"], "type": "object", "properties": {"third_party_app_id": {"type": "string"}, "created_ts": {"type": "integer"}, "scheme": {"type": "string"}, "install_url": {"type": "string"}, "name": {"type": "string"}, "legacy_app_id": {"type": "string"}, "icon_url": {"type": "string"}, "organization_guid": {"type": "string"}, "modified_ts": {"type": "integer"}, "guid": {"type": "string"}, "apple_app_entitlement_id": {"type": "string"}, "android_sha256": {"items": {"type": "string"}, "type": "array"}, "os": {"enum": ["ios", "android"], "type": "string"}}}, "Feedback": {"type": "object", "properties": {"selection": {"type": "string"}, "optional_text": {"type": "string"}}}, "TemporarilyUnavailable": {"description": "TEMPORARILY_UNAVAILABLE", "allOf": [{"$ref": "#/definitions/Error"}]}, "FullShorten": {"required": ["long_url"], "type": "object", "properties": {"domain": {"default": "bit.ly", "type": "string"}, "title": {"type": "string"}, "group_guid": {"type": "string"}, "tags": {"items": {"type": "string"}, "type": "array"}, "deeplinks": {"items": {"$ref": "#/definitions/Deeplink"}, "type": "array"}, "long_url": {"type": "string"}}}, "ConsumableFeatures": {"type": "object", "properties": {"consumable_features": {"items": {"$ref": "#/definitions/ConsumableFeature"}, "type": "array"}}}, "TimeUnit": {"default": "day", "enum": ["minute", "hour", "day", "week", "month"], "type": "string", "description": "the unit of time queried for (minute, hour, day, week, month)"}, "Deeplink": {"type": "object", "properties": {"app_uri_path": {"type": "string"}, "install_type": {"type": "string"}, "install_url": {"type": "string"}, "app_id": {"type": "string"}}}, "Metric": {"type": "object", "properties": {"value": {"type": "integer"}, "key": {"type": "string"}}}, "Organizations": {"type": "object", "properties": {"organizations": {"items": {"$ref": "#/definitions/Organization"}, "type": "array"}}}, "InternalError": {"description": "INTERNAL_ERROR", "allOf": [{"$ref": "#/definitions/Error"}]}, "CreateShare": {"type": "object", "properties": {"text": {"type": "string"}, "bitlink": {"type": "string"}, "account_type": {"enum": ["twitter", "facebook"], "type": "string"}, "account_id": {"type": "string"}, "group_guid": {"type": "string"}}}, "GroupBitlinksCount": {"type": "object", "properties": {"units": {"type": "integer"}, "data": {"items": {"$ref": "#/definitions/CountItem"}, "type": "array"}, "unit_reference": {"type": "integer"}, "unit": {"type": "string"}}}, "DefaultAccessFeature": {"type": "object", "description": "the tier default values for a single access feature", "properties": {"has_access": {"type": "boolean"}, "name": {"type": "string"}}}, "CampaignChannelClicks": {"type": "object", "properties": {"created_ts": {"type": "integer"}, "channel_guid": {"type": "string"}, "total_clicks": {"type": "integer"}, "channel_name": {"type": "string"}, "campaign_guid": {"type": "string"}, "channel_bitlinks": {"$ref": "#/definitions/ChannelBitlinks"}, "clicks": {"items": {"$ref": "#/definitions/CampaignClickData"}, "type": "array"}}}, "AppAssociations": {"type": "object", "properties": {"android_install_preference": {"enum": ["no_install", "auto_install", "promote_install"], "type": "string"}, "ios_install_preference": {"enum": ["no_install", "auto_install", "promote_install"], "type": "string"}, "android_apps": {"items": {"$ref": "#/definitions/AppAssociationDetail"}, "type": "array"}, "custom_domain": {"type": "string"}, "ios_apps": {"items": {"$ref": "#/definitions/AppAssociationDetail"}, "type": "array"}}}, "EncodingLogin": {"type": "object", "properties": {"encoding_login": {"items": {"type": "string"}, "type": "array"}}}, "Users": {"type": "object", "properties": {"pagination": {"$ref": "#/definitions/Pagination"}, "users": {"items": {"$ref": "#/definitions/UserInternal"}, "type": "array"}}}, "MinimalDeeplinkApp": {"type": "object", "description": "Deep Linking object", "properties": {"guid": {"type": "string"}, "os": {"type": "string"}}}, "DeeplinkRules": {"type": "object", "properties": {"rules": {"items": {"$ref": "#/definitions/DeeplinkRule"}, "type": "array"}}}, "Metrics": {"type": "object", "allOf": [{"$ref": "#/definitions/BaseMetrics"}, {"properties": {"metrics": {"items": {"$ref": "#/definitions/Metric"}, "type": "array"}}}]}, "ClickMetrics": {"type": "object", "allOf": [{"$ref": "#/definitions/BaseMetrics"}, {"properties": {"metrics": {"items": {"$ref": "#/definitions/ClickMetric"}, "type": "array"}}}]}, "BadRequest": {"description": "BAD_REQUEST", "allOf": [{"$ref": "#/definitions/Error"}]}, "BillingContact": {"type": "object", "properties": {"phone": {"type": "string"}, "billing_contact_id": {"type": "string"}, "last_name": {"type": "string"}, "first_name": {"type": "string"}, "email": {"type": "string"}}}, "CampaignModify": {"type": "object", "properties": {"group_guid": {"type": "string"}, "channel_guids": {"items": {"type": "string"}, "type": "array"}, "description": {"type": "string"}, "name": {"type": "string"}}}, "AccessFeature": {"type": "object", "properties": {"has_access": {"type": "boolean"}, "name": {"type": "string"}, "created": {"type": "string", "description": "ISO_TIMESTAMP"}, "modified": {"type": "string", "description": "ISO_TIMESTAMP"}, "is_tier_default": {"type": "boolean"}, "id": {"type": "string"}}}, "Charges": {"type": "object", "properties": {"charge_amount": {"type": "number"}, "processing_type": {"type": "string"}, "tax_amount": {"type": "number"}, "charge_name": {"type": "string"}}}, "DomainAgreements": {"type": "object", "properties": {"domain_agreements": {"items": {"$ref": "#/definitions/DomainAgreement"}, "type": "array"}}}, "GroupBitlinksCountRollup": {"type": "object", "properties": {"units": {"type": "integer"}, "count": {"type": "integer"}, "unit_reference": {"type": "integer"}, "unit": {"type": "string"}}}, "CustomDomains": {"type": "object", "properties": {"custom_domains": {"items": {"$ref": "#/definitions/CustomDomain"}, "type": "array"}}}, "Payments": {"type": "object", "properties": {"payment_number": {"type": "string"}, "payment_date": {"type": "string"}, "payment_amount": {"type": "number"}}}, "PublicValidate": {"type": "object", "description": "Info needed for domain validation", "properties": {"custom_domain": {"type": "string"}, "organization_guid": {"type": "string"}}}, "CampaignClickData": {"type": "object", "properties": {"ts": {"type": "integer"}, "clicks": {"type": "integer"}}}, "CountItem": {"type": "object", "properties": {"count": {"type": "integer"}, "ts": {"type": "integer"}}}, "ReferrersByDomain": {"type": "object", "properties": {"Referrers": {"items": {"$ref": "#/definitions/Metric"}, "type": "array"}, "network": {"type": "string"}}}, "UnprocessableEntity": {"description": "UNPROCESSABLE_ENTITY", "allOf": [{"$ref": "#/definitions/Error"}]}, "BSDSearchResult": {"type": "object", "properties": {"type": {"enum": ["affiliate", "reseller"], "type": "string"}, "domain": {"type": "string"}, "subdomain": {"type": "string"}, "link": {"type": "string"}, "zone": {"type": "string"}}}, "DeeplinkMetricsRollup": {"type": "object", "properties": {"unit_reference": {"$ref": "#/definitions/UnitReferenceTimeStamp"}, "ios": {"$ref": "#/definitions/DeeplinkMetric"}, "other": {"$ref": "#/definitions/DeeplinkMetric"}, "units": {"$ref": "#/definitions/UnitAmount"}, "android": {"$ref": "#/definitions/DeeplinkMetric"}, "unit": {"$ref": "#/definitions/TimeUnit"}}}, "SSOSlug": {"type": "object", "properties": {"url_slug": {"type": "string"}}}, "FieldError": {"type": "object", "properties": {"field": {"type": "string"}, "message": {"type": "string"}, "error_code": {"type": "string"}}}, "ChannelModify": {"type": "object", "allOf": [{"$ref": "#/definitions/BaseChannel"}, {"properties": {"bitlinks": {"items": {"$ref": "#/definitions/BaseChannelBitlink"}, "type": "array"}}}]}, "PaymentInvoiceDetail": {"type": "object", "properties": {"invoice_summary": {"type": "object", "$ref": "#/definitions/PaymentInvoice"}, "billing_account": {"type": "object", "$ref": "#/definitions/BillingAccount"}}}, "DeeplinkRule": {"type": "object", "properties": {"bitlink": {"type": "string"}, "install_url": {"type": "string"}, "created": {"type": "string", "description": "ISO timestamp"}, "app_uri_path": {"type": "string"}, "modified": {"type": "string", "description": "ISO timestamp"}, "install_type": {"type": "string"}, "app_guid": {"type": "string"}, "guid": {"type": "string"}, "os": {"type": "string"}}}}, "swagger": "2.0"}