latestSwagger 2.02026-08-101561322.2 MB

3e4029d19684

Contacts

Edit a contact

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Contacts/updateContact" target="_blank">Try in sandbox</a><br>

put/api/v2/contacts/{id}/normalized

Path parameters

idinteger required

Request body

firstNamestring

Contact first name.

lastNamestring

Contact last name.

phonestring required

Phone number in E.164 format.

emailstring email

Contact email address.

companyNamestring

Contact company name.

listsstring required

Comma-separated list ID. Each contact must be assigned to at least one list.

favoritedboolean

Is the contact marked as favorite?

blockedboolean

Is the contact blocked for outgoing and incoming messaging?

type0 | 1

Force type of phone. Possible values: 0 is landline; 1 is mobile; default is -1 (auto-detection).

local0 | 1

Treat phone numbers passed in the request body as local.

countrystring

The 2-letter ISO country code for local phone numbers, used when local is set to true.

tagsinteger[]

An array of tag IDs that will be assigned to the contact.

ownerinteger

Contact Owner ID

Example request

{
  "firstName": "Example first name",
  "lastName": "Example first name",
  "email": "charles@example.com",
  "companyName": "My pretty company",
  "lists": "10541,18599",
  "type": 1,
  "customFieldValues": [
    {
      "id": 515,
      "userCustomFieldId": 515,
      "name": "Custom name",
      "value": "Custom value",
      "createdAt": "2015-02-11T07:33:19+0000"
    }
  ],
  "country": "US",
  "tags": [
    23,
    45
  ],
  "owner": 2
}

Response

The contact has been created with success.

idinteger required

Resource ID.

hrefstring required

A link to this resource. If you want to fetch it, just GET this address.

Example response

{
  "id": 515,
  "href": "/api/v2/entity_name/1"
}