Push a lead

Creates the person (or reuses them, matched by phone or email) and their enquiry, in one call. Idempotent per `externalId` within your organization. A lead with a phone number and no conversation yet is what the automatic first contact reacts to: if the organization has it enabled, the approved template goes out on its own.

POST
/v1/leads

Creates the person (or reuses them, matched by phone or email) and their enquiry, in one call. Idempotent per externalId within your organization.

A lead with a phone number and no conversation yet is what the automatic first contact reacts to: if the organization has it enabled, the approved template goes out on its own.

Authorization

AuthorizationBearer <token>

The organization API key, sent as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

answers?array<>

What the person filled in, verbatim. Send every field of your form, not just the ones you think Trama understands.

capturedAt?string

When the person left their details. Defaults to now. Send it when you are backfilling, so the card is not dated today.

Formatdate-time
companyName?|

The company they declared. Becomes the title of the card.

email?|
Formatemail
externalId?|

Your own id for this submission. It is the IDEMPOTENCY KEY, scoped to your organization: sending the same one twice is a no-op. Without it, a retried request is counted as a second lead — it still lands on the same person and the same open enquiry, but send it.

Length1 <= length
firstName*string

The name. A single field with the full name works: it is split on the first space unless you also send lastName.

Length1 <= length
formName?|

Which form this came from, so whoever picks the card up does not have to guess.

lastName?string|null
phone?|

In E.164 when you have it. A national number is promoted using the organization's country.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/leads" \  -H "Content-Type: application/json" \  -d '{    "firstName": "string"  }'
{  "customerId": "string",  "opportunityId": "string",  "status": "created"}