kits/:kit

This is documentation for Typekit’s original API. This API is still supported, but we encourage you to try the newer Typekit Platform API. If you have any questions, email us.

The current draft version of a kit

Request methods

GET
Returns information about the draft version of a kit
POST
Updates the draft version of a kit, returns the updated information
DELETE
Deletes a kit

Parameters

Path parameters:

:kit
The kit ID

POST parameters:

name
Name of the kit
domains
A list of domains the kit will be used on
analytics
Boolean specifying whether to enable Google Analytics on the kit. This parameter has been deprecated, the result will always be "false" regardless of what is supplied.
families
A hash list of families included in the kit. The possible keys for each hash are:
id
The ID of the font family
subset
(optional) Character subset to use ("default" or "all"), defaults to "default" for new font families
variations
(optional) A list of font variations to use (formatted as a Font Variation Description), defaults to all available variations for new font families

When a POST parameter is included, it completely replaces the existing value with the new value.

Examples

Getting information about a kit

$ curl -s -H $tk_auth https://typekit.com/api/v1/json/kits/nfx3ygt | jsonpretty
{
  "kit": {
    "name": "Example",
    "id": "nfx3ygt",
    "analytics": false,
    "domains": [
      "example.com"
    ],
    "families": [
      {
        "id": "gkmg",
        "name": "Droid Sans",
        "slug": "droid-sans",
        "css_names": [
          "droid-sans-1",
          "droid-sans-2"
        ],
        "css_stack": "\"droid-sans-1\",\"droid-sans-2\",sans-serif",
        "variations": [
          "n4"
        ],
        "subset": "default"
      }
    ]
  }
}

Replacing the domains and name of a kit

$ curl -s -H $tk_auth -F name=Example -F domains[]=example.com https://typekit.com/api/v1/json/kits/nfx3ygt | jsonpretty
{
  "kit": {
    "name": "Example",
    "id": "nfx3ygt",
    "analytics": false,
    "domains": [
      "example.com"
    ],
    "families": [
      {
        "id": "gkmg",
        "name": "Droid Sans",
        "css_names": [
          "droid-sans-1",
          "droid-sans-2"
        ],
        "css_stack": "\"droid-sans-1\",\"droid-sans-2\",sans-serif",
        "variations": [
          "n4"
        ],
        "subset": "default"
      }
    ]
  }
}

Replacing the existing font families in a kit with "Droid Sans Mono" (all available variations and with all characters)

$ curl -s -H $tk_auth -F families[0][id]=vqgt -F families[0][subset]=all https://typekit.com/api/v1/json/kits/nfx3ygt | jsonpretty
{
  "kit": {
    "name": "Example",
    "id": "nfx3ygt",
    "analytics": false,
    "domains": [
      "example.com"
    ],
    "families": [
      {
        "id": "vqgt",
        "name": "Droid Sans Mono",
        "css_names": [
          "droid-sans-mono-1",
          "droid-sans-mono-2"
        ],
        "variations": [
          "n4"
        ],
        "subset": "all"
      }
    ]
  }
}