Leads

Create a lead

Creates a lead and its first matter, then scores it, notifies the firm, and emits lead.created — the same path the firm's own capture form takes.

Leads are matched by email within the original firm book. If it matches someone the firm already has, the existing client is returned with deduped: true and a 200 rather than a 201. That is a success: treat it as the same person, not a conflict. It is also what makes this endpoint safe to retry.

Requires a key with write access.

post/api/v1/leads

Request

  • Base URL
    https://app.relaw.ai
  • URL
    https://app.relaw.ai/api/v1/leads
  • Auth
    HTTP bearer

Request body

firstNamestring required
lastNamestring required
emailstring email required

Required, because it is a deduplication key. A lead with no email cannot be matched against existing clients.

phonestring required

Required contact number. Any format; normalized to E.164. Shared phone numbers do not merge people.

leadSourcestring

Free text shown to the firm as context, e.g. 'Google Ads'. Defaults to 'API'.

addressstring

Plain-text mailing address. Appended to this matter's private notes; does not change questionnaire answers.

notesstring

Internal context or AI summary, appended to this matter's private notes. Existing staff notes are preserved; identical imported details are not appended twice. Not sent to the client or echoed in the response or lead webhook.

messagestring

Alias for notes. If both contain text, their trimmed values must be identical; otherwise the request returns 400.

templateIdstring uuid

The intake form this lead answered. Defaults to the firm's lead capture form.

Response

Matched an existing client. deduped is true and no new client was created.

idstring uuid required
object'client' required
firstNamestring required
lastNamestring required
emailstring nullable

Null is a real possibility, not an edge case — imported contacts often have no email. Do not assume this is present.

phonestring nullable

E.164.

type'person' | 'organization'
lifecycle'lead' | 'client' | 'former' required

lead has not been engaged; client is active; former is closed.

leadSourcestring nullable
leadScoreinteger nullable

0–100, or null if not yet scored. Recomputed as engagement changes and as a lead goes cold, so it moves without the record changing.

leadScoreBand'hot' | 'warm' | 'cold' | 'null' nullable
createdAtstring date-time
matterIdstring uuid required
dedupedboolean required

True when this matched an existing client rather than creating one.

Changes

No recorded changes to this operation across all 1 revision of this API.