Travis CI API Docs

Authentication

To authenticate against the Travis CI API, you need an API access token generated by the Travis CI command line client.

Tokens for open source projects, private projects and enterprise installations of Travis CI are not interchangeable.

API token for an open source project on travis-ci.org

  1. Generate the token:

    travis login
    travis token
    
  2. Include the token in the Authorization header of each request to https://api.travis-ci.org:

    curl -H "Travis-API-Version: 3" \
         -H "Authorization: token xxxxxxxxxxxx" \
         https://api.travis-ci.org/repos
    

API token for a private project on travis-ci.com

  1. Generate the token:

    travis login --pro
    travis token --pro
    
  2. Include the token in the Authorization header of each request https://api.travis-ci.com:

    curl -H "Travis-API-Version: 3" \
         -H "Authorization: token xxxxxxxxxxxx" \
         https://api.travis-ci.com/repos