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

  • firstName string

    First name of the contact

  • lastName string

    Last name of the contact

  • email string

    Email of the contact

  • company string

    Company name of the contact

  • tag array[string]

    List of tags for the contact

  • customFields array[object]
    Hide customFields attributes Show customFields attributes object
    • _id string
    • name string
    • variable string
    • value string

Responses

  • 200 application/json

    Success

    Hide response attributes Show response attributes object
    • _id string
    • email string(email)
    • firstName string
    • lastName string
    • company string
    • tag array[string]
    • custom array[object]
      Hide custom attributes Show custom attributes object
      • _id string
      • name string
      • variable string
      • value string
    • campaignId string
    • createdAt string
    • status string
    • privacy string
    • branding object

      Additional properties are allowed.

      Hide branding attributes Show branding attributes object
      • useBranding boolean
      • brandingId string
    • note object

      Additional properties are allowed.

      Hide note attributes Show note attributes object
      • date string
      • note string
  • 400

    Bad Request -- Your request is invalid.

  • 401

    Unauthorized -- Your API key is wrong.

  • 403

    Forbidden -- The object requested is hidden for administrators only.

  • 404

    Not Found -- The specified object could not be found.

  • 429

    Too Many Requests -- You're requesting too many objects! Slow down!

  • 500

    Internal Server Error -- We had a problem with our server. Try again later.

  • 503

    Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

POST /contacts/{contactId}
curl \
 --request POST 'https://api.usecollect.com/v1/contacts/{contactId}' \
 --header "Content-Type: application/json" \
 --data '{"lastName":"Doe","firstName":"John","customFields":[{"value":"Blue","variable":"color"},{"value":"US","variable":"country"}]}'
Request example
{
  "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": [
    {
      "_id": "NxAHPWu9hRzcyD24m",
      "status": "completed",
      "privacy": "team",
      "branding": {
        "useBranding": false
      },
      "createdAt": "2022-02-22T13:40:26Z",
      "campaignId": "mYCsdgB4DQoENBaX6"
    },
    {
      "_id": "jP6sXJ72R8xjxceaP",
      "note": {
        "date": "2022-05-04T14:25:17Z",
        "note": "Asked him to send back another document"
      },
      "status": "completed",
      "privacy": "team",
      "branding": {
        "useBranding": false
      },
      "createdAt": "2022-04-19T13:58:07Z",
      "campaignId": "mYCsdgB4DQoENBaX6"
    },
    {
      "_id": "FmZNnerEFRF3dLYPK",
      "status": "pending",
      "privacy": "team",
      "branding": {
        "brandingId": "jSEj7vHk3wLG3gRF7",
        "useBranding": true
      },
      "createdAt": "2022-06-18T16:19:46Z",
      "campaignId": "mYCsdgB4DQoENBaX6"
    }
  ],
  "createdAt": "2022-02-22T13:40:26Z",
  "firstName": "John",
  "lastActivity": "2022-06-19T17:14:52Z"
}