> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invoca.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Advertiser Campaigns

export const MethodTag = ({method = "GET", path, label, colors = {}}) => {
  const presets = {
    get: {
      label: "GET",
      light: {
        bg: "#DCFCE7",
        text: "#15803D"
      },
      dark: {
        bg: "rgba(34,197,94,0.16)",
        text: "#4ADE80"
      }
    },
    post: {
      label: "POST",
      light: {
        bg: "#DBEAFE",
        text: "#1D4ED8"
      },
      dark: {
        bg: "rgba(59,130,246,0.16)",
        text: "#60A5FA"
      }
    },
    put: {
      label: "PUT",
      light: {
        bg: "#FEF3C7",
        text: "#B45309"
      },
      dark: {
        bg: "rgba(245,158,11,0.16)",
        text: "#FBBF24"
      }
    },
    patch: {
      label: "PATCH",
      light: {
        bg: "#F3E8FF",
        text: "#7E22CE"
      },
      dark: {
        bg: "rgba(168,85,247,0.16)",
        text: "#C084FC"
      }
    },
    delete: {
      label: "DEL",
      light: {
        bg: "#FEE2E2",
        text: "#B91C1C"
      },
      dark: {
        bg: "rgba(239,68,68,0.16)",
        text: "#F87171"
      }
    }
  };
  const fallback = {
    label: String(method).toUpperCase(),
    light: {
      bg: "#F3F4F6",
      text: "#374151"
    },
    dark: {
      bg: "rgba(156,163,175,0.16)",
      text: "#D1D5DB"
    }
  };
  const preset = presets[String(method).toLowerCase()] || fallback;
  const light = {
    ...preset.light,
    ...colors.light || ({})
  };
  const dark = {
    ...preset.dark,
    ...colors.dark || ({})
  };
  const css = `
    .invoca-method-tag {
      display: inline-block;
      padding: 1px 8px;
      margin-right: 8px;
      border-radius: 8px;
      font-size: 10px;
      line-height: 18px;
      font-weight: 700;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      vertical-align: middle;
      background: var(--imt-bg);
      color: var(--imt-fg);
    }
    .invoca-method-path {
      font-size: 13px;
    }
    [data-component-part="accordion-icon"]:has(.invoca-method-tag) {
      width: auto;
      height: auto;
      flex-shrink: 0;
    }
    [data-component-part="accordion-icon"] .invoca-method-tag {
      margin-right: 0;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) {
      flex-wrap: wrap;
      row-gap: 6px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-icon"] {
      flex: 1 1 0;
      min-width: 0;
      overflow-wrap: anywhere;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title-container"] {
      flex: 0 0 calc(100% - 8px);
      padding-left: 20px;
    }
    [data-component-part="accordion-button"]:has(.invoca-method-tag) [data-component-part="accordion-title"] {
      font-size: 12px;
    }
    .dark .invoca-method-tag,
    [data-theme="dark"] .invoca-method-tag {
      background: var(--imt-bg-dark);
      color: var(--imt-fg-dark);
    }
  `;
  const vars = {
    "--imt-bg": light.bg,
    "--imt-fg": light.text,
    "--imt-bg-dark": dark.bg,
    "--imt-fg-dark": dark.text
  };
  return <span>
      <style>{css}</style>
      <span className="invoca-method-tag" style={vars}>
        {label || preset.label}
      </span>
      {path ? <code className="invoca-method-path">{path}</code> : null}
    </span>;
};

Advertiser Campaigns can be managed using the Network API. In addition to create, update, and show operations, this interface provides additional endpoints including go\_live, archive, and quick\_stats.

Note that the `<advertiser_id_from_network>` and `<advertiser_campaign_id_from_network>` are the network’s id for those objects, not Invoca’s.

`/api/2019-05-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>.json`

We support passing back current\_terms and future\_terms on campaigns. The current properties of the campaign are reflected in current\_terms. All changes to the campaign are staged in future\_terms. Once the campaign goes live, future\_terms transition over to current\_terms.

You can set budgets on your campaign. There are three budget types, budget\_cap\_alert which is based on commissions, periodic\_call\_cap\_alert, which is based on the number of calls in a given period, and concurrent\_call\_cap\_alert, which is based on the number of simultaneous calls. These budget activities are only applicable for AffiliateEnabled campaigns (Known in the platform as a “Publisher Promotion” Campaign Type.)

You are not allowed to delete campaigns.

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Property</p></th><th className="head"><p>Type</p></th><th className="head"><p>Value</p></th></tr></thead><tbody><tr className="row-even"><td><p>id</p></td><td><p>integer (read-only)</p></td><td><p>The internal Invoca id for this Advertiser Campaign.</p></td></tr><tr className="row-odd"><td><p>id\_from\_network</p></td><td><p>string</p></td><td><p>The network object\_id for this Advertiser Campaign. Unique within network. Not required when auto-generation is enabled at network level.</p></td></tr><tr className="row-even"><td><p>name</p></td><td><p>string</p></td><td><p>Campaign name.</p></td></tr><tr className="row-odd"><td><p>campaign\_type</p></td><td><p>string</p></td><td><p>2 Campaign Types Supported: “AffiliateEnabled” ‐ Advertiser Campaign that allows Affiliates to promote it. Includes Payin and Payouts for qualified Calls. “DirectOnly” ‐ Advertiser Campaign used for internal marketing. No ability to promote via Affiliates or setup Payin and Payouts for Calls.</p></td></tr><tr className="row-even"><td><p>description</p></td><td><p>string</p></td><td><p>Campaign Description.</p></td></tr><tr className="row-odd"><td><p>url</p></td><td><p>string</p></td><td><p>Click URL Template.</p></td></tr><tr className="row-even"><td><p>object\_url</p></td><td><p>string (read-only)</p></td><td><p>URL for reaching the advertiser campaign in the UI.</p></td></tr><tr className="row-odd"><td><p>timezone</p></td><td><p>string</p></td><td><p>Supported Time Zones: <a className="reference external" href="http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html">[http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html](http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html)</a></p></td></tr><tr className="row-even"><td><p>campaign\_language</p></td><td><p>string</p></td><td><p>Supported Campaign Languages: “English”, “French”, “Spanish”.</p></td></tr><tr className="row-odd"><td><p>campaign\_country</p></td><td><p>string</p></td><td><p>Supported Countries: “US”, “CA”, “UK”, “AU”, “CN”, “FI”, “FR”, “DE”, “HK”, “IT”, “JP”, “NL”, “SG”, “SE”, “CH”.</p></td></tr><tr className="row-even"><td><p>operating\_24\_7</p></td><td><p>boolean</p></td><td /></tr><tr className="row-odd"><td><p><strong>affiliate\_payout</strong></p></td><td /><td /></tr><tr className="row-even"><td><p><strong>policies</strong></p></td><td /><td /></tr><tr className="row-odd"><td><p>currency</p></td><td><p>string</p></td><td><p>USD, GBP, EUR.</p></td></tr><tr className="row-even"><td><p>amount</p></td><td><p>decimal</p></td><td><p>Payout Amount.</p></td></tr><tr className="row-odd"><td><p>condition</p></td><td><p>string</p></td><td><p>Condition options depend on the following Campaign Setup items being in place: Duration (seconds/minutes) and (greater than, greater than or equal to, less than, less than or equal to, equal to), Connect Duration (seconds/minutes) and (greater than, greater than or equal to, less than, less than or equal to, equal to), Repeat, In Region (specified across multiple Regions), During Hours, Key Press, Is Mobile, Is Landline, Send SMS All may be grouped with logic operators (AND/OR/NOT).</p></td></tr><tr className="row-even"><td><p>type</p></td><td><p>string</p></td><td><p>One of: Base, Bonus.</p></td></tr><tr className="row-odd"><td><p><strong>advertiser\_payin</strong></p></td><td /><td /></tr><tr className="row-even"><td><p><strong>policies</strong></p></td><td /><td /></tr><tr className="row-odd"><td><p>currency</p></td><td><p>string</p></td><td><p>Supported Currencies: ‐ USD, GBP, EUR.</p></td></tr><tr className="row-even"><td><p>amount</p></td><td><p>integer</p></td><td><p>Advertiser Payin Amount.</p></td></tr><tr className="row-odd"><td><p>condition</p></td><td><p>string</p></td><td><p>Condition options depend on the following Campaign Setup items being in place: Duration (seconds/minutes) and (greater than, greater than or equal to, less than, less than or equal to, equal to), Connect Duration (seconds/minutes) and (greater than, greater than or equal to, less than, less than or equal to, equal to), Repeat, In Region (specified across multiple Regions), During Hours, Key Press, Is Mobile, Is Landline, Send SMS. All may be grouped with logic operators (AND/OR/NOT).</p></td></tr><tr className="row-even"><td><p>type</p></td><td><p>string</p></td><td><p>One of: Base, Bonus.</p></td></tr><tr className="row-odd"><td><p><strong>hours</strong></p></td><td /><td /></tr><tr className="row-even"><td><p>\[day of week]\_open (e.g. friday\_open)</p></td><td><p>string</p></td><td><p>Open Hours. In seconds past midnight (e.g. 0 for midnight, 32400 for 9:00 AM).</p></td></tr><tr className="row-odd"><td><p>\[day of week]\_close (e.g. friday\_close)</p></td><td><p>string</p></td><td><p>Closed Hours. In seconds past midnight (e.g. 0 for midnight, 75600 for 9:00 PM).</p></td></tr><tr className="row-even"><td><p>\[day of week]\_closed (e.g. sunday\_closed)</p></td><td><p>string</p></td><td><p>true, false, or null. Whether the business is closed that day of the week.</p></td></tr><tr className="row-odd"><td><p><strong>named\_regions</strong></p></td><td /><td /></tr><tr className="row-even"><td><p>name</p></td><td><p>string</p></td><td><p>Region Name.</p></td></tr><tr className="row-odd"><td><p><strong>regions</strong></p></td><td /><td /></tr><tr className="row-even"><td><p>region\_type</p></td><td><p>string</p></td><td><p>Region Type. Can be one of: Zone, City, State, Country.</p></td></tr><tr className="row-odd"><td><p>value</p></td><td><p>string</p></td><td><p>Region Value, e.g. “Sacramento, CA”, or just “CA”.</p></td></tr><tr className="row-even"><td><p>ivr\_tree</p></td><td><p>hash</p></td><td><p>See following Advertiser Campaign IVR Section.</p></td></tr><tr className="row-odd"><td><p><strong>budget\_activities</strong></p></td><td /><td><p>Only applicable for AffiliateEnabled campaigns.</p></td></tr><tr className="row-even"><td><p><strong>budget\_cap\_alert</strong></p></td><td /><td /></tr><tr className="row-odd"><td><p>reset\_period</p></td><td><p>string  (required)</p></td><td><p>Budget will reset based on this entry. One of: Daily, Weekly, Monthly, Quarterly, Ongoing.</p></td></tr><tr className="row-even"><td><p>starts\_at</p></td><td><p>date (required)</p></td><td><p>Budget Start.</p></td></tr><tr className="row-odd"><td><p>budget\_currency</p></td><td><p>string (required)</p></td><td><p>Budget Currency.</p></td></tr><tr className="row-even"><td><p>time\_zone</p></td><td><p>string (required)</p></td><td><p>Supported Time Zones: “Pacific Time (US & Canada)”, “Mountain Time (US & Canada)”, “Central Time (US & Canada)”, “Eastern Time (US & Canada)”, “London”, “UTC”.</p></td></tr><tr className="row-odd"><td><p>budget\_amount</p></td><td><p>decimal (required)</p></td><td><p>Budget Amount.</p></td></tr><tr className="row-even"><td><p>include\_call\_fees</p></td><td><p>boolean</p></td><td><p>True if you want call fees to be included in the budget.</p></td></tr><tr className="row-odd"><td><p><strong>periodic\_call\_cap\_alert</strong></p></td><td /><td /></tr><tr className="row-even"><td><p>reset\_period</p></td><td><p>string (required)</p></td><td><p>Budget will reset based on this entry. One of: Daily, Weekly, Monthly, Quarterly, Ongoing.</p></td></tr><tr className="row-odd"><td><p>starts\_at</p></td><td><p>date (required)</p></td><td><p>Call Cap Start.</p></td></tr><tr className="row-even"><td><p>budget\_currency</p></td><td><p>string (required)</p></td><td><p>Budget Currency.</p></td></tr><tr className="row-odd"><td><p>time\_zone</p></td><td><p>string (required)</p></td><td><p>Supported Time Zones: “Pacific Time (US & Canada)”, “Mountain Time (US & Canada)”, “Central Time (US & Canada)”, “Eastern Time (US & Canada)”, “UTC”.</p></td></tr><tr className="row-even"><td><p>budget\_amount</p></td><td><p>decimal (required)</p></td><td><p>Budget Amount.</p></td></tr><tr className="row-odd"><td><p>auto\_approve</p></td><td><p>string</p></td><td><p>One of: All, None, Approved\_Affiliates Default: None This controls if affiliates are automatically approved when applying to the campaign.</p></td></tr><tr className="row-even"><td><p>visibility</p></td><td><p>string</p></td><td><p>One of: All, None, Approved\_Affiliates Default: All This controls the level of visibility publishers have when applying to campaigns.</p></td></tr><tr className="row-odd"><td><p>expiration\_date</p></td><td><p>string</p></td><td><p>date string (ex. ‘2015‐01‐01’). Read only.</p></td></tr><tr className="row-even"><td><p>default\_creative\_id\_from\_network</p></td><td><p>integer</p></td><td><p>Default Creative ID.</p></td></tr><tr className="row-odd"><td><p><strong>concurrent\_call\_cap\_alert</strong></p></td><td /><td /></tr><tr className="row-even"><td><p>budget\_amount</p></td><td><p>decimal (required)</p></td><td><p>Budget Amount.</p></td></tr><tr className="row-odd"><td><p>timeout</p></td><td><p>integer</p></td><td><p>Seconds to wait for the campaign to go live. Between 2 and 60.</p></td></tr></tbody></table>

## Advertiser Campaign IVRs

When creating an advertiser campaign, you need to provide some call flow logic through an IVR tree. Depending on the advertiser/campaign type (direct, bundled, etc) you may use the following node types:

Node Parameters and Usage

\* => required parameter

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Node Type</p></th><th className="head"><p>Parameters</p></th><th className="head"><p>Usage</p></th></tr></thead><tbody><tr className="row-even"><td><p>Menu</p></td><td><p>\*prompt</p><p>asr\_phrases</p><p>confirm\_response\_enabled</p></td><td><p>Allows the caller to select from up to 9 choices (e.g. choosing a department, selecting a language, etc).</p></td></tr><tr className="row-odd"><td><p>Connect</p></td><td><p>prompt</p><p>\*destination\_phone\_number</p><p>\*destination\_country\_code</p><p>\*destination\_extension</p><p>asr\_phrases</p></td><td><p>Forwards the call to a selected phone number after optionally reading a prompt.</p></td></tr><tr className="row-even"><td><p>EndCall</p></td><td><p>prompt</p><p>asr\_phrases</p></td><td><p>Ends the call after optionally reading a prompt.</p></td></tr><tr className="row-odd"><td><p>SmsPromo</p></td><td><p>\*prompt</p><p>\*sms\_promo\_copy</p><p>sms\_promo\_delay</p><p>sms\_promo\_sender</p><p>asr\_phrases</p></td><td><p>Provide the option for a user to receive a text message with a special promotion.</p></td></tr><tr className="row-even"><td><p>Condition</p></td><td><p>\*condition</p><p>asr\_phrases</p></td><td><p>If/else option for a call based on the qualities of the call/caller.</p></td></tr><tr className="row-odd"><td><p>VerifyLocation</p></td><td><p>prompt</p><p>asr\_phrases</p></td><td><p>Prompts the caller to verify the guessed location or confirm through input. Useful if geographical data is important or useful in a condition node.</p></td></tr><tr className="row-even"><td><p>DynamicRoute (beta - read only)</p></td><td><p>\*dynamic\_route\_destination</p><p>asr\_phrases</p></td><td><p>Forwards the call to a destination that is extracted from a custom data field specified in dynamic\_route\_destination. The destination must be a phone number or if you are SIP integrated, can be a string that is routable by your SIP infrastructure.</p></td></tr><tr className="row-odd"><td><p>AnyKeyPress</p></td><td><p>\*prompt</p><p>asr\_phrases</p></td><td><p>Prompts the caller to make any keypress to continue the call.</p></td></tr><tr className="row-even"><td><p>NumberQuestion</p></td><td><p>\*prompt</p><p>\*number\_question\_type</p><p>confirm\_response\_enabled</p><p>error\_prompt\_disabled</p><p>custom\_error\_prompt\_text</p><p>caller\_response\_custom\_data\_partner\_name</p><p>asr\_phrases</p></td><td><p>Prompts the caller to respond with a multi-digit number (e.g. Phone Number, Date) and validates it if applicable. The caller’s response may be saved to a marketing data field.</p></td></tr><tr className="row-odd"><td><p>YesOrNo</p></td><td><p>\*prompt</p><p>confirm\_response\_enabled</p><p>error\_prompt\_disabled</p><p>custom\_error\_prompt\_text</p><p>asr\_phrases</p></td><td><p>Prompts the caller to respond with either a yes or no answer. The caller’s response determines how the call will continue.</p></td></tr><tr className="row-even"><td><p>AbTesting</p></td><td><p>\*ab\_testing\_config</p><p>prompt</p></td><td><p>Splits incoming calls between two child branches (“A” and “B”) according to a configurable weight. Requires A/B testing to be enabled for the network. The test\_a\_value and test\_b\_value labels are saved to the A-B Test Path marketing data field for reporting.</p></td></tr></tbody></table>

Node Details

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Node Type</p></th><th className="head"><p>Details</p></th></tr></thead><tbody><tr className="row-even"><td><p>Menu</p></td><td><p>Can have 1‐9 child nodes, with each child corresponding to keypresses 1-9. At the end of the child list, it can also optionally have failover child nodes designated by a node with a keypress\_failover\_type parameter (see example below). If speech recognition is enabled, the caller may also respond verbally with their menu choice, including using the phrases that have been configured in field asr\_phrases for each of the child nodes. (e.g. the caller can say “sales” or “one” for 1, and “support” or “two” for 2).</p></td></tr><tr className="row-odd"><td><p>Connect</p></td><td><p>May not have any children. The prompt will be read before connecting to the provided phone number.</p></td></tr><tr className="row-even"><td><p>EndCall</p></td><td><p>May not have any children. The prompt will be read before ending the call.</p></td></tr><tr className="row-odd"><td><p>SmsPromo</p></td><td><p>May have exactly 1 child node. After accepting or declining the promotional sms, the child node will be executed. To accept the promotional sms, the user must push 9 on the phone (this should be added as part of the prompt). Only numbers recognized as mobile phones will be offered the sms option.</p></td></tr><tr className="row-even"><td><p>Condition</p></td><td><p>May have exactly 2 child nodes. If the conditions are met, the first child node is executed. If they are not met then the second child node is executed. See the conditions section and examples below for details on valid conditions.</p></td></tr><tr className="row-odd"><td><p>NearestBranch</p></td><td><p>May have exactly 1 child node. The caller will be prompted to verify their location prior to forwarding the call. If no branch is within ‘radius\_miles’ of the caller then the child node will be executed.</p></td></tr><tr className="row-even"><td><p>VerifyLocation</p></td><td><p>May have exactly 1 child node. The prompt will play before verifying the callers location. The child node will be executed after verifying the callers location.</p></td></tr><tr className="row-odd"><td><p>DynamicRoute (beta - read only)</p></td><td><p>May have exactly 1 child node. We will evaluate the custom data field value specified on this node’s dynamic\_route\_destination. With non-SIP integration, if the extracted value is a valid phone number and the destination phone number is in an allowed region given your settings, we will play the prompt and transfer the call, otherwise the child node will be executed without the prompt. When SIP integrated, we also allow transferring to any string (such as an extension), in which case the destination should be routable by your SIP infrastructure.</p></td></tr><tr className="row-even"><td><p>AnyKeyPress</p></td><td><p>May have exactly 2 child nodes. If any keypress is made, the first child node is executed. If no keypress is made, then the second child node is executed.</p></td></tr><tr className="row-odd"><td><p>NumberQuestion</p></td><td><p>May have exactly 1 child node. Requires a question type to be selected (e.g. Phone Number, Date). The prompt will play before the caller answers the question. The answer may be saved in a marketing data field. At the end of the child list, this node type can also optionally have failover child nodes, designated by a node with a keypress\_failover\_type parameter (see example below).</p></td></tr><tr className="row-even"><td><p>YesOrNo</p></td><td><p>May have exactly 2 child nodes. If a keypress of 1 is made, the first child node is executed. If a kepyress of 2 is made, the second child node is executed. If speech recognition is enabled, the caller can also say “yes” for 1 and “no” for 2. At the end of the child list, this node type can also optionally have failover child nodes, designated by a node with a keypress\_failover\_type parameter (see example below).</p></td></tr><tr className="row-odd"><td><p>AbTesting</p></td><td><p>Must have exactly 2 child nodes. Incoming calls are split between the two branches according to test\_a\_value\_weight: the first (“A”) child receives that percentage of calls and the second (“B”) child receives the remainder. Requires A/B testing to be enabled for the network.</p></td></tr></tbody></table>

Parameter Details

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Property</p></th><th className="head"><p>Type</p></th><th className="head"><p>Value</p></th></tr></thead><tbody><tr className="row-even"><td><p>ab\_testing\_config</p></td><td><p>Hash</p></td><td><p>Configuration for an AbTesting node. A hash containing test\_a\_value (string, the reporting label for the first / “A” branch), test\_b\_value (string, the reporting label for the second / “B” branch), and test\_a\_value\_weight (integer 0-100, the percentage of calls routed to the “A” branch; the “B” branch receives the remainder). The test\_a\_value and test\_b\_value labels are saved to the A-B Test Path marketing data field.</p></td></tr><tr className="row-odd"><td><p>asr\_phrases</p></td><td><p>Array of hashes</p></td><td><p>A list of phrases that apply to the child of a Menu node. Can only be used when speech recognition is enabled. Allows the caller to respond verbally with one of the configured phrases instead of making a keypress. For example, the first child of a Menu node may have a value of \[\{“phrase”: “sales”}, \{“phrase”: “support”}] for “asr\_phrases”, where the caller may say “sales” or “support” to select the Menu option instead of pressing 1.</p></td></tr><tr className="row-even"><td><p>caller\_response\_custom\_data\_partner\_name</p></td><td><p>String</p></td><td><p>The partner name of the custom data field that will be used to save the caller’s response to the NumberQuestion prompt.</p></td></tr><tr className="row-odd"><td><p>condition</p></td><td><p>String</p></td><td><p>The boolean condition that decided if the first or second child will be executed in a condition node.</p></td></tr><tr className="row-even"><td><p>confirm\_response\_enabled</p></td><td><p>Boolean</p></td><td><p>When enabled, the system will read back the caller’s answer to the prompt and ask for confirmation. The caller can press 1 for “yes” and 2 for “no”. If speech recogition is enabled, callers can also confirm their response by saying “yes” or “no”.</p></td></tr><tr className="row-odd"><td><p>custom\_error\_prompt\_text</p></td><td><p>String</p></td><td><p>Custom text that will be played to the caller when they provide an invalid response or no response.</p></td></tr><tr className="row-even"><td><p>destination\_country\_code</p></td><td><p>String</p></td><td><p>The country code for the destination\_phone\_number.</p></td></tr><tr className="row-odd"><td><p>destination\_phone\_number</p></td><td><p>String</p></td><td><p>The phone number to forward the caller to.</p></td></tr><tr className="row-even"><td><p>destination\_extension</p></td><td><p>String</p></td><td><p>Extension keypresses on the destination number. Commas indicate pause (e.g. 1,,,234 means a keypress of “1” is executed followed by a 3 second pause and an extension keypress of “234”).</p></td></tr><tr className="row-odd"><td><p>dynamic\_route\_destination (beta - read only)</p></td><td><p>Strings</p></td><td><p>The custom data field partner name you want to use as the destination in a dynamic route node. Typically a phone number in e164 format.</p></td></tr><tr className="row-even"><td><p>error\_prompt\_disabled</p></td><td><p>Boolean</p></td><td><p>If set to true, no error sound or prompt will play when the caller provides an invalid response or no response. If set to false, when the caller provides an invalid response or no response, an error sound will play, or you can optionally define a custom error prompt via the parameter custom\_error\_prompt\_text.</p></td></tr><tr className="row-odd"><td><p>keypress\_failover\_type</p></td><td><p>String</p></td><td><p>The failover type to use for a child node of a Menu. “Wrong” for when a wrong keypress is pressed by the caller on any attempt for the parent menu (shown in reporting as keypress “W”). “None” for when there is no keypress by the caller for all attempts for the parent menu (shown in reporting as keypress “N”). Omit this parameter for normal keypresses. See example below.</p></td></tr><tr className="row-even"><td><p>number\_question\_type</p></td><td><p>String</p></td><td><p>The type of question you want to ask as part of the NumberQuestion node type. This may be “Digits”, “Number”, “PhoneNumber”, “Date”, “Currency”, “Time”, or “ZipCode”.</p></td></tr><tr className="row-odd"><td><p>prompt</p></td><td><p>String</p></td><td><p>The text that will be read before a nodes action occurs. An empty string will result in no prompt being read, and the following action will occur immediately.</p></td></tr><tr className="row-even"><td><p>sms\_promo\_copy</p></td><td><p>String</p></td><td><p>The text that will be sent to the caller if they accept the promotional sms.</p></td></tr><tr className="row-odd"><td><p>sms\_promo\_delay</p></td><td><p>Integer</p></td><td><p>The time delay in seconds before sending the promotional sms. This may be 1 (Immediately), 1800 (30 minutes), 86400 (1 day), 604800 (7 days), or 2592000 (30 days).</p></td></tr><tr className="row-even"><td><p>sms\_promo\_sender</p></td><td><p>String</p></td><td><p>The email address that will be shown in the sms. This defaults to <a className="reference external" href="mailto:sms%40invoca.net">sms<span>@</span>invoca<span>.</span>net</a>.</p></td></tr></tbody></table>

Conditions

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Condition</p></th><th className="head"><p>Details</p></th></tr></thead><tbody><tr className="row-even"><td><p>during\_hours</p></td><td><p>True if the caller is calling during the hours specified in the campaign.</p></td></tr><tr className="row-odd"><td><p>in\_region</p></td><td><p>True if the caller is calling from the region specified in the campaign.</p></td></tr><tr className="row-even"><td><p>landline</p></td><td><p>True if the caller is calling from a landline phone.</p></td></tr><tr className="row-odd"><td><p>mobile</p></td><td><p>True if the caller is calling from a mobile phone.</p></td></tr><tr className="row-even"><td><p>pressed\[key]</p></td><td><p>True if the caller pressed the named key.</p></td></tr><tr className="row-odd"><td><p>repeat</p></td><td><p>True if the caller has already called this campaign in the last N days (the interval N can be set on the campaign; the default is 30 days).</p></td></tr><tr className="row-even"><td><p>sms\_sent</p></td><td><p>The caller chose to receive a text message during the call.</p></td></tr><tr className="row-odd"><td><p>and</p></td><td><p>Joins two conditions and is true if both conditions are true.</p></td></tr><tr className="row-even"><td><p>or</p></td><td><p>Joins two conditions and is true if either condition is true.</p></td></tr><tr className="row-odd"><td><p>not</p></td><td><p>Inverts the following condition.</p></td></tr><tr className="row-even"><td><p>( )</p></td><td><p>Used for grouping.</p></td></tr></tbody></table>

Example Conditions

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Example</p></th><th className="head"><p>Condition</p></th></tr></thead><tbody><tr className="row-even"><td><p>Call duration was a minute and a half or longer</p></td><td><p>duration >= 1 min 30 sec.</p></td></tr><tr className="row-odd"><td><p>Call came in during business hours</p></td><td><p>during\_hours.</p></td></tr><tr className="row-even"><td><p>Call was from a mobile phone where the caller pressed the 2 key in response to the first menu</p></td><td><p>mobile and pressed\[2].</p></td></tr><tr className="row-odd"><td><p>Call was from the selected geographic region or was longer than 12 seconds</p></td><td><p>in\_region or duration > 12 sec.</p></td></tr><tr className="row-even"><td><p>Caller pressed 1 to the first question in a series and was not in the geographic region or calling during business hours</p></td><td><p>pressed\[a 1] and not (in\_region or during\_hours).</p></td></tr></tbody></table>

Note that **and** is higher precedence than **or**. So if you use both in a condition like this:

`mobile or in_region and during_hours`

it is equivalent to this:

`mobile or (in_region and during_hours)`

Caller ID options can also be configured by optionally including a `caller_id` object inside `ivr_tree`:

<table className="parameters docutils align-default"><thead><tr className="row-odd"><th className="head"><p>Setting</p></th><th className="head"><p>Mask</p></th><th className="head"><p>Example</p></th><th className="head"><p>Details</p></th></tr></thead><tbody><tr className="row-even"><td><p>“original”</p></td><td><p>None</p></td><td><p>\{ setting: “original” }</p></td><td><p>Display caller’s caller id to call center agent. (Default)</p></td></tr><tr className="row-odd"><td><p>“promo”</p></td><td><p>None</p></td><td><p>\{ setting: “promo” }</p></td><td><p>Display affiliate promo number to call center agent. (Only if forwarding to a local number.)</p></td></tr><tr className="row-even"><td><p>“specific”</p></td><td><p>String containing phone number</p></td><td><p>\{ setting: “specific”, mask: “800-555-5555” }</p></td><td><p>Display a specific caller ID number.</p></td></tr><tr className="row-odd"><td><p>“partial”</p></td><td><p>String containing mask format</p></td><td><p>\{ setting: “partial”, mask: “800-555-XXXX” }</p></td><td><p>Display caller’s caller ID with digits replaced.</p></td></tr></tbody></table>

### Custom Data

Advertiser campaigns may have Custom Data Fields applied to them, which will be applied to calls originating through the advertiser campaign. To apply Custom Data Values to an advertiser campaign, the top level parameter `custom_data` should be assigned a hash with each pair’s key corresponding to a partner name. The value of the pair should be the value to be applied.

For the following example, we would apply the value “Offline newspaper” to the Custom Data Field “channel”.

```json theme={null}
{
  "custom_data": {
    "channel": "Offline newspaper"
  }
}
```

Endpoint:

`https://invoca.net/api/2019-05-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>.json`

<AccordionGroup>
  <Accordion title="Get all campaigns for an Advertiser" icon={<MethodTag method="get" path="/advertiser_campaigns"/>}>
    #### Examples

    Read all campaigns for Advertiser 2 id from network

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/2/advertiser_campaigns.json`

    Response Body:

    An array of campaigns are returned.
  </Accordion>

  <Accordion title="Get a campaign for an Advertiser" icon={<MethodTag method="get" path="/advertiser_campaigns/<advertiser_campaign_id>"/>}>
    #### Examples

    Read Campaign 100 for Advertiser 2

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/2/advertiser_campaigns/100.json`

    Response Body:

    ```json theme={null}
    {
        "id": 11,
        "id_from_network": "100",
        "name": "PostSeason Promotion 11 fJauFbSEGHKw8ADEGv",
        "status": "Entry",
        "object_url": "https://invoca.net/a_campaigns/terms/11",
        "current_terms": {
          "description": "August promotion to sell post-season tickets at half price.",
          "timezone": "Pacific Time (US & Canada)",
          "visibility": "All",
          "created_at": "2015-05-13 07:45:08 -0800",
          "id": "215",
          "operating_24_7": false,
          "go_live_date": null,
          "default_creative_id_from_network": "222",
          "campaign_language": "English",
          "campaign_country": "US",
          "advertiser_payin": {
            "min": 7,
            "currency": "EUR",
            "pricing": "€7.00 per call if duration > 2 min 30 sec",
            "max": 7,
            "policies": [
              {
                "type": "Base",
                "currency": "EUR",
                "condition": "duration > 2 min 30 sec",
                "amount": 7
              }
            ],
            "range": "€7.00 per call"
          },
          "pricing_type": "Fixed",
          "ivr_tree": {
            "root": {
              "condition": "during_hours",
              "children": [
                {
                  "destination_phone_number": "8004377950",
                  "destination_country_code": "1",
                  "prompt": "",
                  "node_type": "Connect"
                },
                {
                  "destination_phone_number": "8004377950",
                  "destination_country_code": "1",
                  "prompt": "",
                  "node_type": "Connect"
                }
              ],
              "node_type": "Condition"
            },
            "record_calls": true
          },
          "auto_approve": "None",
          "expiration_date": null,
          "campaign_type": "AffiliateEnabled",
          "affiliate_payout": {
            "min": 4.5,
            "currency": "USD",
            "pricing": "Base: $4.50 per call Bonus: $2.75 per call if duration > 60",
            "max": 7.25,
            "policies": [
              {
                "type": "Base",
                "currency": "USD",
                "condition": "",
                "amount": 4.5
              },
              {
                "type": "Bonus",
                "currency": "USD",
                "condition": "duration > 60",
                "amount": 2.75
              }
            ],
            "range": "$4.50 - $7.25 per call"
          },
          "updated_at": "2015-05-13 07:45:08 -0800",
          "url": "http://www.nfltix.com/postseasonnow",
          "hours": {
            "saturday_open": 32400,
            "sunday_open": 32400,
            "monday_closed": false,
            "tuesday_open": 32400,
            "thursday_open": 32400,
            "friday_close": 75600,
            "sunday_close": 50999,
            "wednesday_closed": false,
            "thursday_closed": false,
            "tuesday_close": 75600,
            "friday_open": 32400,
            "saturday_closed": true,
            "sunday_closed": true,
            "tuesday_closed": true,
            "wednesday_close": 75600,
            "friday_closed": true,
            "monday_open": 32400,
            "saturday_close": 75600,
            "monday_close": 75600,
            "thursday_close": 75600,
            "wednesday_open": 32400
          },
          "named_regions": [
            {
              "regions": [
                {
                  "region_type": "State",
                  "value": "CA",
                  "text": "TBD"
                },
                {
                  "region_type": "State",
                  "value": "OR",
                  "text": "TBD"
                },
                {
                  "region_type": "State",
                  "value": "WA",
                  "text": "TBD"
                }
              ],
              "name": "West Coast"
            },
            {
              "regions": [
                {
                  "region_type": "State",
                  "value": "NY",
                  "text": "TBD"
                },
                {
                  "region_type": "State",
                  "value": "NJ",
                  "text": "TBD"
                }
              ],
              "name": "East Coast"
            }
          ]
        },
        "future_terms": {
          "description": "August promotion to sell post-season tickets at half price.",
          "timezone": "Pacific Time (US & Canada)",
          "visibility": "All",
          "created_at": "2015-05-13 08:46:43 -0800",
          "id": "",
          "operating_24_7": false,
          "go_live_date": null,
          "default_creative_id_from_network": "123",
          "campaign_language": "English",
          "campaign_country": "US",
          "advertiser_payin": {
            "min": 7,
            "currency": "EUR",
            "pricing": "€7.00 per call if duration > 2 min 30 sec",
            "max": 7,
            "policies": [
              {
                "type": "Base",
                "currency": "EUR",
                "condition": "duration > 2 min 30 sec",
                "amount": 7
              }
            ],
            "range": "€7.00 per call"
          },
          "budget_activities": {
            "periodic_call_cap_alert": {
              "budget_amount": 200.0,
              "budget_currency": "USD",
              "reset_period": "Ongoing",
              "start_at": "2014-04-17T00:00:00-07:00",
              "total_amount": 0.0,
              "time_zone": "Pacific Time (US & Canada)"
            },
            "concurrent_call_cap_alert": {
              "budget_amount": 50.0,
              "budget_currency": "USD",
              "reset_period": "Ongoing",
              "start_at": "2014-04-17T00:00:00-07:00",
              "time_zone": "Pacific Time (US & Canada)"
            },
            "budget_cap_alert": {
              "budget_amount": 100.0,
              "budget_currency": "USD",
              "reset_period": "Monthly",
              "start_at": "2014-04-01T00:00:00-07:00",
              "total_amount": 0.0,
              "time_zone": "Pacific Time (US & Canada)"
            },
            "pricing_type": "Fixed",
            "ivr_tree": {
              "root": {
                "condition": "during_hours",
                "children": [
                  {
                    "destination_phone_number": "8004377950",
                    "destination_country_code": "1",
                    "prompt": "",
                    "node_type": "Connect"
                  },
                  {
                    "destination_phone_number": "8004377950",
                    "destination_country_code": "1",
                    "prompt": "",
                    "node_type": "Connect"
                  }
                ],
                "node_type": "Condition"
              },
              "record_calls": true
            },
            "auto_approve": "None",
            "expiration_date": "2015-05-18T23:59:59-08:00",
            "campaign_type": "AffiliateEnabled",
            "affiliate_payout": {
              "min": 4.5,
              "currency": "USD",
              "pricing": "Base: $4.50 per call Bonus: $2.75 per call if duration > 60",
              "max": 7.25,
              "policies": [
                {
                  "type": "Base",
                  "currency": "USD",
                  "condition": "",
                  "amount": 4.5
                },
                {
                  "type": "Bonus",
                  "currency": "USD",
                  "condition": "duration > 60",
                  "amount": 2.75
                }
              ],
              "range": "$4.50 - $7.25 per call"
            },
            "updated_at": "2015-05-13 08:46:43 -0800",
            "url": "http://www.nfltix.com/postseasonnow",
            "hours": {
              "saturday_open": 32400,
              "sunday_open": 32400,
              "monday_closed": false,
              "tuesday_open": 32400,
              "thursday_open": 32400,
              "friday_close": 75600,
              "sunday_close": 50999,
              "wednesday_closed": false,
              "thursday_closed": false,
              "tuesday_close": 75600,
              "friday_open": 32400,
              "saturday_closed": true,
              "sunday_closed": true,
              "tuesday_closed": true,
              "wednesday_close": 75600,
              "friday_closed": true,
              "monday_open": 32400,
              "saturday_close": 75600,
              "monday_close": 75600,
              "thursday_close": 75600,
              "wednesday_open": 32400
            },
            "named_regions": [
              {
                "regions": [
                  {
                    "region_type": "State",
                    "value": "CA",
                    "text": "TBD"
                  },
                  {
                    "region_type": "State",
                    "value": "OR",
                    "text": "TBD"
                  },
                  {
                    "region_type": "State",
                    "value": "WA",
                    "text": "TBD"
                  }
                ],
                "name": "West Coast"
              },
              {
                "regions": [
                  {
                    "region_type": "State",
                    "value": "NY",
                    "text": "TBD"
                  },
                  {
                    "region_type": "State",
                    "value": "NJ",
                    "text": "TBD"
                  }
                ],
                "name": "East Coast"
              }
            ]
          }
        },
        "custom_data": {
          "channel": "Online lead"
        }
      }
    ```
  </Accordion>

  <Accordion title="Create an Advertiser Campaign" icon={<MethodTag method="post" path="/advertiser_campaigns"/>}>
    #### Examples

    Create Campaign fJauFbSEGHKw8ADEGv for Advertiser cFUyYnFHyiYA42TrpM

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/cFUyYnFHyiYA42TrpM/advertiser_campaigns.json`

    Request Body:

    ```json theme={null}
    {
      "id_from_network": "fJauFbSEGHKw8ADEGv",
      "name": "PostSeason Promotion 11 fJauFbSEGHKw8ADEGv",
      "description": "August promotion to sell post-season tickets at half price.",
      "url": "http://www.nfltix.com/postseasonnow",
      "timezone": "Pacific Time (US & Canada)",
      "operating_24_7": false,
      "campaign_type": "AffiliateEnabled",
      "campaign_country": "US",
      "default_creative_id_from_network": "111",
      "hours": {
        "friday_open": 32400,
        "wednesday_open": 32400,
        "sunday_close": 50999,
        "monday_open": 32400,
        "friday_close": 75600,
        "wednesday_close": 75600,
        "friday_closed": true,
        "thursday_open": 32400,
        "sunday_closed": true,
        "sunday_open": 32400,
        "saturday_open": 32400,
        "monday_closed": false,
        "thursday_close": 75600,
        "tuesday_closed": true,
        "tuesday_close": 75600,
        "tuesday_open": 32400,
        "saturday_closed": true,
        "saturday_close": 75600,
        "monday_close": 75600,
        "thursday_closed": false,
        "wednesday_closed": false
      },
      "named_regions": [
        {
          "name": "West Coast",
          "regions": [
            {
              "region_type": "State",
              "value": "CA"
            },
            {
              "region_type": "State",
              "value": "OR"
            },
            {
              "region_type": "State",
              "value": "WA"
            }
          ]
        },
        {
          "name": "East Coast",
          "regions": [
            {
              "region_type": "State",
              "value": "NY"
            },
            {
              "region_type": "State",
              "value": "NJ"
            }
          ]
        }
      ],
      "advertiser_payin": {
        "policies": [
          {
            "condition": "duration > 2 min 30 sec",
            "type": "Base",
            "currency": "USD",
            "amount": 7.0
          }
        ]
      },
      "affiliate_payout": {
        "policies": [
          {
            "condition": "",
            "amount": 4.5,
            "currency": "USD",
            "type": "Base"
          },
          {
            "condition": "duration > 60",
            "amount": 2.75,
            "currency": "USD",
            "type": "Bonus"
          }
        ]
      },
      "ivr_tree": {
        "record_calls": true,
        "root": {
          "node_type": "Condition",
          "condition": "during_hours",
          "children": [
            {
              "node_type": "Connect",
              "destination_phone_number": "8004377950",
              "destination_country_code": "1",
              "prompt": ""
            },
            {
              "node_type": "Connect",
              "destination_phone_number": "8004377950",
              "destination_country_code": "1",
              "prompt": ""
            }
          ]
        }
      },
      "custom_data": {
        "channel": "Offline leads"
      }
    }
    ```

    Response Body:

    Same as a GET response, includes all the advertiser campaign properties.
  </Accordion>

  <Accordion title="Update an Advertiser Campaign" icon={<MethodTag method="put" path="/advertiser_campaigns/<advertiser_campaign_id>"/>}>
    #### Examples

    Example IVR Tree updates:

    1. Verify the callers location, then if on the West Coast (setup previously) forward to a call center, otherwise hang up after playing a prompt.

    ```sh theme={null}
    curl­ -XPUT -H "Content­Type: application/json" -­u 'login:pass'
    'https://vanity.invoca.net/api/2019-05-01/advertisers/:advertiser_id/advertiser_campaigns/445566.json' \
    -d '
    {"ivr_tree":
     {"root":
       {"node_type":"VerifyLocation",
        "children":
         [{"node_type":"Condition",
           "condition":"in_region[West Coast]",
           "children":
             [{"children":[],
               "condition":"",
               "node_type":"Connect",
               "destination_phone_number":"8004377950",
               "destination_country_code":"1"},
               {"node_type":"EndCall",
                "prompt":"We are sorry, we currently cannot service your area. Goodbye."}]}]
       },
       "record_calls":true}}'  -v
    ```

    2. Present the options for multiple departments, if sales is selected check if office is open. If the office is open, forward the call, if not play a prompt and then hangup.

    ```sh theme={null}
    curl -XPUT -H "Content­Type: application/json" -u 'login:pass'
    'https://vanity.invoca.net/api/2019-05-01/advertisers/:advertiser_id/advertiser_campaigns/445566.json' \
    -d '
    {"ivr_tree":{
       "record_calls":true,
       "root":{
         "node_type":"Menu",
         "prompt":"Please press 1 for sales or 2 for 24 hour support",
         "children":[
           { "node_type":"Condition",
             "condition":"during_hours",
             "children":[
               { "node_type":"Connect",
                 "destination_phone_number":"8004377950",
                 "destination_country_code":"1",
                 "prompt":"Thank you, transferring you now"
               },
               { "node_type":"EndCall",
                 "prompt":"We are currently closed. Please call back during business hours. Goodbye"
               }]},
           { "node_type":"Connect",
             "destination_phone_number":"8004377950",
             "destination_country_code":"1",
             "prompt":"Thank you, transferring you now"
           }]}}}'  -v
    ```

    3. Offer an sms to see current offers and then connect to a call center.

    ```sh theme={null}
    curl­ -XPUT -H "Content­Type: application/json"­ -u 'login:pass'
    'https://vanity.invoca.net/api/2019-05-01/advertisers/:advertiser_id/advertiser_campaigns/445566.json' \
    -d '
    {"ivr_tree":
     {"root":
       {"node_type":"SmsPromo",
        "sms_promo_copy":"Visit us at www.invoca.com to see new promotions.",
        "sms_promo_delay":1,
        "prompt":"If you would like to see information about our current offers, please press 9 now.",
        "children":
         [{"children":[],
           "condition":"",
           "node_type":"Connect",
           "destination_phone_number":"8004377950",
           "destination_country_code":"1"}]
       },
       "record_calls":true}}' -v
    ```

    Each of the above requests will have a response body similar to a GET request, including all the advertiser campaign properties.
  </Accordion>

  <Accordion title="Quick Stats" icon={<MethodTag method="get" path="/advertiser_campaigns/<advertiser_campaign_id>/quick_stats"/>}>
    #### Examples

    Read Campaign 100 for Advertiser 2

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/quick_stats.json`

    Response Body:

    ```json theme={null}
    {
      "stats": {
        "last_30days": {
          "call_avg_total_duration": 0.0,
          "call_count": 0
        },
        "last_7days": {
          "call_avg_total_duration": 0.0,
          "call_count": 0
        },
        "today": {
          "call_avg_total_duration": 0.0,
          "call_count": 0
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Set Campaign State to Live" icon={<MethodTag method="post" path="/advertiser_campaigns/<advertiser_campaign_id>/go_live"/>}>
    #### Examples

    Advertiser campaigns can have their state controlled through this API. When a campaign is created through the API, its “future terms” are being set, and its state is not yet live. When the go\_live endpoint is hit, the “future terms” are promoted to “current terms” and the campaign becomes live. Archived campaigns must be unarchived before calling this endpoint to make them live.

    Use this request url format:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/go_live.json`

    ```sh theme={null}
    curl­ -XPOST­ -H "Content­Type: application/json"­ -u 'login:pass'
    'https://vanity.invoca.net/api/2019-05-01/123/advertisers/advertiser_id/advertiser_campaigns/445566/go_live.json' \
    -d '
    {
      "timeout": 10
    }
    ' -v
    ```
  </Accordion>

  <Accordion title="Set Campaign State to Archived" icon={<MethodTag method="post" path="/advertiser_campaigns/<advertiser_campaign_id>/archive"/>}>
    #### Examples

    If a campaign has previously been set to live, either through the API or through the UI, it can be archived, which effectively shuts it down. An archived campaign can be returned to live at a later time. To archive a campaign use this the following endpoint URL:

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/archive.json`

    Response Body:

    ```json theme={null}
    {}
    ```
  </Accordion>

  <Accordion title="Unarchive a Campaign" icon={<MethodTag method="post" path="/advertiser_campaigns/<advertiser_campaign_id>/unarchive"/>}>
    #### Examples

    Archived campaigns should be unarchived using this endpoint. It changes campaign status to paused. After that you can activate the campaign using a go\_live request.

    Endpoint:

    `https://invoca.net/api/2019-05-01/<network_id>/advertisers/<advertiser_id_from_network>/advertiser_campaigns/<advertiser_campaign_id_from_network>/unarchive.json`

    Response Body:

    ```json theme={null}
    {}
    ```
  </Accordion>
</AccordionGroup>

## Keypress Failover Type

**Example IVR Tree utilizing keypress\_failover\_type**

```json theme={null}
"ivr_tree": {
  "root": {
    "node_type":"Menu",
    "prompt":"Press 1 for sales, press 2 for support.",
    "children": [
      {
        "node_type": "Connect",
        "destination_phone_number": "8004377950",
        "destination_country_code": "1",
        "prompt": "Directing you to sales"
      },
      {
        "node_type": "Connect",
        "destination_phone_number": "8004377951",
        "destination_country_code": "1",
        "prompt": "Directing you to support"
      },
      {
        "node_type": "Connect",
        "destination_phone_number": "8004377952",
        "destination_country_code": "1",
        "prompt":"Forwarding you to an operator.",
        "keypress_failover_type":"Wrong"
      },
      {
        "node_type":"EndCall",
        "prompt":"No key was selected, goodbye.",
        "keypress_failover_type":"None"
      }
    ]
  }
}
```

## Error Handling

Forbidden – 403:

### PUT/POST

`https://invoca.net/api/2019-05-01/<network_id>/advertiser/<advertiser_id_from_network>/advertiser_campaign/<advertiser_campaign_id_from_network>/advertiser_campaigns/<advertiser_campaign_id>.json`

Content Type: application/json

Response Code: 403

**Request Body**

```json theme={null}
{
  "node_type":"Menu",
  "prompt":"Prompt text",
  "prompt_id_from_network":"",
  "prompt_url":null,
  "prompt_recieved":null,
  "children": [
    {
      "node_type":"Menu",
      "prompt":"",
      "prompt_id_from_network":"",
      "prompt_url":null,
      "prompt_recieved":null,
      "children": [
        {
          "node_type":"EndCall",
          "prompt":"",
          "prompt_id_from_network":"",
          "prompt_url":null,
          "prompt_recieved":null
        }
      ]
    }
  ]
}
```

**Response Body**

```json theme={null}
{
  "error": {
    "ivr_tree": {
      "children": [
        {
          "0": {
            "prompt": [
              "cannot be empty"
            ]
          }
        }
      ]
    }
  }
}
```

The number in error message represents the index of the child node in the tree, or in other words, it is the keypress of the node containing the error minus one.
