Typekit API error handling

When things go wrong HTTP status codes will be used to describe error conditions:

The response will be in the requested output format, the "errors" attribute will contain more information about what went wrong. For example:

$ curl -s https://typekit.com/api/v1/json/kits
{
  "errors": [
    "Not authorized"
  ]
}

If the API format you're requesting isn't recognized it will respond with a plain text 404:

$ curl -s https://typekit.com/api/v1/sgml
Not Found

Some objects, notably font families, have multiple identifiers. The Typekit API will issue a 302 redirect to the primary endpoint for the object if a request is made using a different identifier.