Skip to main content

Overview

Campaigns are used to group similar types of inbound or outbound calls. Each campaign defines:
  • The AI voice agent to be used.
  • QA settings for monitoring call quality.
  • Post-call data extraction settings.
While campaigns can be created via the API, we recommend cloning campaigns through the API and performing all campaign definitions, especially post-call data configuration, via the Prosper platform.

Steps to Execute Calls within a Campaign

1. Add & execute targets

Once a campaign is created, targets must be added using the create targets endpoint:
POST /api/v1/campaigns/{campaign_id}/targets
Targets contain the specific information required to execute each call, such as the phone number and any relevant metadata. For calling the targets at the same time, use the body param: "launch": true For exemple:
{
  "targets": [],
  "launch": true
}
In case you need to have traceability and link once of your resources to a target you can directly pass the target id as part of the body as long as the id is a valid v4 UUID, or include your id as part of the input data (which can be any kind of data type. We recommend using the id options as it’ll be faster to search and you can store in your system as needed.
{
  "targets": [
    {
      "id": "3ef78020-1e89-4496-9538-695f257ee001",
      "phone_number": "+123456789",
      "input_data": {
        "my_resource_id" <ID>
      }
    }
  ],
  "launch": true
}  

2. Receive Target Results

Each campaign defines a customizable webhook to receive target results. Once a target is finished, the webhook will receive:
{
  "campaign_id": uuid,
  "call_log_id": int,
  "target_id": uuid,
  "attempt": int,
  "max_attempts": int,
  "next_attempt_scheduled": datetz
}
You can configure this weebhok inside the Prosper platform under the campaign notifications section at Campaign > Settings > Notificaitions Enable the campaign target finished and save the configuration with the endpoint where you want to receive the updates

3. Retrieve Target

Using the target_id, detailed information about the call can be retrieved from the Get target endpoint:
GET /api/v1/targets/{target_id}
This provides access to all relevant call data, including transcripts, metadata and QA, and outcomes.

Summary

StepAction
1Create or clone a campaign via the Prosper platform
2Add targets and execute calls using POST /api/v1/campaigns/{campaign_id}/targets
4Receive results via the campaign’s webhook
5Retrieve the target details using GET /api/v1/targets/{target_id}
For additional details, refer to the API reference or reach out to our support team.