Bitly Bitlinks API

Create, expand, update, archive and delete Bitlinks, list them by group, and read per-link click, engagement, country, city, device and referrer metrics. 21 operation(s), extracted verbatim from the OpenAPI Bitly publishes at https://dev.bitly.com/v4/v4.json.

Operations 21

GET /bitlinks/{bitlink}/engagements Get Engagement Counts for a Bitlink #
GET /bitlinks/{bitlink}/engagements/summary Get an Engagement Count Summary for a Bitlink #
GET /bitlinks/{bitlink}/countries Get Metrics for a Bitlink by Country #
GET /bitlinks/{bitlink}/cities Get Metrics for a Bitlink by City #
GET /bitlinks/{bitlink}/devices Get Metrics for a Bitlink by Device Type #
GET /bitlinks/{bitlink}/referrers Get Metrics for a Bitlink by Referrers #
GET /bitlinks/{bitlink}/referrer_name Get Metrics for a Bitlink by Referrer Name #
GET /bitlinks/{bitlink}/referring_domains Get Metrics for a Bitlink by Referring Domains #
GET /bitlinks/{bitlink}/referrers_by_domains Get Metrics for a Bitlink by Referrers by Domain #
GET /groups/{group_guid}/bitlinks Retrieve Bitlinks by Group #
PATCH /groups/{group_guid}/bitlinks Bulk update bitlinks #
GET /groups/{group_guid}/engagements/sorted/top Retrieve Top Links and Decoupled QR Codes by Engagements #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bitly-bitlinks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bitly-bitlinks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitly Bitlinks API
  description: The Bitlinks surface of the Bitly v4 REST API. Extracted verbatim, operation-for-operation, from the authoritative OpenAPI Bitly publishes at https://dev.bitly.com/v4/v4.json — no operation, parameter or schema was authored by API Evangelist.
  version: 4.0.0
  termsOfService: https://bitly.com/pages/terms-of-service
  contact:
    url: https://bitly.is/API-support
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api-ssl.bitly.com/v4
security:
- bearerAuth: []
tags:
- name: Bitlinks
  description: 'Bitlinks are shortened links. They could begin with the bit.ly domain or your own custom branded short domain (BSD).


    **Related Operations:**

    - [POST /bitlinks](#createFullBitlink) - Create a new bitlink or add a custom keyword to an existing bitlink

    - [PATCH /bitlinks/{bitlink}](#updateBitlink) - Redirect an existing bitlink

    '
paths:
  /shorten:
    post:
      summary: Shorten a Link
      description: Converts a long url to a Bitlink. You may see errors returned from this endpoint - "BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED" occurs if you have shortened more links than your account is configured for for the month, and "DNS_CONFIGURATION_ERROR" occurs if you are attempting to shorten links against a custom domain which doesn't have DNS properly configured.
      tags:
      - Bitlinks
      operationId: createBitlink
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Shorten'
      responses:
        '200':
          description: SUCCESS
          headers:
            X-Bsd-Error:
              schema:
                type: string
              description: An explanation of the DNS error received
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortenBitlinkBody'
        '201':
          description: CREATED
          headers:
            X-Bsd-Error:
              schema:
                type: string
              description: An explanation of the DNS error received
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortenBitlinkBody'
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '403':
          description: FORBIDDEN
          headers:
            X-Ratelimit-Reason:
              schema:
                type: string
              description: An explanation of the ratelimit received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '417':
          description: EXPECTATION_FAILED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpectationFailed'
        '422':
          description: UNPROCESSABLE_ENTITY
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntity'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks:
    post:
      summary: Create a Bitlink
      description: Converts a long url to a Bitlink and sets additional parameters. You may see errors returned from this endpoint - "BRANDED_LINK_MONTHLY_LIMIT_EXCEEDED" occurs if you have shortened more links than your account is configured for for the month, and "DNS_CONFIGURATION_ERROR" occurs if you are attempting to shorten links against a custom domain which doesn't have DNS properly configured.
      tags:
      - Bitlinks
      operationId: createFullBitlink
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FullShorten'
            examples:
              Customized Keyword:
                value:
                  long_url: https://dev.bitly.com
                  domain: yourdomain.co
                  group_guid: Ba1bc23dE4F
                  keyword: new-link
              Add Keyword to Existing Bitlink:
                value:
                  bitlink_id: yourdomain.co/1234567890
                  keyword: new-link-edited
              With Expiration:
                value:
                  long_url: https://dev.bitly.com
                  expiration_at: 2025-07-28T14:30:00+0000
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitlinkBody'
        '201':
          description: CREATED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitlinkBody'
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '402':
          description: UPGRADE_REQUIRED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequired'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '417':
          description: EXPECTATION_FAILED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpectationFailed'
        '422':
          description: UNPROCESSABLE_ENTITY
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntity'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}:
    delete:
      summary: Delete a Bitlink
      description: Delete an unedited hash Bitlink.
      tags:
      - Bitlinks
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      operationId: deleteBitlink
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkDeletionResponse'
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
    patch:
      summary: Update a Bitlink
      description: Updates fields in the specified link. To redirect the link (i.e. to update the Long URL), use the long_url parameter. This will always charge an encode limit.
      tags:
      - Bitlinks
      operationId: updateBitlink
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BitlinkUpdateBody'
            examples:
              Redirect Bitlink Destination:
                value:
                  long_url: https://www.newdestination.com
              With Expiration:
                value:
                  expiration_at: 2025-07-28T14:30:00+0000
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitlinkBody'
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '402':
          description: UPGRADE_REQUIRED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequired'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '409':
          description: CONFLICT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conflict'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '422':
          description: UNPROCESSABLE_ENTITY
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntity'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
    get:
      summary: Retrieve a Bitlink
      description: Returns information for the specified link.
      tags:
      - Bitlinks
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      operationId: getBitlink
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitlinkBody'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /expand:
    post:
      summary: Expand a Bitlink
      description: Returns the short link and long URL for the specified link.
      tags:
      - Bitlinks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpandBitlink'
      operationId: expandBitlink
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpandedBitlink'
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '422':
          description: UNPROCESSABLE_ENTITY
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableEntity'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/clicks:
    get:
      summary: Get Clicks for a Bitlink
      description: Returns the click counts for the specified link in an array based on a date.
      tags:
      - Bitlinks
      operationId: getClicksForBitlink
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Clicks'
            text/csv:
              schema:
                type: string
              example: 'Date, Clicks

                2023-07-10T00:00:00+0000, 15

                '
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/clicks/summary:
    get:
      summary: Get a Clicks Summary for a Bitlink
      description: Returns the click counts for the specified link rolled up into a single field.
      tags:
      - Bitlinks
      operationId: getClicksSummaryForBitlink
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClicksSummary'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/engagements:
    get:
      summary: Get Engagement Counts for a Bitlink
      description: Returns an array of engagement counts for the specified link. The array is comprised of button click, click and scan counts for each time window, where the window is based on the provided unit.
      tags:
      - Bitlinks
      operationId: getEngagements
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalEngagements'
            text/csv:
              schema:
                type: string
              example: 'Date, Engagements

                2006-01-02T15:04:05, 5

                '
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/engagements/summary:
    get:
      summary: Get an Engagement Count Summary for a Bitlink
      description: Returns the engagement counts for the specified link rolled up into a single field.
      tags:
      - Bitlinks
      operationId: getEngagementsSummary
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalEngagementsSummary'
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/countries:
    get:
      summary: Get Metrics for a Bitlink by Country
      description: Returns the country origins of click traffic for the specified link.
      tags:
      - Bitlinks
      operationId: getMetricsForBitlinkByCountries
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/Size'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClickMetrics'
            text/csv:
              schema:
                type: string
              example: 'Country, Clicks

                US, 5

                '
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/cities:
    get:
      summary: Get Metrics for a Bitlink by City
      description: Returns the city origins of click traffic for the specified link.
      tags:
      - Bitlinks
      operationId: getMetricsForBitlinkByCities
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/Size'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CityMetrics'
            text/csv:
              schema:
                type: string
              example: 'City, Subregion, Region, Country, Clicks

                New York, , NY, US, 5

                '
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '402':
          description: UPGRADE_REQUIRED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequired'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/devices:
    get:
      summary: Get Metrics for a Bitlink by Device Type
      description: Returns the device types generating click traffic to the specified link.
      tags:
      - Bitlinks
      operationId: getMetricsForBitlinkByDevices
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/Size'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceMetrics'
            text/csv:
              schema:
                type: string
              example: 'Device Type, Clicks

                Desktop, 5

                '
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '402':
          description: UPGRADE_REQUIRED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeRequired'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/referrers:
    get:
      summary: Get Metrics for a Bitlink by Referrers
      description: Returns referrer click counts for the specified link.
      tags:
      - Bitlinks
      operationId: getMetricsForBitlinkByReferrers
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/Size'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClickMetrics'
            text/csv:
              schema:
                type: string
              example: 'Referrers, Domain/Sub-Domain, Clicks

                Other Sites, direct, 5

                '
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '429':
          description: MONTHLY_LIMIT_EXCEEDED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyLimitExceeded'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemporarilyUnavailable'
  /bitlinks/{bitlink}/referrer_name:
    get:
      summary: Get Metrics for a Bitlink by Referrer Name
      description: Returns referrer click counts for the specified link.
      tags:
      - Bitlinks
      operationId: getMetricsForBitlinkByReferrerName
      parameters:
      - $ref: '#/components/parameters/Bitlink'
      - $ref: '#/components/parameters/TimeUnit'
      - $ref: '#/components/parameters/UnitAmount'
      - $ref: '#/components/parameters/Size'
      - $ref: '#/components/parameters/UnitReferenceTimeStamp'
      responses:
        '200':
          description: SUCCESS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClickMetrics'
            text/csv:
              schema:
                type: string
              example: 'Referrer-Name,Clicks

                direct,4

                '
        '400':
          description: BAD_REQUEST
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '403':
          description: FORBIDDEN
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Forbidden'
        '404':
          description: NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '410':
          description: GONE
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gone'
        '500':
          description: INTERNAL_ERROR
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '503':
          description: TEMPORARILY_UNAVAILABLE
          content:
          

# --- truncated at 32 KB (72 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitly/refs/heads/main/openapi/bitly-bitlinks-api-openapi.yml