Create a new contact

This method allows you to create a new contact object.

URL

/api/v2/contacts/create

Supported Parameters

  • name - the contact's name
  • reference - the contact's reference (must be unique or blank)
  • company - the name for the contact (optional)
  • pin - the contact's support PIN (leave blank for auto generated)
  • sla - the ID or name of an SLA to use for all tickets submitted by this contact (optional)
  • priority - the ID or name of a priority to use for all tickets submitted by this contact (optional)

Returned Data

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

Example JSON

An example of a successful contact creation:

{
  "id": 8,
  "reference": "SS2",
  "name": "Steve Smith",
  "abbreviated_name": "Steve S",
  "company": "Steve's Pies",
  "pin": "221520",
  "created_at": "2012-03-21T16:51:52Z"
}

An example of a validation error:

{
  "reference": [
    "is already in use"
  ]
}

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