Skip to main content
POST
/
v1
/
prospects
Create a New Prospect
curl --request POST \
  --url https://api.trata.ai/v1/prospects \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "John Doe",
  "email": "john.doe@example.com",
  "phoneNumber": "1234567890",
  "externalReference": [
    {
      "providerName": "Google Analytics",
      "id": "GA-123456",
      "providerProps": "abcdefg"
    }
  ],
  "status": "NEW",
  "prospectProps": "software"
}'
{
  "id": "pro.1731301754.OZSMSU1S",
  "orgId": "org.1726902940.GZChqlpU",
  "name": "Hari",
  "phoneNumber": "96260-12778",
  "externalReference": [],
  "status": "SERVICE_ORDER_PLACED",
  "prospectProps": {},
  "createdBy": "trata-system",
  "createdAt": "2024-11-11T05:09:14.979287",
  "updatedBy": "trata-system",
  "updatedAt": "2024-11-11T05:09:14.979289"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
status
enum<string>
required
Available options:
NEW,
GENERAL_ENQUIRY,
SCHEDULED_CALLBACK_WITH_BOT,
SCHEDULED_APPOINTMENT_WITH_PERSON,
SCHEDULED_APPOINTMENT_FOR_SERVICE,
NOT_INTERESTED,
PRODUCT_ORDER_PLACED,
SERVICE_ORDER_PLACED
name
string | null

Name of the prospect

Required string length: 1 - 512
Example:

"John Doe"

email
string<email> | null

Email of the prospect

Required string length: 1 - 512
Example:

"john.doe@example.com"

phoneNumber
string | null

Phone number of the prospect

Required string length: 1 - 512
Example:

"1234567890"

externalReference
ExternalReference · object[] | null

External references for the prospect

prospectProps
object | null

Props for the prospect

Example:

"software"

Response

Prospect created successfully

Prospects are the potential customers for business

id
string
required
externalReference
ExternalReference · object[] | null
required
status
string
required
prospectProps
object | null
required
orgId
string
name
string | null
email
string | null
phoneNumber
string | null
createdBy
string
createdAt
string<date-time>
updatedBy
string
updatedAt
string<date-time>
I