TrainFog Developers
Companies

Crea azienda

POST
/companies
AuthorizationBearer <token>

In: header

Request Body

application/json

workspace?string
name*string
domain?string
industry?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"
owner?string
consents?array<>
traits?

Response Body

application/json

application/json

application/json

curl -X POST "https://api.trainfog.com/developers/v1.0/companies" \  -H "Content-Type: application/json" \  -d '{    "name": "Acme Inc."  }'
{
  "id": "688893ebd804d8588b1afbe0",
  "workspace": "688893ebd804d8588b1afbe0",
  "name": "Acme Inc.",
  "domain": "acme.com",
  "industry": "Retail",
  "status": "New",
  "stage": "Lead",
  "owner": "688893ebd804d8588b1afbe1",
  "consents": [
    {
      "type": "newsletter",
      "granted": true,
      "updatedAt": "2019-08-24T14:15:22Z",
      "method": "manual",
      "ip": "203.0.113.10",
      "userAgent": "Mozilla/5.0"
    }
  ],
  "traits": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Bad request"
}
{
  "error": "Unauthorized"
}