跳到内容
Influence
Esc
↑↓导航↵打开⌘J预览

准备变更

使用{input: {…}}准备变更。准备操作不会批准或执行发布。准备成功后会返回confirmationCapability和expiresAt;工具失败时仍可能使用HTTP 200。JSON请求上限为65,536字节。

POST/api/v1/tools/{tool}/prepare
授权
AuthorizationBearer令牌 · header必需

具有限定权限范围的Influence API密钥,或受支持的OAuth访问令牌。不要将凭据放入URL或工具输入。

路径参数
toolstring必需

GET /api/v1/tools返回的工具名称。发现结果会按此凭据的权限筛选;存在结构定义不代表工具可用。

请求体
必需application/json
inputobject必需
响应
200

准备结果或工具失败。

至少满足以下一项:
PreparedTool
confirmationCapabilityConfirmationCapability必需

请在expiresAt之前,通过X-Publish-Confirmation请求头传回此值。

最小长度:32 · 最大长度:4096 · 匹配^[A-Za-z0-9._~-]+$
expiresAtstring<date-time>必需
匹配^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
inputDigeststring必需
匹配^[0-9a-f]{64}$
statusstring必需
summaryJsonValue | null
展开属性
至少满足以下一项:
string
string
number
number
boolean
boolean
null
null
JsonValue[]
JsonValue类型的数组
循环引用JsonValue。
object
object
toolNamestring必需
允许值:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
ToolError
errorobject必需
展开属性
codestring必需
允许值:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestring必需
最小长度:1 · 最大长度:2048
retryableboolean必需
okboolean必需
toolNamestring必需
允许值:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
400

请求无效。不接受查询参数。工具验证失败时可能使用工具错误封装结构。

至少满足以下一项:
TransportError
errorobject必需
展开属性
codestring必需
messagestring必需
retryableboolean必需
ToolError
errorobject必需
展开属性
codestring必需
允许值:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestring必需
最小长度:1 · 最大长度:2048
retryableboolean必需
okboolean必需
toolNamestring必需
允许值:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
401

Bearer凭据缺失、无效或已过期。

errorobject必需
展开属性
codestring必需
messagestring必需
retryableboolean必需
403

凭据缺少所需权限。

errorobject必需
展开属性
codestring必需
messagestring必需
retryableboolean必需
404

供程序调用的API或请求的工具不可用。

errorobject必需
展开属性
codestring必需
messagestring必需
retryableboolean必需
413

请求超过字节数限制。

errorobject必需
展开属性
codestring必需
允许值:AI_SCHEDULING_LIMIT_REACHEDAI_SCHEDULING_UNAVAILABLEINVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestring必需
最小长度:1 · 最大长度:2048
retryableboolean必需
okboolean必需
toolNamestring必需
允许值:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsTool
429

已超过速率限制,可以重试请求。

errorobject必需
展开属性
codestring必需
messagestring必需
retryableboolean必需
503

API或其上游执行环节不可用。

errorobject必需
展开属性
codestring必需
messagestring必需
retryableboolean必需
请求
curl -X POST 'https://influence.so/api/v1/tools/string/prepare' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "property1": "string",
    "property2": "string"
  }
}'
响应
{
  "confirmationCapability": "stringstringstringstringstringst",
  "expiresAt": "2019-08-24T14:15:22Z",
  "inputDigest": "string",
  "status": "confirmation_required",
  "summary": "string",
  "toolName": "adAuditQuote"
}