Contacts

Create contact

Create a contact in a user's address book. New contacts use source=address_book. See Contact sources for provider-specific behavior.

You can attach Nylas-managed metadata to the Contact object. Nylas stores metadata separately from the provider contact, so the provider write and metadata write are not atomic.

post/v3/grants/{grant_id}/contacts

Query parameters

selectstring

Specify fields that you want Nylas to return, as a comma-separated list (for example, select=id,updated_at). This allows you to receive only the portion of object data that you're interested in. You can use select to optimize response size and reduce latency by limiting queries to only the information that you need.

Request body

birthdaystring

The contact's birthday in ISO-8601 format.

company_namestring

The name of the company that the contact is affiliated with (for example, their workplace).

given_namestring required

The contact's given name.

job_titlestring

The contact's occupation or job title.

manager_namestring

The name of the contact's manager. Native iCloud and Yahoo CardDAV contacts don't support this field. See Contacts limitations for more information.

metadataMetadata

The metadata associated with the object. For more information, see Metadata.

middle_namestring

The contact's middle name.

nicknamestring

A custom nickname for the contact.

notesstring

Notes about with the contact (for example, their favorite food).

office_locationstring

The location of the office where the contact works. Native iCloud and Yahoo CardDAV contacts don't support this field. See Contacts limitations for more information.

suffixstring

(Not supported for EWS) The suffix of a contact's name, if applicable.

source'address_book'

Contacts created through the API are saved to the provider address book.

surnamestring

The contact's surname.

Example request

{
  "birthday": "1980-12-31",
  "company_name": "Nylas",
  "emails": [
    {
      "email": "leyah@example.com",
      "type": "work"
    }
  ],
  "given_name": "John",
  "groups": [
    {
      "id": "5d3qmne77v32r8l4phyuksl2x"
    }
  ],
  "im_addresses": [
    {
      "im_address": "myJabberAddress",
      "type": "jabber"
    }
  ],
  "job_title": "Software Engineer",
  "manager_name": "Bill",
  "middle_name": "Jacob",
  "nickname": "JD",
  "notes": "Loves Ramen",
  "office_location": "123 Main Street",
  "phone_numbers": [
    {
      "number": "+1-555-555-5555",
      "type": "work"
    }
  ],
  "physical_addresses": [
    {
      "city": "San Francisco",
      "country": "USA",
      "postal_code": "94107",
      "state": "CA",
      "street_address": "123 Main Street",
      "type": "work"
    }
  ],
  "suffix": "Jr.",
  "surname": "Doe",
  "web_pages": [
    {
      "url": "https://www.example.com/leyah-miller",
      "type": "work"
    }
  ]
}

Response

Contact

request_idstring

The request ID.

Example response

{
  "request_id": "5fa64c92-e840-4357-86b9-2aa364d35b88"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.