TrainFog Developers
People

Create person

POST
/people
AuthorizationBearer <token>

In: header

Request Body

application/json

workspace?string

Optional workspace ID. Defaults to the workspace tied to the API key.

firstName*string
lastName*string
email?string
Formatemail
phone?string
company?string
status?string
Value in"New" | "Open" | "In Progress" | "Open Deal" | "Unqualified" | "Attempted to Contact" | "Connected" | "Bad Timing"
stage?string
Value in"Subscriber" | "Lead" | "Marketing Qualified Lead" | "Sales Qualified Lead" | "Opportunity" | "Customer" | "Evangelist" | "Other"
source?string
consents?array<>
traits?

Custom metadata captured for the person.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.trainfog.com/developers/v1.0/people" \  -H "Content-Type: application/json" \  -d '{    "firstName": "Jane",    "lastName": "Doe"  }'
{
  "id": "677c5d5b4e8f4c0a8b5f0c7a",
  "workspace": "688893ebd804d8588b1afbe0",
  "firstName": "Jane",
  "lastName": "Doe",
  "email": "jane.doe@example.com",
  "phone": "+15555550123",
  "company": "688893ebd804d8588b1afbe0",
  "status": "New",
  "stage": "Lead",
  "source": "web_form",
  "consents": [
    {
      "type": "newsletter",
      "granted": true,
      "updatedAt": "2019-08-24T14:15:22Z",
      "method": "web_form",
      "ip": "192.168.0.1",
      "userAgent": "string"
    }
  ],
  "traits": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Bad request"
}
{
  "error": "Unauthorized"
}