Modify a contact

POST /contacts/{contactId}

This endpoint modify an existing contact. It returns the contact object.

Path parameters

  • contactId string Required

    Specify the ID of the contact to modify.

application/json

Body Required

Responses

POST /contacts/{contactId}
curl \
 -X POST https://api.usecollect.com/v1/contacts/{contactId} \
 --user "username:password" \
 -H "Content-Type: application/json" \
 -d '{"firstName":"John","lastName":"Doe","customFields":[{"variable":"color","value":"Blue"},{"variable":"country","value":"US"}]}'
Request example
{
  "firstName": "John",
  "lastName": "Doe",
  "customFields": [
    {
      "variable": "color",
      "value": "Blue"
    },
    {
      "variable": "country",
      "value": "US"
    }
  ]
}
Response examples (200)
{
  "_id": "uBJadNFcjrC6emRom",
  "email": "johndoe@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "tag": [
    "Speaker"
  ],
  "custom": [
    {
      "_id": "yw6XDyeFvbqr86yA6",
      "name": "Favorite color",
      "variable": "color",
      "value": "Blue"
    },
    {
      "_id": "CqdFwGX3yitk9zf8z",
      "name": "Country",
      "variable": "country",
      "value": "US"
    }
  ],
  "createdAt": "2022-02-22 13:40:26 UTC",
  "lastActivity": "2022-06-19 17:14:52 UTC",
  "requests": [
    {
      "_id": "NxAHPWu9hRzcyD24m",
      "campaignId": "mYCsdgB4DQoENBaX6",
      "createdAt": "2022-02-22 13:40:26 UTC",
      "status": "completed",
      "privacy": "team",
      "branding": {
        "useBranding": false
      }
    },
    {
      "_id": "jP6sXJ72R8xjxceaP",
      "campaignId": "mYCsdgB4DQoENBaX6",
      "createdAt": "2022-04-19 13:58:07 UTC",
      "status": "completed",
      "privacy": "team",
      "branding": {
        "useBranding": false
      },
      "note": {
        "date": "2022-05-04 14:25:17 UTC",
        "note": "Asked him to send back another document"
      }
    },
    {
      "_id": "FmZNnerEFRF3dLYPK",
      "campaignId": "mYCsdgB4DQoENBaX6",
      "createdAt": "2022-06-18 16:19:46 UTC",
      "status": "pending",
      "privacy": "team",
      "branding": {
        "useBranding": true,
        "brandingId": "jSEj7vHk3wLG3gRF7"
      }
    }
  ]
}