Developers · Zapier + MyCase

Send referrals to Thurgood from MyCase

About 10 minutes, one time. After that, when you mark a lead as referred to Thurgood, the client's details reach us automatically and their CaseFile is started. Thurgood never emails the client. You need a Zapier account (a free one works) and your Thurgood API key.

Step 1

Add the Thurgood app to Zapier

Open this link while logged in to Zapier and accept the invite: add Thurgood to Zapier.

Step 2

Get your API key

Each firm has its own key, issued by Thurgood. It starts with tgk_. If you don't have one, email caseworker@askthurgood.com with your firm's name. Thurgood only stores a fingerprint of the key, so keep it somewhere safe; if it's lost, we revoke it and issue a new one.

Step 3

Mark referrals in MyCase

Once, add a lead status for referrals out: Leads → Manage pipeline → Add status, for example "Referred to Thurgood". When you add a lead you are referring to Thurgood, give it that status.

Step 4

Build the Zap

  1. 01

    Create a Zap

    In Zapier, create a new Zap.

  2. 02

    MyCase → Lead Added or Updated

    Connect your MyCase account when asked. Set Action to Lead Added. MyCase sends a lead to Zapier when it is added, so set the referral status when you add the lead. Changing the status of an existing lead does not send it.

  3. 03

    Thurgood → Send Referral

    Connect it with your Thurgood API key.

Step 5

Map the fields

Thurgood fieldMap from MyCase
Record IDID (required)
NameFirst Name, a space, then Last Name (required)
EmailEmail
PhoneCell Phone Number
StateAddress State (or leave blank; Thurgood reads the state from the lead details)
Initial SummaryLead Details
CompanyThe client's employer, if you track it
Employer's stated reason, Believed reasonYour intake question fields, if you have them
Dates of employment, Hourly or SalaryYour dates and pay fields
Documents or Links, Job Title, NotesAnything else you want Thurgood to have
Send only when this field…Status
…equalsReferred to Thurgood (the value you use for referrals; separate several with commas)

Leave blank anything you don't track. "Send only when" is what keeps other leads out: anything that doesn't match is skipped and nothing is sent. It's built into the Thurgood step, so the Zap stays two steps and works on Zapier's free plan.

Step 6

Test and turn on

Testing sends a real referral: when you click Test step, Zapier sends the sample lead to Thurgood. Pick a lead you are actually referring to us, or skip the test. Then turn the Zap on.

What happens next

After the Zap is on

  • Thurgood creates the client's record, linked to your firm, and starts their CaseFile from the intake you sent.
  • Nothing is emailed to the client or to your firm. Once the Zap is on, you don't need to email referrals to Thurgood.
  • Your firm's lawyers can see the referral, and the intake you sent, on the client's profile.
  • Each lead is sent once, so editing it afterwards won't create a duplicate.
  • If the client's email already belongs to a Thurgood client, that client is left unchanged.
API reference

The API behind the Zap

You don't need this to use Zapier. It's here for your developers, or if you'd rather send referrals from your own system.

  1. Authentication

    Send your key in the X-Api-Key header on every request. Authorization: Bearer <key> is also accepted on POST, and an api_key field for senders that can't set headers. Use https://askthurgood.com, not www.: a redirect would drop the request body.

  2. Check a key

    GET https://askthurgood.com/api/thurgood/referrals/me
    X-Api-Key: tgk_your_key_here
    
    200 {"status": true, "lawfirm": "Your Firm Name"}
    401 {"status": false, "error": "Invalid API key"}
  3. Send a referral

    POST https://askthurgood.com/api/thurgood/referrals
    X-Api-Key: tgk_your_key_here
    Content-Type: application/json
    
    {
      "external_id": "4821",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "state": "CA",
      "initial_summary": "I was fired two weeks after reporting unpaid overtime..."
    }

    JSON or form fields are both accepted. Fields not listed below are ignored.

FieldRequiredDescription
external_idRecommendedYour record id (e.g. Pipedrive deal id). Each id is accepted once per firm. pipedrive_deal_id also works.
nameYesClient's full name (or send first_name + last_name).
emailNoClient's email. If sent, it must be a valid address.
phoneNoClient's phone.
stateNoUS state the client worked in — CA or California.
companyNoEmployer.
initial_summaryNoThe client's account of what happened. Used to start their CaseFile.
employer_reasonNoWhat the employer said was the reason for the termination/separation.
believed_reasonNoWhy the client believes they were actually terminated/separated.
employment_datesNoDates of employment.
payNoHourly or salary.
drive_linksNoLinks to any client documents (Google Drive, Dropbox, etc.).
job_titleNoJob title.
notesNoAnything else for Thurgood.
ResponseBodyMeaning
202{"status": true, "referral_id": 123}Accepted. Processing finishes within a few minutes.
200{"status": true, "duplicate": true, "referral_id": 123}This external_id was already sent — nothing new created.
401{"status": false, "error": "Invalid API key"}Missing, wrong or revoked key.
422{"status": false, "error": "A name is required"}Missing name, or an email that isn't a valid address.
429More than 200 requests a minute.