執行API觸發的行銷活動 execute

在此頁面上:​擷取產生的cURL要求,並使用它透過API觸發您的即時API觸發行銷活動,並附上疑難排解指南,以便您解決傳送延遲和驗證錯誤。

啟動行銷活動後,您需要擷取產生的範例cURL請求,並將其用於API中以建置您的裝載並觸發行銷活動。

必讀 must-read

  • 行銷活動開始/結束日期 — 如果您在建立行銷活動時已設定特定的開始和/或結束日期,則不會在這些日期之外執行,且API呼叫將會失敗。

  • 呼叫逾時 — 對互動式訊息執行REST API的呼叫逾時60秒。 不過,萬一發生未預期的逾時情況,內部會重試以保證傳遞。

觸發行銷活動 trigger

  1. 開啟行銷活動,然後從​ cURL請求 ​區段複製並貼上裝載請求。 此裝載包含訊息中使用的所有個人化(設定檔和內容)變數。 行銷活動上線後,即可使用此功能。

    note important
    IMPORTANT
    cURL區段中的端點在標準和高輸送量行銷活動之間不同。
  2. 將此cURL請求用於API以建置您的裝載並觸發行銷活動。 如需詳細資訊,請參閱互動式訊息執行API檔案,其中列出標準和高輸送量行銷活動的所有端點。

    此頁面上也提供API呼叫範例。

疑難排解 troubleshooting

電子郵件傳遞延遲 delivery-delays

如果電子郵件傳送時間超過預期,請調查外部服務(例如雲端基礎結構提供者或電子郵件服務提供者)的潛在中斷或效能問題。 Journey Optimizer記錄會記錄訊息離開時間戳記,這有助於判斷傳送管道中是否發生延遲情形。

Azure cosmos DB驗證錯誤(500內部伺服器錯誤) cosmosdb-auth-errors

如果您在觸發API觸發的行銷活動時遇到​500內部伺服器錯誤,且系統記錄顯示來自Azure Cosmos DB的​ 403禁止存取 ​錯誤,其中包含訊息,例如:

「對您帳戶的存取權目前已撤銷,因為Azure Cosmos DB服務無法取得帳戶預設身分的AAD驗證Token」

此錯誤通常發生於Cosmos DB驗證所需的Azure服務主體已停用、刪除或設定錯誤時。

如何解決此問題
  1. 確認您的Azure服務主體 — 確認您的Azure服務主體或受管理的身分已啟用,且尚未在Azure Active Directory中停用或刪除。

  2. 檢查許可權 — 確認服務主體具有存取Azure Key Vault和Cosmos DB資源的必要許可權。 服務主體必須具有適當的角色指派,才能使用Azure Cosmos DB進行驗證。

  3. 檢閱Azure Cosmos DB CMK設定 — 如果您使用客戶自控金鑰(CMK),請參閱Azure Cosmos DB CMK疑難排解指南,以取得還原AAD權杖贏取的詳細步驟。

  4. 重新啟用並測試 — 更正設定後,如果服務主體已停用,請重新啟用服務主體,並重新測試您的交易式行銷活動API呼叫,以確認驗證成功且已傳送訊息。

note
NOTE
此問題通常是由於Cosmos DB驗證所需的Azure服務主體設定錯誤或意外停用所導致。 將服務主體保持啟用狀態並正確設定將可防止未來發生此錯誤。
AI Knowledge Reference

This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.

For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.

  • TL;DR: This page explains how to retrieve the generated cURL request of an activated API triggered campaign and use it in the APIs to trigger the campaign, with troubleshooting for email delivery delays and Azure Cosmos DB authentication errors.

Intents:

  • Retrieve the generated sample cURL request of a live API triggered campaign
  • Use the cURL request in the APIs to build the payload and trigger the campaign
  • Know that campaign start and end dates and a call timeout apply to the API call
  • Find the endpoints for standard and High throughput campaigns
  • Troubleshoot email delivery delays and 500 Internal Server Errors caused by Azure Cosmos DB authentication

Glossary:

  • cURL request: Section of the campaign that holds the generated sample request; its payload includes all personalization (profile and context) variables used in the message
  • Interactive Message Execution REST API: The API into which you use the cURL request to build your payload and trigger the campaign (product-specific)
  • Azure service principal: The identity required for Azure Cosmos DB authentication (product-specific)

Guardrails:

  • If a specific start and/or end date was configured when creating the campaign, the campaign is not executed outside these dates, and API calls fail.
  • The call to the Interactive Message Execution REST API has a timeout of 60 sec. Internal retries are in place in case of unexpected timeouts to guarantee the delivery.
  • The endpoints in the cURL section differ between standard and High throughput campaigns.

Prerequisites and permissions:

  • The campaign must be activated: the cURL request is available once the campaign is live.

Applicability:

  • Applies to API triggered campaigns, both standard and High throughput.

Terminology:

  • Canonical name: Execute an API triggered campaign
  • Acronym: CMK — Customer-Managed Keys (used on the page body)

FAQ:

  • Q: Where do I find the request to trigger my campaign? — Open the campaign, then copy-paste the payload request from the cURL request section. It is available once the campaign is live.
  • Q: What does the cURL payload contain? — All personalization (profile and context) variables used in the message.
  • Q: Why do my API calls fail? — If a specific start and/or end date was configured when creating the campaign, it is not executed outside these dates, and API calls fail.
  • Q: Where are the endpoints for standard and High throughput campaigns listed? — In the Interactive Message Execution API documentation.
  • Q: Where can I find API call examples? — On the messaging samples page of the Journey Optimizer APIs documentation.

Troubleshooting:

  • Email delivery delays — If email delivery times exceed expectations, investigate potential outages or performance issues with external services, such as cloud infrastructure providers or email service providers. Journey Optimizer logs record message departure timestamps, which can help determine whether delays occurred downstream in the delivery pipeline.
  • Azure cosmos DB authentication errors (500 internal server error) — Symptom: 500 Internal Server Errors when triggering API-triggered campaigns, and the system logs show a 403 Forbidden error from Azure Cosmos DB with a message such as “Access to your account is currently revoked because the Azure Cosmos DB service is unable to obtain the AAD authentication token for the account’s default identity”. Cause: the Azure service principal required for Cosmos DB authentication has been disabled, deleted, or misconfigured. Documented resolution: verify that the Azure service principal or managed identity is enabled and has not been disabled or deleted in your Azure Active Directory; check that the service principal has the necessary permissions and role assignments to access the Azure Key Vault and Cosmos DB resources; if you are using Customer-Managed Keys (CMK), consult the Azure Cosmos DB CMK troubleshooting guide; after correcting the configuration, re-enable the service principal if it was disabled, and re-test your transactional campaign API calls to confirm that authentication succeeds and messages are delivered.

Related pages:

  • Differences between standard and High throughput endpoints: High throughput campaigns (campaigns/api-triggered-high-throughput.md)
  • All endpoints for standard and High throughput campaigns: Interactive Message Execution API documentation (https://developer.adobe.com/journey-optimizer-apis/references/messaging#tag/execution)
  • API call examples: page linked as “this page”, messaging samples of the Journey Optimizer APIs documentation (https://developer.adobe.com/journey-optimizer-apis/references/messaging-samples)
  • Azure Cosmos DB CMK errors: Azure Cosmos DB CMK troubleshooting guide (https://learn.microsoft.com/en-us/azure/cosmos-db/cmk-troubleshooting-guide#azure-active-directory-token-acquisition-error)

Personas:

  • marketer: Can open an activated campaign and copy the generated cURL request, since it is available once the campaign is live. Can use this request to build the payload and trigger the campaign through the Interactive Message Execution REST API. The page states that the call has a timeout of 60 sec, with internal retries in place to guarantee delivery. Where: “Trigger the campaign”.

Onboarding:

  • Level: Intermediate
  • First minimal step: Open the campaign, then copy-paste the payload request from the cURL request section.
  • Success check: The cURL request section becomes available once the campaign is live.
  • Next: The endpoints in the cURL section differ for a High throughput campaign: Activate High throughput mode for API triggered campaigns (campaigns/api-triggered-high-throughput.md)
recommendation-more-help
journey-optimizer-help