Bundles

/v3/bundle/archive

Archive a bundle for the authenticated user. Only a bundle's owner is allowed to archive a bundle.

Parameters

  • bundle_link - the URL corresponding to the bundle to be archived.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/bundle/archive?bundle_link=http%3A%2F%2Fbitly.com%2Fbundles%2Fbitlyapioauthdemo%2F1&access_token=ACCESS_TOKEN

Example Response

{
  "data": "OK",
  "status_code": 200,
  "status_txt": "OK"
}

/v3/bundle/bundles_by_user

Returns a list of public bundles created by a user.

Parameters

  • user - the user to get a list of bundles for.
  • expand_user - optional true or false - include extra user info in response.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/bundle/bundles_by_user?access_token=ACCESS_TOKEN&user=bitlyapioauthdemo

Example Response

{
  "data": {
    "bundles": [
      {
        "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/1",
        "bundle_owner": "bitlyapioauthdemo",
        "created_ts": 1332175561,
        "description": "Kittehs FTW",
        "last_modified_ts": 1332185530,
        "private": false,
        "title": ""
      },
      {
        "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/2",
        "bundle_owner": "bitlyapioauthdemo",
        "created_ts": 1332185626,
        "description": "",
        "last_modified_ts": 1332185626,
        "private": false,
        "title": ""
      }
    ]
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/bundle/clone

Clone a bundle for the authenticated user.

Parameters

  • bundle_link - the URL of the bundle to clone.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

Example Request:

API Address: https://api-ssl.bitly.com
GET /v3/bundle/clone?bundle_link=http%3A%2F%2Fbitly.com%2Fbundles%2Fbitlyapioauthdemo%2F1&access_token=ACCESS_TOKEN

Example Response:

{
  "data": {
    "bundle": {
      "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/3",
      "bundle_owner": "bitlyapioauthdemo",
      "created_ts": 1332185633,
      "description": "",
      "last_modified_ts": 1332185633,
      "links": [],
      "private": false,
      "title": ""
    }
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/bundle/collaborator_add

Add a collaborator to a bundle.

Parameters

  • bundle_link - the URL of the bundle.
  • collaborator - bitly login or email address of the collaborator to add.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

NOTE: If the collaborator was invited, the response will have an extra collab_token field containing the token emailed to the collaborator.

/v3/bundle/collaborator_remove

Remove a collaborator from a bundle.

Parameters

  • bundle_link - the URL of the bundle.
  • collaborator - bitly login of the collaborator to remove.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

/v3/bundle/contents

Returns information about a bundle.

Parameters

  • bundle_link - the URL corresponding to the bundle to be returned.
  • expand_user - optional true or false - include extra user info in response.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/bundle/contents?bundle_link=http%3A%2F%2Fbitly.com%2Fbundles%2Fbitlyapioauthdemo%2F1&access_token=ACCESS_TOKEN

Example Response

{
  "data": {
    "bundle": {
      "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/1",
      "bundle_owner": "bitlyapioauthdemo",
      "created_ts": 1332175561,
      "description": "",
      "last_modified_ts": 1332177579,
      "links": [
        {
          "aggregate_link": "http://bit.ly/xx2UTg",
          "description": "Animated GIFs 4 Lyfe!",
          "display_order": 0,
          "link": "http://bit.ly/FWfWFP",
          "long_url": "http://bukk.it/asdf.gif",
          "title": "AAAAHHHH"
        },
        {
          "aggregate_link": "http://bit.ly/K49Ze",
          "description": "O LOOK IT'S KEYBOARD CAT",
          "display_order": 1,
          "link": "http://bit.ly/w8gWsd",
          "long_url": "http://www.youtube.com/watch?v=J---aiyznGQ",
          "title": "Keyboard Cat!"
        }
      ],
      "private": false,
      "title": "Here is a Bundle of Links!"
    }
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/bundle/create

Create a new bundle for the authenticated user.

Parameters

  • private (optional) - a value true or false designating the privacy setting of the bundle to be created (default: false).
  • title (optional) - the title of the bundle to be created.
  • description (optional) - a description of the bundle to be created.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/bundle/create?access_token=ACCESS_TOKEN

Example Response

{
  "data": {
    "bundle": {
      "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/3",
      "bundle_owner": "bitlyapioauthdemo",
      "created_ts": 1332185633,
      "description": "",
      "last_modified_ts": 1332185633,
      "links": [],
      "private": false,
      "title": ""
    }
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/bundle/edit

Edit a bundle for the authenticated user

Parameters

  • bundle_link - the URL corresponding to the bundle to be modified.
  • edit (optional) - a field designating which properties (e.g., title, description) are to be edited, allowing for these fields to be updated with empty values.
  • title (optional) - a title for the specified bundle.
  • description (optional) - a description for the specified bundle.
  • private (optional) - a true or false value representing whether or not the specified bundle should set to private.
  • preview (optional) - a true or false value representing whether or not content previews should be shown for the specified bundle's links.
  • og_image (optional) - the URL to the bundle's cover image.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/bundle/edit?bundle_link=http%3A%2F%2Fbitly.com%2Fbundles%2Fbitlyapioauthdemo%2F1&access_token=ACCESS_TOKEN&description=Kittehs+FTW

Example Response

{
  "data": {
    "bundle": {
      "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/1",
      "bundle_owner": "bitlyapioauthdemo",
      "created_ts": 1332175561,
      "description": "Kittehs FTW",
      "last_modified_ts": 1332185530,
      "links": [
        {
          "aggregate_link": "http://bit.ly/xx2UTg",
          "description": "Animated GIFs 4 Lyfe!",
          "display_order": 0,
          "link": "http://bit.ly/FWfWFP",
          "long_url": "http://bukk.it/asdf.gif",
          "title": "AAAAHHHH"
        },
        {
          "aggregate_link": "http://bit.ly/K49Ze",
          "description": "O LOOK IT'S KEYBOARD CAT",
          "display_order": 1,
          "link": "http://bit.ly/w8gWsd",
          "long_url": "http://www.youtube.com/watch?v=J---aiyznGQ",
          "title": "Keyboard Cat!"
        }
      ],
      "private": false,
      "title": ""
    }
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/bundle/pending_collaborator_remove

Removes a pending/invited collaborator from a bundle.

Parameters

  • bundle_link - the URL of the bundle.
  • collaborator - bitly login or email address of the collaborator to remove.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

/v3/bundle/reorder

Re-order the links in a bundle.

Parameters

  • bundle_link - the URL corresponding to the bundle in which the link will be reordered.

  • link - one ore more Bitlinks to be reordered

The link parameter should be repeated for each link to be reordered, and each link should be given in the order in which it should appear in the bundle.

Return Values

  • bundle_owner: the bitly user who owns this bundle (the authenticated user on whose behalf the bundle was created).
  • created_ts: a timestamp representing the time at which this bundle was created.
  • description: a description of this bundle.
  • bundle_link: a URL pointing directly to this bundle.
  • last_modified_ts: a timestamp representing the last time this bundle was modified.
  • private: a true/false value indicating whether this bundle is set to be private.
  • links - the links in the bundle. Each link returns the following fields:
    • aggregate_link: the global Bitlink for the specified long_url, which can be used to track aggregate stats across all matching Bitlinks.
    • link: the Bitlink for the specified long_url, unique to this user's account.
    • description: a description of this link.
    • title: the title of this link, automatically populated from the destination page title and editable with the /v3/bundle/link_edit endpoint.
    • long_url: the destination long URL for this link.
    • display_order: the order in which this link will display, starting with 0 for the link to be displayed first.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/bundle/reorder?bundle_link=http%3A%2F%2Fbitly.com%2Fbundles%2Fbitlyapioauthdemo%2F1&access_token=ACCESS_TOKEN&link=http%3A%2F%2Fbit.ly%2Fxx2UTg&link=http%3A%2F%2Fbit.ly%2FK49Ze&link=http%3A%2F%2Fbit.ly%2FgHwqEE

Example Response

{
  "data": {
    "bundle": {
      "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/1",
      "bundle_owner": "bitlyapioauthdemo",
      "created_ts": 1332175561,
      "description": "",
      "last_modified_ts": 1332183044,
      "links": [
        {
          "aggregate_link": "http://bit.ly/xx2UTg",
          "description": "Animated GIFs 4 Lyfe!",
          "display_order": 0,
          "link": "http://bit.ly/FWfWFP",
          "long_url": "http://bukk.it/asdf.gif",
          "title": "AAAAHHHH"
        },
        {
          "aggregate_link": "http://bit.ly/K49Ze",
          "description": "O LOOK IT'S KEYBOARD CAT",
          "display_order": 1,
          "link": "http://bit.ly/w8gWsd",
          "long_url": "http://www.youtube.com/watch?v=J---aiyznGQ",
          "title": "Keyboard Cat!"
        },
        {
          "aggregate_link": "http://bit.ly/gHwqEE",
          "description": "",
          "display_order": 2,
          "link": "http://bit.ly/wc5dQK",
          "long_url": "http://icanhascheezburger.com/lolrus/",
          "title": "The Story Of The Lolrus - Lolcats 'n' Funny Pictures of Cats - I Can Has Cheezburger?"
        }
      ],
      "private": false,
      "title": "Here is a Bundle of Links!"
    }
  },
  "status_code": 200,
  "status_txt": "OK"
}

/v3/bundle/view_count

Get the number of views for a bundle.

Parameters

  • bundle_link - the URL of the bundle.

Return Values

  • bundle_link - an echo of the input bundle_link parameter.
  • view_count - the number of times the bundle has been viewed.

/v3/user/bundle_history

Returns all bundles this user has access to (public + private + collaborator).

Parameters

  • expand_user - optional true or false - include extra user info in response.

Example Request

API Address: https://api-ssl.bitly.com
GET /v3/user/bundle_history?access_token=ACCESS_TOKEN

Example Response

{
  "data": {
    "bundles": [
      {
        "aggregate_link": "http://bit.ly/ziAHJz",
        "bundle_link": "http://bitly.com/bundles/bitlyapioauthdemo/1",
        "bundle_owner": "bitlyapioauthdemo",
        "created_ts": 1332175561,
        "description": "",
        "last_modified_ts": 1332177579,
        "private": false,
        "title": "Here is a Bundle of Links!",
        "user_link": "http://bit.ly/xhGb5J"
      }
    ]
  },
  "status_code": 200,
  "status_txt": "OK"
}