Skip to content
Skip to main content
POST
/v3/grants/{grant_id}/contacts

Create contact

Create a contact in a user's address book.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

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.

Example: "1980-12-31"
company_namestring

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

Example: "Nylas"
emailsarray<object>
given_name*string

The contact's given name.

Example: "John"
groupsarray<object>

A list of IDs for contact groups the contact is included in. Microsoft, iCloud and IMAP support at most one contact group per contact.

im_addressesarray<object>
job_titlestring

The contact's occupation or job title.

Example: "Software Engineer"
manager_namestring

The name of the contact's manager.

Example: "Bill"
middle_namestring

The contact's middle name.

Example: "Jacob"
nicknamestring

A custom nickname for the contact.

Example: "JD"
notesstring

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

Example: "Loves Ramen"
office_locationstring

The location of the office where the contact works.

Example: "123 Main Street"
phone_numbersarray<object>
physical_addressesarray<object>
suffixstring

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

Example: "Jr."
surnamestring

The contact's surname.

Example: "Doe"
web_pagesarray<object>

An array of the contact's websites. Different providers may have different limits on the number of web pages.

  • IMAP/iCloud/Yahoo: at most one web page per contact.
  • Microsoft/EWS: at most one web page per contact. The type must be work.

Responses

request_idstring

The request ID.

dataobject
POSThttps://api.us.nylas.com/v3/grants/{grant_id}/contacts

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

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.

Loading editor...

Autocomplete and validation come from this endpoint's request schema.