Introduction

The ittybit API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

You can use the API to create, retrieve, update, and delete the media in your account.

All requests use a base URL of https://api.ittybit.com

Read more: Ittybit API Quick Start Tutorial

Authentication

The Ittybit API uses Bearer Tokens to authenticate requests. You can view and manage your account's tokens in the Ittybit Admin.

You may setup different tokens for each of your development environments to separate development from staging from production operations.

Your tokens carry many privileges, and should be kept secret. Do not share them in publicly accessible areas such as GitHub, client-side code, etc.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Read more: Authenticate API Requests

Images

To upload an image, you post to the Images endpoint. You can also retrieve and update individual images as well as list all images. Images are identified by a unique, random ID.

Read more: Ittybit Guide to Images

List Images

Gets a list of all the images available in your ittybit account. Accepts query parameters which allow you to filter results. Responses include cursors you can use to fetch the next batch.

Read more: Pagination and Infinite Scrolling with the Ittybit API

    Query Parameters

  • limit

    The maximum number of results to return. Default is 50.

    integer(min:1,max:250)

  • orderBy

    How to sort the results. Valid values are timestamp or filesize. Default is timestamp.

    string

  • order

    Whether to sort results in ascending or descending order. Default is 'desc'.

    string("asc"|"desc")

Create Image

Add an image to your ittybit account. You can either ingest from a publicly-accessible URL or upload a file. One of url or file is required.

Read more: Upload an Image with the Ittybit API

    Request Body Parameters

  • url

    A publicly accessible URL to image

    string

  • file

    An image file. Accepted formats are image/jpeg, image/png, image/gif, image/webp. Max dimension 10,000px. Max size 100MB.

    file

Get Image

Gets an image object by ID and returns that image's links and metadata

    URL Parameters

  • id Required

    Image ID

    string

Delete Image

Deletes an image object by ID and returns a success message on completion

    URL Parameters

  • id Required

    Image ID

    string

Videos

To upload a video, you post to the Videos endpoint. You can also retrieve and update individual videos as well as list all videos. Videos are identified by a unique, random ID.

Read more: Ittybit Guide to Videos

List Videos

Gets a list of all the videos available in your ittybit account. Accepts query parameters which allow you to filter results. Responses include cursors you can use to fetch the next batch.

Read more: Pagination and Infinite Scrolling with the Ittybit API

    Query Parameters

  • limit

    The maximum number of results to return. Default is 50.

    integer(min:1,max:250)

  • orderBy

    How to sort the results. Valid values are timestamp or filesize. Default is timestamp.

    string

  • order

    Whether to sort results in ascending or descending order. Default is 'desc'.

    string("asc"|"desc")

Create Video

Add a video to your ittybit account. You can either ingest from a publicly-accessible URL or upload a file. One of url or file is required.

Read more: Upload an Video with the Ittybit API

    Request Body Parameters

  • url

    A publicly accessible URL to video

    string

  • file

    An video file. Accepted formats are video/jpeg, video/mp4, video/gif, video/webp. Max dimension 10,000px. Max size 100MB.

    file

Get Video

Gets a video object by ID and returns that video's links and metadata

    URL Parameters

  • id Required

    Video ID

    string

Delete Video

Deletes a video object by ID and returns a success message on completion

    URL Parameters

  • id Required

    Video ID

    string