

On subsequent requests, submit them back to us as If-None-Match and If-Modified-Since, respectively. When you first request a resource, store these values.

Most API responses will include an ETag or Last-Modified header. You must use HTTP freshness headers to speed up your application and lighten the load on our servers. The Basecamp 4 API also provides the X-Total-Count header, which displays the total number of resources in the collection you are fetching. If the Link header is blank, that's the last page. Here's an example response header from requesting the third page of messages: Follow this convention to retrieve the next page of data-please don't build the pagination URLs yourself! The Basecamp 4 API follows the RFC5988 convention of using the Link header to provide URLs for the next page. In most cases, we use a geared pagination ratio with 15 results on page 1, 30 on page 2, 50 on 3, and then 100 on 4 and above. The number of requests that'll appear on each page is variable. Most collection APIs paginate their results.
Basecamp 3 integrations code#
You'll receive a 415 Unsupported Media Type response code if you don't include the Content-Type header. Alternatively you can send Accept: application/json. This means that you have to send the Content-Type header Content-Type: application/json charset=utf-8 when you're POSTing or PUTing data into Basecamp. The style is no root element and snake_case for object keys. User-Agent: Fabian's Ingenious Integration you don't include a User-Agent header, you'll get a 400 Bad Request response.Here are examples of acceptable User-Agent headers: We use this information to get in touch if you're doing something wrong (so we can warn you before you're blacklisted) or something awesome (so we can congratulate you). A link to your application or your email address.You must include a User-Agent header with both: Read the authentication guide to get started. OAuth 2.0 allows users to authorize your application to use Basecamp on their behalf without having to copy/paste API tokens or touch sensitive login information. In cURL, it looks like this:Ĭurl -s -H "Authorization: Bearer $ACCESS_TOKEN " | json_pp AuthenticationĪs mentioned above, to authenticate you must use OAuth 2.0. To make a request for all the projects on your account, append the projects index path to the base URL to form something like. The path is prefixed with the account ID, but no /api/v1 API prefix. Pagination is performed via the Link and X-Total-Count headersĪll URLs start with.We require OAuth 2.0 for authentication-no more Basic authentication.Here are some notable changes for the Basecamp 4 API: If you've used a previous version of the Basecamp API, you need to adapt your integration code. The core ingredients are the same, though: Basecamp 4 is a REST-style API that uses JSON for serialization and OAuth 2.0 for authentication.

All integrations will start fresh with the new API. The Basecamp 4 API is not compatible with the Basecamp Classic API or the Basecamp 2 API. We're happy to have you! Compatibility with previous Basecamp APIs Welcome to the Basecamp 4 API! If you're looking to integrate your application with Basecamp 4 or create your own application in concert with data inside of Basecamp 4, you're in the right place.
