Skip to main content

Create CRM Leads Through API

Connect external tools like Zapier, Meta, websites, Winnie, and Care.com to Playground CRM

Written by Molly Farber

Playground CRM connects your marketing tools straight to your admissions pipeline, so a new inquiry lands in your CRM the moment a family reaches out, wherever they found you. No more downloading CSVs, retyping leads, or losing families because follow-up took too long. Facebook Lead Ads flow in through Zapier. Your own website forms and tour scheduler connect directly through the Playground API. Every lead arrives with guardian info, student details, and stage already filled in, ready to trigger your automations.

💡 For additional integration requests, reach out to your account manager or [email protected]


Create Leads from Custom Website Forms

If your website has its own inquiry form, you can send each submission straight into your Playground CRM. Families fill out the form they already see on your site, and Playground handles each submission just like one from a Playground-hosted form: the same field validation, duplicate matching, stage, site assignment, and automations. UTM parameters and ad click IDs are saved too, so you can see which campaigns bring in families.

This section is written for the web developer who manages your website.

🚨 Your website’s server has to send these requests, never the visitor’s browser. Playground blocks API requests sent from a browser, and putting your API key in your website’s HTML or JavaScript would expose it to anyone who visits your site.

Before You Begin

You will need:

  1. A Playground CRM subscription.
    ​

  2. A Playground Public API key. Request this from your Playground account manager.
    ​

  3. Your CRM ConfigId.

    1. You can find this ID in the URL of your Playground CRM dashboard

  4. A lead form in Playground that holds the questions you want to collect. Your website form doesn’t replace the Playground form. It sends its answers to it, so the form’s stage, site, and required fields still apply.

Look Up Your Form’s Fields

  1. Send a GET request to https://pg-api.tryplayground.com/api/v1/crm/{crmConfigId}/forms with your x-api-key header to list your forms, and copy the formId of the one you want to use.
    ​

  2. Send a GET request to https://pg-api.tryplayground.com/api/v1/crm/{crmConfigId}/forms/{formId}. The response lists every field on the form, with:
    a. apiName: the key to send the answer under
    b. entity: where the answer goes. lead is a top-level key, guardian goes inside a guardians entry, and student goes inside a students entry
    c. required: whether the form requires an answer
    d. options: the allowed answers for choice and site questions. You can send either the label or the value
    e. dependsOn: set when the field only shows for certain answers. A hidden field isn’t required
    ​

  3. Match each field on your website form to an apiName from this response.

💡 If you change the questions on your Playground form, run this lookup again so your website form stays in sync.

Submit Form Answers

  1. When a family submits your website form, have your server send a POST request:
    a. URL: https://pg-api.tryplayground.com/api/v1/crm/{crmConfigId}/forms/{formId}/submissions
    b. Headers: x-api-key: YOUR_API_KEY and Content-Type: application/json
    c. Body: the family’s answers, keyed by apiName

    1. {

      "guardians": [

      {

      "guardianName": "Ada Lovelace",

      "guardianEmail": "[email protected]",

      "guardianPhone": "(310) 555-0100"

      }

      ],

      "students": [

      { "studentName": "Iris Lovelace", "studentBirthday": "04/01/2022" }

      ],

      "desired_start_date": "2027-01-04",

      "utmParams": { "utm_source": "google", "utm_campaign": "fall-enrollment" },

      "clickIds": { "gclid": "EAIaIQobChMI..." }

      }
      ​

  2. A successful response includes the leadId of the lead that was created or matched.
    ​

  3. If an answer is missing or invalid, the response tells you which field caused the problem, so you can show the family an error on your form.

💡 Add one entry to guardians or students for each guardian or child the family lists, the same way Add another guardian works on the hosted form. The first guardian becomes the primary contact. If your form doesn’t collect students, leave out the students key entirely instead of sending an empty list.

💡 To track ad performance, have your website read utm_ parameters and gclid, fbclid, fbc, msclkid, or ttclid from the page URL and send them along. The API ignores any other click ID.


Create Tour Bookings from a Custom Scheduler

If your website has its own tour scheduler, your server can book tours directly into Playground. Each booking shows up on your Playground meeting calendar, creates or updates the family’s lead, and follows the same rules as your Playground booking page.

Before You Begin

  1. A meeting type set up in Playground, with availability and a booking form.
    ​

  2. Your meetingTypeId. You can copy it from the booking link for that meeting type.

Get Open Tour Times

Before showing your scheduler, have your server ask Playground which times are open for the meeting type. Playground applies your meeting type’s availability, notice period, buffers, connected calendar conflicts, and capacity, so your scheduler shows exactly the times families could book on your Playground booking page.

  1. Send a GET request to https://pg-api.tryplayground.com/api/public/crm/events/{meetingTypeId}/availability, with:
    a. start: the beginning of the date range to show, in Unix milliseconds
    b. end: the end of the date range, in Unix milliseconds
    ​Example: .../availability?start=1798700000000&end=1799300000000 for one week.
    ​

  2. The response is a list of open times. Each one includes:
    a. eventStart: the tour’s start time in Unix milliseconds
    b. eventEnd: the tour’s end time in Unix milliseconds
    c. remainingCapacity: how many families can still book that time
    ​

  3. Show these times on your scheduler. When a family picks one, send its eventStart in your booking request. See Book a Tour.

💡 Times outside your notice period, such as same-day tours when you require 24 hours’ notice, won’t appear even if they fall inside your date range.

🚨 A time can fill up between when your scheduler shows it and when the family clicks Book. If your booking request is rejected with “The requested time is not available for this meeting type,” get the open times again and ask the family to choose a new time.

Book a Tour

  1. When a family picks a time, have your server send a POST request:
    a. URL: https://pg-api.tryplayground.com/api/v1/crm/{crmConfigId}/bookings
    b. Headers: x-api-key: YOUR_API_KEY and Content-Type: application/json
    c. Body:

    1. {

      "meetingTypeId": "YOUR_MEETING_TYPE_ID",

      "eventStart": 1798736400000,

      "guardians": [

      { "guardianName": "Ada Lovelace", "guardianEmail": "[email protected]", "guardianPhone": "(310) 555-0100" }

      ],

      "students": [

      { "studentName": "Iris Lovelace", "studentBirthday": "04/01/2022" }

      ]

      }
      ​

  2. Set eventStart to the tour’s start time in Unix milliseconds. Playground works out the end time from the meeting type’s duration.
    ​

  3. Answer every question the meeting type’s booking form marks as required, keyed by apiName. Leaving out students doesn’t skip student questions. The API treats it as one blank student, so required student questions still need answers.
    ​

  4. A successful response returns the new booking, including its bookingId and leadId.

🚨 Playground only accepts times that are open for that meeting type and still have capacity. If the time is unavailable, the request is rejected with “The requested time is not available for this meeting type,” and your scheduler should ask the family to pick another time.


Facebook Zapier Integration

Facebook Lead Ads (also called Instant Forms) let families submit inquiries without ever leaving Facebook or Instagram. Facebook prefills the form with the contact info from their profile, so signing up takes just a tap or two. That low friction is exactly why these ads convert so well: families who might never finish a form on your website will happily send you their info from inside their favorite app. Connecting Facebook to Zapier drops each new lead straight into Playground, so you can follow up with personalized emails, texts, and tour invites while their interest is still fresh.

💡 Creating leads in Playground from Facebook ads requires the use of Zapier Premium.

How the integration works

Without an integration, leads from your Facebook forms pile up in Facebook's Leads Center. Someone at your school has to download a CSV, clean it up, and manually import it into your CRM. That takes time your admissions team doesn't have, and every hour a lead sits unattended is a family whose interest is cooling down.

With this integration, every new Facebook lead flows into your Playground CRM the moment it's submitted, with the guardian info, student details, stage, and any custom properties already filled in.

Here is what happens behind the scenes:

  1. A family submits your Facebook Lead Ad form

  2. Zapier picks up the new lead from Facebook

  3. Zapier sends the lead data to Playground

  4. The lead appears in your CRM tab, ready for your admissions team to follow up

Set up Facebook Lead Zapier Integration

Setup happens in three parts: gather what you need, build the Zap, and test that leads flow into your CRM.

Before you begin

Make sure you have all of the following before starting. If any are missing, sort those out first.

  1. A Playground CRM subscription

  2. A Facebook Page that you have administrator access to

  3. A Meta Business account linked to that Page

  4. A published Lead Ad form attached to the Page (not in draft state)

  5. A Zapier account (the free plan works for testing, but paid plans are required for long term)

  6. A Playground Public API key.

    1. Request this key from your Playground account manager

  7. Your Crm ConfigId

    1. You can find this ID in the URL of your Playground CRM dashboard

🚨 Your API key is unique to your school. Don't share it with anyone outside your organization, and store it somewhere secure like a password manager.

Build the Zap

The Zap has two steps: a Facebook Lead Ads trigger and a Webhooks by Zapier action that sends the lead into Playground.

Set up the trigger

  1. In Zapier, click Create Zap.
    ​

  2. For the trigger app, choose Facebook Lead Ads and select the event New Lead.

  3. Connect your Facebook account and grant Zapier access to your Page.
    ​

  4. Select the Page and the Form you want to pull leads from.

  5. Click Test, choose a lead record to test with, and then click continue with selected record.

Set Up the Action

  1. For the action app, choose Webhooks by Zapier and select the event Custom Request.


    ​

  2. Configure the request with the following values:

    1. Method: POST

      1. Replace {crmConfigId} with your actual ID. Do not keep the brackets in the URL. Your final URL should look something like this: https://pg-api.tryplayground.com/api/v1/crm/FRCcIEhReoldleiXzj4V/leads

    2. Data Pass-Through: False

    3. Data: see next step

    4. Unflatten: No

    5. Headers:

      1. x-api-key: your Playground API key granted to you by a Playground account manager

      2. Content-Type: application/json

    6. Return Raw Response: No

  3. In the Data field, paste the following JSON. Use the + Insert Data button in Zapier to drop Facebook field chips into each value position. The correct chips will preview the information that is available in your test lead that you selected earlier. If the chip does not have previewed data, this information is not being collected in your lead form and the Zap will fail.

{
"guardians": [
{
"guardianName": "{{Full Name chip}}",
"guardianEmail": "{{Email chip}}",
"guardianPhone": "{{Phone chip}}",
"guardianRelationship": "Parent",
"guardianSmsOptInStatus": false,
"primary": true
}
],
"students": [
{
"studentName": "{{Student Name chip}}",
"studentBirthday": "{{Birthday chip}}"
}
],
"stage": "New Lead"
}

Customizing the JSON

  • If you have multiple sites, add a comma after "New Lead", and type "Assigned Site": "SITE NAME". The site name should be the School ID for the site you want to create the lead in. Your School ID is the all capital letter portion of your URL when on the CCMS. The School ID will look something like this "HAPPY_HANDS_PRESCHOOL."

  • If you have custom lead properties that you collect on the form, you can add these below the stage or the assigned site. The title for your custom property should be the API name specified in your CRM property settings. If the property is "single choice" the value must exactly match one of the options for the property.

  • The stage value must exactly match the stage you have configured in Playground. In this example, the value would be "New" not "New Lead" as shown in the JSON above.

🚨 API names are case-sensitive. program_name and Program_Name are treated as different properties, and the wrong casing will cause your Zap to fail.

Test the Integration

Once your Zap is configured, run a test to make sure leads land in your CRM correctly.

  1. In the Zapier editor, click the action step and continue to the Test tab.
    ​

  2. Click Test step.


    ​

  3. If the test is successful, Zapier will show a green success message and you'll see a new lead appear in your Playground CRM within a few seconds.
    ​

  4. Once you've confirmed the test lead shows up correctly, click Publish to turn the Zap on for real submissions.

💡 In the first few days you have this automation running, keep a close eye on incoming leads in Facebook to make sure these leads are flowing through to the CRM.


Create Leads from Winnie & Care.com (coming soon)

We're building direct integrations with Winnie and Care.com so families who find you on those sites land in your Playground CRM automatically. Once it's live, you won't need to copy inquiries over by hand or check another inbox to keep up with new leads.

💡 Please reach out to your account manager if you are interested in these integrations.


FAQ

These answer the most common questions about connecting Facebook, your website, and your scheduler to Playground CRM.

Getting Set Up

How do I get a Playground API key?

  1. Reach out to your Playground account manager and tell them which integrations you’re setting up (Facebook, a website form, a tour scheduler, or all three).

  2. Your account manager will create a key that has access to those integrations.

Where do I find my CRM ConfigId?

  1. From your admin dashboard, open your CRM.

  2. Copy the ID from your browser’s address bar. See the screenshot in Before you begin.

Facebook & Zapier

My Zap test failed. What should I check first?

  1. Open the action step in Zapier and look at the error message. It names the field that caused the problem.

  2. Confirm every Zapier chip in your Data field shows preview data. A chip with no preview means your Facebook form doesn’t collect that field, so remove it from the JSON.

  3. Check that your URL uses your real CRM ConfigId with no { } brackets.

  4. Confirm your x-api-key header has no extra spaces.

I get an error that my stage “does not exist.” How do I fix it?

  1. In your CRM settings, copy the stage name exactly as it appears, including capitalization and spaces.

  2. If two stages share the same name, use the stage’s ID instead of its name.

I get an “unknown property” error.

  1. Your JSON has a key that doesn’t match any property in your CRM. API names are case-sensitive, so program_name and Program_Name are different properties.

  2. Put guardian properties inside the guardian section, student properties inside the student section, and lead properties at the top level.

Why is the guardian relationship being rejected?

The guardianRelationship value must exactly match one of the relationship options in your CRM, such as Mother or Father. If you’re unsure, leave guardianRelationship out of your JSON. You can fill it in later from the lead.

Why is a guardian’s phone number being rejected?

  1. Playground accepts US phone numbers by default, such as (555) 123-4567 or +15551234567.

  2. If you collect international numbers, contact support to turn on international phone numbers for your CRM.

Will Zapier bring in Facebook leads from before I turned on my Zap?

  1. No. Zapier only sends leads that come in after your Zap is published.

  2. To bring in older leads, download them from Facebook’s Leads Center and use the CRM bulk upload.

Leads stopped coming in from Facebook. What happened?

  1. In Zapier, open your Zap and check that it’s still turned On.

  2. Check the Zap’s history for errors.

  3. If the person who connected Facebook changed their password or lost admin access to your Page, reconnect your Facebook account in Zapier.

How do I send leads to the right site?

  1. Add "assignedSite" to your JSON with the site’s School ID, such as "assignedSite": "HAPPY_HANDS_PRESCHOOL".

  2. If you leave it out, the lead is created without a site, and you can assign one from the CRM.

  3. For website forms, if your Playground form has a site question, send the family’s answer to that question instead.

Website Forms & Schedulers

Can I call the API directly from my website’s JavaScript?

No. Playground blocks API requests sent from a browser, and putting your API key in your website’s code would expose it to anyone who visits your site. Send requests from your website’s server instead.

Will leads from my integrations trigger my automations?

  1. Yes. Leads from Facebook, your website form, and your scheduler start the same automations as leads you add yourself.

What happens if a family submits twice, or books a tour after filling out a form?

If an active lead already has the same email or phone number, Playground adds the new information to that lead instead of creating a duplicate.

What date format should I use?

  • For birthdays and date fields, use YYYY-MM-DD or MM/DD/YYYY.

  • For a tour’s eventStart, use Unix milliseconds.

How do I find which times are open for tours?

  1. The API doesn’t return open times yet.

  2. For now, set up your scheduler with the meeting type’s availability, and if a family picks a time that’s no longer open, ask them to choose another.

Did this answer your question?