code: func (api *API) CreateUserAgentRule(zoneID string, ld UserAgentRule) (*UserAgentRuleResponse, error) {
  	switch ld.Mode {
  	case "block", "challenge", "js_challenge", "whitelist":
  		break
  	default:
  		return nil, errors.New(`the User-Agent Block rule mode must be one of "block", "challenge", "js_challenge", "whitelist"`)
  	}
  
  	uri := "/zones/" + zoneID + "/firewall/ua_rules"
  	res, err := api.makeRequest("POST", uri, ld)
  	if err != nil {
  		return nil, errors.Wrap(err, errMakeRequestError)
  	}
  
  	response := &UserAgentRuleResponse{}
  	err = json.Unmarshal(res, &response)
  	if err != nil {
  		return nil, errors.Wrap(err, errUnmarshalError)
  	}
  
  	return response, nil
  }
docs: // CreateUserAgentRule creates a User-Agent Block rule for the given zone ID.
  //
  // API reference: https://api.cloudflare.com/#user-agent-blocking-rules-create-a-useragent-rule