Developers · Zapier + CASEpeer

Send referrals to Thurgood from CASEpeer

About 10 minutes, one time. After that, when you mark a case 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 CASEpeer

Set the case status to one of CASEpeer's referred statuses, such as Referred Open, the way you already mark a case referred out.

Step 4

Build the Zap

  1. 01

    Create a Zap

    In Zapier, create a new Zap.

  2. 02

    CASEpeer → Case Status Change

    Connect your CASEpeer account when asked. It runs on every status change, so the "Send only when" setting in step 5 sends only referred cases.

  3. 03

    Thurgood → Send Referral

    Connect it with your Thurgood API key.

Step 5

Map the fields

Thurgood fieldMap from CASEpeer
Record IDThe case ID (required)
NameThe client's name (required)
Email, PhoneThe client's email and phone
StateThe state the client worked in, if you track it
Initial SummaryThe case description or intake notes
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…The case status
…equalsReferred Open, Referred Accepted Open (the value you use for referrals; separate several with commas)

Leave blank anything you don't track. "Send only when" is what keeps other cases 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 case to Thurgood. Pick a case 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 case 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.