Add a contact method

This method allows you to create a new contact method for a contact.

URL

/api/v2/contacts/add_contact_method

Supported Parameters

  • contact - the contact's ID, reference or name (required)
  • method_type - the type of contact method (email, twitter, telephone)
  • data - the associated data (e.g. the email address or twitter handle)
  • default - whether or not the contact method should be default or not

Returned Data

If the record is created successfully, you will receive a 201 Created status with details of the newly created contact method. If a validation error occurs you will receive a 422 Unprocessable Entity and data containing the errors.

Example JSON

An example of a successfully contact method creation creation:

{
    "id": 1,
    "method_type": "email",
    "data": "test@atechmedia.com",
    "default": true
}

An example of a validation error:

{
    "data": [
        "is assigned to Agnes Brown"
    ]
}

Proudly powered by Katapult. Running on 100% renewable energy.