Making Your First Call

Let's walk through the complete process of making an automated call with Gomobile. By the end of this guide, you'll have created a contact, built an audience, set up a simple flow, and launched a program that actually places a call.

Before you start

Make sure you have:

  • An authenticated session (see Authentication)

  • Your access token ready

  • A phone number you can call for testing

We'll use curl commands throughout, but you can adapt these to any HTTP client.

Step 1: Create a contact

First, add the person you want to call:

curl -X POST https://api.gomobile.io/contact \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Test",
    "lastName": "User",
    "primaryPhone": "+212612345678"
  }'

Save the id from the response—you'll need it in the next step.

Step 2: Create an audience

Audiences are groups of contacts. Even for a single contact, you need an audience:

Save the audience id from the response.

Step 3: Add the contact to the audience

Link your contact to the audience:

Step 4: Create a flow

Flows define what happens during a call. Here's a simple flow that dials the contact, plays a greeting, and hangs up:

Save the flow id. In a real scenario, you'd add a play node to actually say something—we'll cover that in the Designing Call Flows guide.

Step 5: Create a program

Programs tie everything together. They specify which audience to call, which flow to use, and when to execute:

The didPool contains the phone numbers that will show up as the caller ID. Make sure you're using numbers assigned to your account.

Step 6: Launch the program

Programs start in draft status. To execute them, launch an execution:

Response:

Step 7: Monitor the execution

Check how your execution is progressing:

You'll see the status and progress counters:

Alternative: Ad-hoc calls

If you don't need the full program infrastructure, you can make one-off calls directly:

This is useful for testing flows or making individual calls outside of a campaign.

What's next?

You've made your first call! Here's where to go from here:

Last updated