Parameters types in the Typekit API

This is documentation for Typekit’s original API. This API is still supported, but we encourage you to try the newer Typekit Platform API.

Most Typekit API endpoints require some parameters to be sent as part of the request.

All parameters are passed in the usual application/x-www-form-urlencoded format specified by the W3c HTML 4 specification. For example, name1=one&name2=two.

Most parameters are simple strings, but some endpoints require other types to be provided.

Object List Parameters

Object list parameters represent an ordered list of objects containing key/value pairs.

They are passed using PHP/Rails style nested hash parameters. For example families[0][id]=gkmg&families[0][subset]=default&families[1][id]=asdf describes a list of two objects, the first with the keys id and subset, and the second with just the key id.

Values in each object may be any of the other parameter types (list parameters, integers, booleans, or just plain strings) depending on the context.

Many languages make it easy to generate this type of parameter from native objects, such as http_build_query in PHP and Rack::Utils.build_nested_query in Ruby.

List Parameters

List parameters can be passed in two ways:


Integers are passed as decimal strings. For example page=12.


Booleans are passed using the strings true and false.