Edit contact

What it does

You can edit a contact.

Endpoint

POST

/byon/contacts/v1/{contactId}

Request Body

Attributes

Description

contactId
required (path)

The unique identifier of the contact to update.

contact
required (body)

A comma-separated list of contact details to update.

  • companyAddress (optional)
  • companyName (optional)
  • contactEmail (optional)
  • contactName (optional)
  • contactPhone (optional)
  • contactTitle (optional)
  • friendlyName (optional)

Example body for changing two fields only

{
  "companyAddress": "myCompanyAddress",
  "companyName": "myCompanyName"
}

Curl

curl -X POST "https://api.tyntec.com/byon/contacts/v1/26c99e4d97b44c9aa50bf7fb29801ebe" -H  "accept: application/json" -H  "apiKey: ds9SomeApiKeyl337" -H  "content-type: application/json" -d "{  \"companyAddress\": \"myCompanyAddress\",  \"companyName\": \"myCompanyName\"}"

 

Responses

Code

Details

200

The edited contact
Example Value
{
  "companyAddress": "string",
  "companyName": "string",
  "contactEmail": "string",
  "contactName": "string",
  "contactPhone": "string",
  "contactTitle": "string",
  "friendlyName": "string"
}

Example

Response body

{
  "accountId": "CPaasAccountName",
  "contactId": "26c99e4d97b44c9aa50bf7fb29801ebe",
  "friendlyName": "myFriendlyName",
  "companyName": "myCompanyName",
  "companyAddress": "myCompanyAddress",
  "contactName": "myContactName",
  "contactEmail": "mail@myemail.com",
  "contactPhone": "+49231123456789",
  "dateCreated": 1521117972092,
  "dateUpdated": 1521125758284,
  "timestampCreated": "2018-03-15T14:55:58.284Z",
  "timestampUpdated": "2018-03-15T14:55:58.284Z"
}

400

Contact can not be editedExample

Error: Bad Request

Response body

{"message":"The number provided is not valid","code":"PhoneNumberNotValid","timestamp":1521036399010}

401

Unauthorized

403

Forbidden

404

Contact not found

500

Something went wrong :-(
Example Value
{  "code": "string",  "message": "string",  "timestamp": 0}