创建市场活动

您可通过此API创建市场活动。还可以设置市场活动名称,主题, 发件人地址,从邮箱列表中选择。

所需Scope

  • ZohoCampaigns.campaign.CREATE

其它可用scope

  • ZohoCampaigns.campaign.CREATE-UPDATE (CREATE + UPDATE)
  • ZohoCampaigns.campaign.WRITE (CREATE + UPDATE + DELETE)
  • ZohoCampaigns.campaign.ALL (CREATE + UPDATE + DELETE + READ)

Header:

  • 文本类型:application/x-www-form-urlencoded
  • Header-验证: Zoho-oauthtoken <access_token>

请求类型:

  • Post

请求 URL

https://campaigns.zoho.com/api/v1.1/createCampaign

列表

参数

数据类型

说明

resfmt

String

xml (或)json

campaignname*

String

市场活动的名称

from_email*

String

电子邮件地址

subject*

String

标题

content_url

String

为市场活动内容提供有效的HTML URL

list_details*

JSON(UTF-8 encoded)

{listkey:[segment_ID,...],listkey:...} - encoded value (可以从getmailinglists API中获得segment ID)

可能出现的错误

错误代码描述
500处理请求时发生内部错误。
1001"resfmt"模式不匹配。
1004导入内容的URL无效。
3001市场活动的内容不能超过300000个字符。
6606未为此次活动选择任何列表。

如果错误代码不在上述范围,请点击 这里

示例 XML 请求


				https://campaigns.zoho.com/api/v1.1/createCampaign?resfmt=xml&campaignname=newsletter&from_email=patricia@zoho.com&subject=festive offer&list_details=%7B34594177d382061b27dd314490758f5d%3A%5B4000000023018 %5D%2C34594177d382061b939770a6d682df24%3A%5B%5D%7D%0A			

示例响应


				<response>
	<message>Campaign created successfully</message>
	<campaignKey>10234695</campaignKey>
	<code>200</code>
	<uri>/api/v1.1/createCampaign</uri>
</response>			

示例 JSON 请求


				https://campaigns.zoho.com/api/v1.1/createCampaign?resfmt=json&campaignname=newsletter&from_email=patricia@zoho.com&subject=festive offers& list_details=%7B34594177d382061b27dd314490758f5d%3A%5B4000000023018 %5D%2C34594177d382061b939770a6d682df24%3A%5B%5D%7D%0A			

示例响应


				{
  "message": "Campaign created successfully",
  "campaignKey": "10234695",
  "code": "200",
  "uri": "/api/v1.1/createCampaign"
}