Skip to content

Quickstart

This guide takes you from zero to your first response in about five minutes.

  1. Activate the API in COMMITLY. Sign in to app.commitly.com, open Add-ons and click Connect on the COMMITLY Public API tile. COMMITLY shows your Client ID and Client secret right there. The API is included from the Business Edition.

  2. Request an access token. Send your credentials to the token endpoint. The token is valid for 5 minutes.

    Terminal window
    curl -X POST https://app.commitly.com/api/auth/token/ \
    -d grant_type=client_credentials \
    -d client_id="$COMMITLY_CLIENT_ID" \
    -d client_secret="$COMMITLY_CLIENT_SECRET"
  3. Make your first call. List the categories of your company. Send the token in the Authorization header with the Bearer prefix.

    Terminal window
    curl https://app.commitly.com/api/categories/ \
    -H "Authorization: Bearer $ACCESS_TOKEN"

    The response lists every category with its id. You need these IDs whenever you create invoices or budgets.

  • Authentication: token lifetime, renewal and errors.
  • Data model: how categories, plans, scenarios and the forecast fit together.
  • Testing: what to know before you write to a live account.