Add a contact

POST /contacts

This endpoint add a new contact. It returns the contact object.

application/json

Body Required

Responses

POST /contacts
curl \
 -X POST https://api.usecollect.com/v1/contacts \
 -H "Content-Type: application/json" \
 -d '{"tags":["Speaker"],"email":"john@example.com","lastName":"Doe","firstName":"John","customFields":[{"value":"Blue","variable":"color"},{"value":"US","variable":"country"}]}'
Request example
{
  "tags": [
    "Speaker"
  ],
  "email": "john@example.com",
  "lastName": "Doe",
  "firstName": "John",
  "customFields": [
    {
      "value": "Blue",
      "variable": "color"
    },
    {
      "value": "US",
      "variable": "country"
    }
  ]
}
Response examples (200)
{
  "_id": "uBJadNFcjrC6emRom",
  "tag": [
    "Speaker"
  ],
  "email": "johndoe@example.com",
  "custom": [
    {
      "_id": "yw6XDyeFvbqr86yA6",
      "name": "Favorite color",
      "value": "Blue",
      "variable": "color"
    },
    {
      "_id": "CqdFwGX3yitk9zf8z",
      "name": "Country",
      "value": "US",
      "variable": "country"
    }
  ],
  "lastName": "Doe",
  "requests": [],
  "createdAt": "2023-02-22T13:40:26Z",
  "firstName": "John",
  "nbRequest": 0
}