contacts
ListContactGroupsQueryParams = ListQueryParams
module-attribute
The available query parameters for listing contact groups.
UpdateContactRequest = CreateContactRequest
module-attribute
Interface for updating a Nylas contact.
Contact
dataclass
Class representation of a Nylas contact object.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
Globally unique object identifier. |
grant_id |
str
|
Grant ID representing the user's account. |
object |
str
|
The type of object. |
birthday |
Optional[str]
|
The contact's birthday. |
company_name |
Optional[str]
|
The contact's company name. |
display_name |
Optional[str]
|
The contact's display name. |
emails |
Optional[List[ContactEmail]]
|
The contact's email addresses. |
im_addresses |
Optional[List[InstantMessagingAddress]]
|
The contact's instant messaging addresses. |
given_name |
Optional[str]
|
The contact's given name. |
job_title |
Optional[str]
|
The contact's job title. |
manager_name |
Optional[str]
|
The contact's manager name. |
middle_name |
Optional[str]
|
The contact's middle name. |
nickname |
Optional[str]
|
The contact's nickname. |
notes |
Optional[str]
|
The contact's notes. |
office_location |
Optional[str]
|
The contact's office location. |
picture_url |
Optional[str]
|
The contact's picture URL. |
picture |
Optional[str]
|
The contact's picture. |
suffix |
Optional[str]
|
The contact's suffix. |
surname |
Optional[str]
|
The contact's surname. |
source |
Optional[SourceType]
|
The contact's source. |
phone_numbers |
Optional[List[PhoneNumber]]
|
The contact's phone numbers. |
physical_addresses |
Optional[List[PhysicalAddress]]
|
The contact's physical addresses. |
web_pages |
Optional[List[WebPage]]
|
The contact's web pages. |
groups |
Optional[List[ContactGroupId]]
|
The contact's groups. |
Source code in nylas/models/contacts.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
ContactEmail
dataclass
An email address for a contact.
Attributes:
Name | Type | Description |
---|---|---|
email |
Optional[str]
|
The email address. |
type |
Optional[str]
|
The type of email address. |
Source code in nylas/models/contacts.py
74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
ContactGroup
dataclass
Class representation of a Nylas contact group object.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
Globally unique object identifier. |
grant_id |
str
|
Grant ID representing the user's account. |
object |
str
|
The type of object. |
group_type |
Optional[GroupType]
|
The type of contact group. |
name |
Optional[str]
|
The name of the contact group. |
path |
Optional[str]
|
The path of the contact group. |
Source code in nylas/models/contacts.py
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
ContactGroupId
dataclass
A contact group ID for a contact.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The contact group ID. |
Source code in nylas/models/contacts.py
89 90 91 92 93 94 95 96 97 98 99 |
|
CreateContactRequest
Bases: TypedDict
Interface for creating a Nylas contact.
Attributes:
Name | Type | Description |
---|---|---|
birthday |
NotRequired[str]
|
The contact's birthday. |
company_name |
NotRequired[str]
|
The contact's company name. |
display_name |
NotRequired[str]
|
The contact's display name. |
emails |
NotRequired[List[WriteableContactEmail]]
|
The contact's email addresses. |
im_addresses |
NotRequired[List[WriteableInstantMessagingAddress]]
|
The contact's instant messaging addresses. |
given_name |
NotRequired[str]
|
The contact's given name. |
job_title |
NotRequired[str]
|
The contact's job title. |
manager_name |
NotRequired[str]
|
The contact's manager name. |
middle_name |
NotRequired[str]
|
The contact's middle name. |
nickname |
NotRequired[str]
|
The contact's nickname. |
notes |
NotRequired[str]
|
The contact's notes. |
office_location |
NotRequired[str]
|
The contact's office location. |
picture_url |
NotRequired[str]
|
The contact's picture URL. |
picture |
NotRequired[str]
|
The contact's picture. |
suffix |
NotRequired[str]
|
The contact's suffix. |
surname |
NotRequired[str]
|
The contact's surname. |
source |
NotRequired[SourceType]
|
The contact's source. |
phone_numbers |
NotRequired[List[WriteablePhoneNumber]]
|
The contact's phone numbers. |
physical_addresses |
NotRequired[List[WriteablePhysicalAddress]]
|
The contact's physical addresses. |
web_pages |
NotRequired[List[WriteableWebPage]]
|
The contact's web pages. |
groups |
NotRequired[List[WriteableContactGroupId]]
|
The contact's groups. |
Source code in nylas/models/contacts.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
|
FindContactQueryParams
Bases: TypedDict
The available query parameters for finding a contact.
Attributes:
Name | Type | Description |
---|---|---|
profile_picture |
NotRequired[bool]
|
If true and picture_url is present, the response includes a Base64 binary data blob that you can use to view information as an image file. |
Source code in nylas/models/contacts.py
343 344 345 346 347 348 349 350 351 352 |
|
GroupType
Bases: str
, Enum
Enum representing the different types of contact groups.
Source code in nylas/models/contacts.py
355 356 357 358 359 360 |
|
InstantMessagingAddress
dataclass
An instant messaging address for a contact.
Attributes:
Name | Type | Description |
---|---|---|
im_address |
Optional[str]
|
The instant messaging address. |
type |
Optional[str]
|
The type of instant messaging address. |
Source code in nylas/models/contacts.py
102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
ListContactsQueryParams
Bases: ListQueryParams
Interface of the query parameters for listing calendars.
Attributes:
Name | Type | Description |
---|---|---|
limit |
NotRequired[int]
|
The maximum number of objects to return. This field defaults to 50. The maximum allowed value is 200. |
page_token |
NotRequired[str]
|
An identifier that specifies which page of data to return. This value should be taken from a ListResponse object's next_cursor parameter. |
email |
NotRequired[str]
|
Returns the contacts matching the exact contact's email. |
phone_number |
NotRequired[str]
|
Returns the contacts matching the contact's exact phone number |
source |
NotRequired[SourceType]
|
Returns the contacts matching from the address book or auto-generated contacts from emails. For example of contacts only from the address book: /contacts?source=address_bookor for only autogenerated contacts:/contacts?source=inbox` |
group |
NotRequired[str]
|
Returns the contacts belonging to the Contact Group matching this ID |
recurse |
NotRequired[bool]
|
When set to true, returns the contacts also within the specified Contact Group subgroups, if the group parameter is set. |
Source code in nylas/models/contacts.py
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
|
PhoneNumber
dataclass
A phone number for a contact.
Attributes:
Name | Type | Description |
---|---|---|
number |
Optional[str]
|
The phone number. |
type |
Optional[str]
|
The type of phone number. |
Source code in nylas/models/contacts.py
19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
PhysicalAddress
dataclass
A physical address for a contact.
Attributes:
Name | Type | Description |
---|---|---|
format |
Optional[str]
|
The format of the address. |
street_address |
Optional[str]
|
The street address of the contact. |
city |
Optional[str]
|
The city of the contact. |
postal_code |
Optional[str]
|
The postal code of the contact. |
state |
Optional[str]
|
The state of the contact. |
country |
Optional[str]
|
The country of the contact. |
type |
Optional[str]
|
The type of address. |
Source code in nylas/models/contacts.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
SourceType
Bases: str
, Enum
Enum representing the different types of sources for a contact.
Source code in nylas/models/contacts.py
11 12 13 14 15 16 |
|
WebPage
dataclass
A web page for a contact.
Attributes:
Name | Type | Description |
---|---|---|
url |
Optional[str]
|
The URL of the web page. |
type |
Optional[str]
|
The type of web page. |
Source code in nylas/models/contacts.py
59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
WriteableContactEmail
Bases: TypedDict
An email address for a contact.
Attributes:
Name | Type | Description |
---|---|---|
email |
NotRequired[str]
|
The email address. |
type |
NotRequired[str]
|
The type of email address. |
Source code in nylas/models/contacts.py
225 226 227 228 229 230 231 232 233 234 235 |
|
WriteableContactGroupId
Bases: TypedDict
A contact group ID for a contact.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
The contact group ID. |
Source code in nylas/models/contacts.py
238 239 240 241 242 243 244 245 246 |
|
WriteableInstantMessagingAddress
Bases: TypedDict
An instant messaging address for a contact.
Attributes:
Name | Type | Description |
---|---|---|
im_address |
NotRequired[str]
|
The instant messaging address. |
type |
NotRequired[str]
|
The type of instant messaging address. |
Source code in nylas/models/contacts.py
249 250 251 252 253 254 255 256 257 258 259 |
|
WriteablePhoneNumber
Bases: TypedDict
A phone number for a contact.
Attributes:
Name | Type | Description |
---|---|---|
number |
NotRequired[str]
|
The phone number. |
type |
NotRequired[str]
|
The type of phone number. |
Source code in nylas/models/contacts.py
176 177 178 179 180 181 182 183 184 185 186 |
|
WriteablePhysicalAddress
Bases: TypedDict
A physical address for a contact.
Attributes:
Name | Type | Description |
---|---|---|
format |
NotRequired[str]
|
The format of the address. |
street_address |
NotRequired[str]
|
The street address of the contact. |
city |
NotRequired[str]
|
The city of the contact. |
postal_code |
NotRequired[str]
|
The postal code of the contact. |
state |
NotRequired[str]
|
The state of the contact. |
country |
NotRequired[str]
|
The country of the contact. |
type |
NotRequired[str]
|
The type of address. |
Source code in nylas/models/contacts.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
|
WriteableWebPage
Bases: TypedDict
A web page for a contact.
Attributes:
Name | Type | Description |
---|---|---|
url |
NotRequired[str]
|
The URL of the web page. |
type |
NotRequired[str]
|
The type of web page. |
Source code in nylas/models/contacts.py
212 213 214 215 216 217 218 219 220 221 222 |
|