Interactive Text | Contacts Service | Create contact

You can create a new contact.

Endpoint

GET /byon/contacts/v1/

Request Body

Attributes Description
contact required (body) A comma-separated list of contact details.
  • companyAddress (optional)
  • companyName
  • contactEmail
  • contactName
  • contactPhone
  • contactTitle (optional)
  • friendlyName (optional)

Example body for a new contact

{
  "companyAddress": "myCompanyAddress",
  "companyName": "myCompanyName",
  "contactEmail": "mail@myemail.com",
  "contactName": "myContactName",
  "contactPhone": "+49231123456789",
  "contactTitle": "myContactTitle",
  "friendlyName": "myFrienldyName"
}

Curl

curl -X POST "https://api.tyntec.com/byon/contacts/v1/" -"accept: application/json" -"apiKey: ds9SomeApiKeyl337" -"content-type: application/json" -d "{  \"companyAddress\": \"myCompanyAddress\"\"companyName\": \"myCompanyName\"\"contactEmail\": \"mail@myemail.com\", \"contactName\": \"myContactName\"\"contactPhone\": \"49231123456789\"\"contactTitle\": \"myContactTitle\"\"friendlyName\": \"myFrienldyName\"}"

Responses

Code: 201
CreatedExample

Response body

{
  "accountId": "CPaasAccountName",
  "contactId": "26c99e4d97b44c9aa50bf7fb29801ebe",
  "friendlyName": "myFrienldyName",
  "companyName": "myCompanyName",
  "companyAddress": "myCompanyAddress",
  "contactName": "myContactName",
  "contactEmail": "mail@myemail.com",
  "contactPhone": "+49231123456789",
  "contactTitle": "myContactTitle",
  "dateCreated": 1521036849011,
  "dateUpdated": 1521036849011,
  "timestampCreated": "2018-03-14T14:14:09.011Z",
  "timestampUpdated": "2018-03-14T14:14:09.011Z"
}

Code: 400
Not valid contact providedExample
Error: Bad Request

Response body

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

Code: 401
Unauthorized

Code: 403
Forbidden

Code: 404
Contact not found

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