Skip to main content

Overview

Call tracking, routing, and attribution with Retreaver. Call actions with automationType, action, and params from any workflow node that supports automations.

Authentication

  • Retreaver API Key and Company ID (both per-account).

Available Actions

Click any action to jump to its example payload. Affiliates Caller-Lists Calls Campaigns Companies Contacts Number-Pools Numbers Raw
  • Raw API Request
Reports Rtb Static-Caller-Numbers Suppressed-Numbers Target-Groups Targets

Examples

Example 1: V1 - Get recent calls

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "calls_v1_get_recent",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "query": {
        "page": 1
      }
    }
  }
}

Example 2: V1 - Get call by UUID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "calls_v1_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "uuid": "YOUR_CALL_UUID"
    }
  }
}

Example 3: V2 - Get recent calls

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "calls_v2_get_recent",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "query": {
        "page": 1
      }
    }
  }
}

Example 4: V2 - Get call by UUID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "calls_v2_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "uuid": "YOUR_CALL_UUID"
    }
  }
}

Example 5: Call data write GET

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "call_data_write_get",
    "params": {
      "key": "POSTBACK_KEY_UUID",
      "caller_number": "YOUR_CALLER_NUMBER",
      "call_uuid": "YOUR_CALL_UUID"
    }
  }
}

Example 6: Call data write POST

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "call_data_write_post",
    "params": {
      "key": "POSTBACK_KEY_UUID",
      "caller_number": "YOUR_CALLER_NUMBER",
      "call_uuid": "YOUR_CALL_UUID"
    }
  }
}

Example 7: Get all affiliates

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "affiliates_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 8: Get affiliate by afid

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "affiliates_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "afid": "AFFILIATE_ID"
    }
  }
}

Example 9: Create affiliate

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "affiliates_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "affiliate": {
        "afid": "0002",
        "first_name": "Nancy",
        "last_name": "Drew"
      }
    }
  }
}

Example 10: Update affiliate

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "affiliates_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "afid": "AFFILIATE_ID",
      "affiliate": {
        "first_name": "Nathan"
      }
    }
  }
}

Example 11: Delete affiliate

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "affiliates_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "afid": "AFFILIATE_ID"
    }
  }
}

Example 12: Get all targets

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "targets_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 13: Get target by ID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "targets_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "targetId": "YOUR_TARGET_ID"
    }
  }
}

Example 14: Get target by tid

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "targets_get_by_tid",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "tid": "TARGET_TID"
    }
  }
}

Example 15: Create target

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "targets_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "target": {
        "number": "+18668987878",
        "name": "Retreaver Support"
      }
    }
  }
}

Example 16: Update target

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "targets_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "targetId": "YOUR_TARGET_ID",
      "target": {
        "paused": true
      }
    }
  }
}

Example 17: Delete target

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "targets_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "targetId": "YOUR_TARGET_ID"
    }
  }
}

Example 18: Reset target cap

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "targets_reset_cap",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "targetId": "YOUR_TARGET_ID"
    }
  }
}

Example 19: Get all campaigns

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "campaigns_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 20: Get campaign by cid

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "campaigns_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "cid": "CAMPAIGN_ID"
    }
  }
}

Example 21: Create campaign

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "campaigns_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "campaign": {
        "cid": "000333",
        "name": "MyCampaign",
        "message": "Thanks for calling.",
        "voice_gender": "Male"
      }
    }
  }
}

Example 22: Update campaign

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "campaigns_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "cid": "CAMPAIGN_ID",
      "campaign": {
        "name": "My Other Campaign"
      }
    }
  }
}

Example 23: Delete campaign

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "campaigns_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "cid": "CAMPAIGN_ID"
    }
  }
}

Example 24: Get all numbers

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "numbers_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 25: Get number by ID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "numbers_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "numberId": "YOUR_NUMBER_ID"
    }
  }
}

Example 26: Create number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "numbers_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "number": {
        "type": "Toll-free",
        "afid": "0002",
        "cid": "0001"
      }
    }
  }
}

Example 27: Update number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "numbers_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "numberId": "YOUR_NUMBER_ID",
      "number": {
        "afid": "0005"
      }
    }
  }
}

Example 28: Delete number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "numbers_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "numberId": "YOUR_NUMBER_ID"
    }
  }
}

Example 29: Get all number pools

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "number_pools_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 30: Get number pool by ID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "number_pools_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "poolId": "YOUR_NUMBER_POOL_ID"
    }
  }
}

Example 31: Create number pool

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "number_pools_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "number_pool": {
        "cid": "111",
        "max_pool_size": 100
      }
    }
  }
}

Example 32: Update number pool

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "number_pools_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "poolId": "YOUR_NUMBER_POOL_ID",
      "number_pool": {
        "max_pool_size": 1000
      }
    }
  }
}

Example 33: Delete number pool

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "number_pools_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "poolId": "YOUR_NUMBER_POOL_ID"
    }
  }
}

Example 34: Get active company

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "companies_get_active",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY"
    }
  }
}

Example 35: Get company by ID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "companies_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 36: Get all companies

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "companies_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY"
    }
  }
}

Example 37: Create company

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "companies_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "company": {
        "name": "Retreaver"
      }
    }
  }
}

Example 38: Update company

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "companies_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "company": {
        "name": "Retreaver"
      }
    }
  }
}

Example 39: Delete company

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "companies_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 40: Get all contacts

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 41: Get contact by ID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "contactId": "YOUR_CONTACT_ID"
    }
  }
}

Example 42: Create contact

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "contact": {
        "tag_list": "<<<<<<name:Support>>>>>>",
        "contact_numbers_attributes": [
          {
            "number": "8668987878",
            "description": "Landline"
          }
        ]
      }
    }
  }
}

Example 43: Update contact

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "contactId": "YOUR_CONTACT_ID",
      "contact": {
        "contact_numbers_attributes": [
          {
            "id": 2,
            "number": "+18001234567"
          }
        ]
      }
    }
  }
}

Example 44: Delete contact

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "contactId": "YOUR_CONTACT_ID"
    }
  }
}

Example 45: Get contact by phone

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_get_by_phone",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "phoneNumber": "YOUR_PHONE_NUMBER"
    }
  }
}

Example 46: Update contact by phone

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_update_by_phone",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "phoneNumber": "YOUR_PHONE_NUMBER",
      "contact": {
        "tag_list": "<<<<<<name:Invalid>>>>>>"
      }
    }
  }
}

Example 47: Delete contact by phone

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contacts_delete_by_phone",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "phoneNumber": "YOUR_PHONE_NUMBER"
    }
  }
}

Example 48: Delete contact number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contact_numbers_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "phoneNumber": "YOUR_PHONE_NUMBER"
    }
  }
}

Example 49: Update contact number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "contact_numbers_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "phoneNumber": "YOUR_PHONE_NUMBER",
      "contact_number": {
        "number": "+18005551234"
      }
    }
  }
}

Example 50: Create caller list

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_create",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "caller_list": {
        "name": "suppressed"
      }
    }
  }
}

Example 51: Delete caller list

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_delete",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "name": "YOUR_CALLER_LIST_NAME"
    }
  }
}

Example 52: Get caller list

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_get",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "name": "YOUR_CALLER_LIST_NAME"
    }
  }
}

Example 53: Add number to caller list

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_add_number",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "name": "YOUR_CALLER_LIST_NAME",
      "caller_list_number": {
        "number": "+15855752500"
      }
    }
  }
}

Example 54: Delete number from caller list

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_delete_number",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "name": "YOUR_CALLER_LIST_NAME",
      "phoneNumber": "YOUR_PHONE_NUMBER"
    }
  }
}

Example 55: Check number on caller list

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_check_number",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "name": "YOUR_CALLER_LIST_NAME",
      "phoneNumber": "YOUR_PHONE_NUMBER"
    }
  }
}

Example 56: Caller list check (POST)

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_check",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "name": "YOUR_CALLER_LIST_NAME",
      "caller_list_check": {
        "number": "+15855752500"
      }
    }
  }
}

Example 57: Caller list upload

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "caller_lists_upload",
    "params": {
      "postbackKeyUuid": "POSTBACK_KEY_UUID",
      "secretKey": "YOUR_POSTBACK_SECRET",
      "targetId": "YOUR_TARGET_ID",
      "name": "YOUR_CALLER_LIST_NAME",
      "caller_list_upload": {
        "numbers": "+15855752500\n15855752501",
        "action": "create"
      }
    }
  }
}

Example 58: Check suppressed numbers

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "suppressed_numbers_check",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 59: Get all suppressed numbers

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "suppressed_numbers_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 60: Get suppressed number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "suppressed_numbers_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "number": "YOUR_PHONE_NUMBER"
    }
  }
}

Example 61: Delete suppressed number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "suppressed_numbers_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "number": "YOUR_PHONE_NUMBER"
    }
  }
}

Example 62: Create suppressed number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "suppressed_numbers_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "number": "YOUR_PHONE_NUMBER",
      "suppressed_number": {
        "can_resubscribe": false
      }
    }
  }
}

Example 63: Update suppressed number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "suppressed_numbers_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "number": "YOUR_PHONE_NUMBER",
      "suppressed_number": {
        "can_resubscribe": false
      }
    }
  }
}

Example 64: Get all static caller numbers

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "static_caller_numbers_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 65: Create static caller number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "static_caller_numbers_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "static_caller_number": {
        "number": "+18668987878"
      }
    }
  }
}

Example 66: Delete static caller number

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "static_caller_numbers_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "id": "YOUR_STATIC_CALLER_NUMBER_ID"
    }
  }
}

Example 67: Get all target groups

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "target_groups_get_all",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0
    }
  }
}

Example 68: Get target group by ID

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "target_groups_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "groupId": "YOUR_TARGET_GROUP_ID"
    }
  }
}

Example 69: Create target group

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "target_groups_create",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "target_group": {
        "name": "test",
        "target_ids": [
          1,
          2,
          3
        ],
        "concurrency_cap": 5
      }
    }
  }
}

Example 70: Update target group

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "target_groups_update",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "groupId": "YOUR_TARGET_GROUP_ID",
      "target_group": {
        "name": "hello"
      }
    }
  }
}

Example 71: Delete target group

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "target_groups_delete",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "groupId": "YOUR_TARGET_GROUP_ID"
    }
  }
}

Example 72: Reset target group caps

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "target_groups_reset_caps",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "groupId": "YOUR_TARGET_GROUP_ID"
    }
  }
}

Example 73: Create RTB reservation

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "rtb_create_reservation",
    "params": {
      "key": "YOUR_RTB_KEY",
      "publisher_id": "YOUR_PUBLISHER_ID",
      "caller_number": "+18558485518"
    }
  }
}

Example 74: Confirm RTB reservation

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "rtb_confirm_reservation",
    "params": {
      "key": "YOUR_RTB_KEY",
      "reservationUuid": "YOUR_RESERVATION_UUID",
      "status": "confirmed"
    }
  }
}

Example 75: Get reports

{
  "automationType": "retreaver",
  "nodeId": "example-node-001",
  "nodeParams": {
    "action": "reports_get",
    "params": {
      "apiKey": "YOUR_RETREAVER_API_KEY",
      "companyId": 0,
      "query": {
        "domain": "calls",
        "facet": "tag_value",
        "created_at_start": "2024-10-25",
        "created_at_end": "2024-10-28"
      }
    }
  }
}

Third-Party Documentation