code: func (c *Manager) CreateCategory(ctx context.Context, category *Category) (string, error) {
  	// create avoids the annoyance of CreateTag requiring field keys to be included in the request,
  	// even though the field value can be empty.
  	type create struct {
  		Name            string   `json:"name"`
  		Description     string   `json:"description"`
  		Cardinality     string   `json:"cardinality"`
  		AssociableTypes []string `json:"associable_types"`
  	}
  	spec := struct {
  		Category create `json:"create_spec"`
  	}{
  		Category: create{
  			Name:            category.Name,
  			Description:     category.Description,
  			Cardinality:     category.Cardinality,
  			AssociableTypes: category.AssociableTypes,
  		},
  	}
  	if spec.Category.AssociableTypes == nil {
  		// otherwise create fails with invalid_argument
  		spec.Category.AssociableTypes = []string{}
  	}
  	url := internal.URL(c, internal.CategoryPath)
  	var res string
  	return res, c.Do(ctx, url.Request(http.MethodPost, spec), &res)
  }
docs: // CreateCategory creates a new category and returns the category ID.