One API for email, calendar, and contacts
Nylas saves engineering teams time so they can build secure and engaging communication experiences their customers love.
Nylas saves engineering teams time so they can build secure and engaging communication experiences their customers love.
Securely integrate with every email, calendar, and contacts provider using a single interface to streamline your users’ workflows. Build real-time, bi-directional communications in your app up to 40x faster, saving months of development time.
Sync, send, and receive messages to build contextual email, automated outreach, and other in-app experiences.
Explore the Email APIRetrieve and manage calendars and events to build scheduling automation, calendar management, and other scheduling experiences.
Explore the Calendar APISync and manage contact details to build contact management and other contact experiences.
Explore the Contacts APINylas APIs simplifies integration complexities, offering a unified API solution tailored for developers.
Leverage Nylas Docs, SDKs, CLI, and code samples to reduce time building and maintaining infrastructure.
Ship features faster with security, scalability, and performance with a 99.9% guaranteed uptime.
Instant email and event data as soon as your users connect, with no sync delays.
Receive real-time notifications to your application that will scale with you.
Node.js
Ruby
Python
Java
Curl
const messages = await nylas.messages.list({
identifier,
queryParams: {
limit: 5,
}
})
require 'nylas'
nylas = Nylas::Client.new(api_key: 'API_KEY')
query_params = { limit: 5 }
messages, _ = nylas.messages.list(identifier: '<GRANT_ID>', query_params: query_params)
messages.each {|message|
puts "[#{Time.at(message[:date]).strftime("%d/%m/%Y at %H:%M:%S")}] \
#{message[:subject]}"
}
messages = nylas.messages.list(
grant_id,
query_params={
"limit": 5
}
)
import com.nylas.NylasClient;
import com.nylas.models.*;
import java.text.SimpleDateFormat;
public class ReadInbox {
public static void main(String[] args) throws NylasSdkTimeoutError, NylasApiError {
NylasClient nylas = new NylasClient.Builder("<API_KEY>").build();
ListMessagesQueryParams queryParams = new
ListMessagesQueryParams.Builder().limit(5).build();
ListResponse<Message> message = nylas.messages().list("<GRANT_ID>", queryParams);
for(Message email : message.getData()) {
String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").
format(new java.util.Date((email.getDate() * 1000L)));
System.out.println("[" + date + "] | " + email.getSubject());
}
}
}
curl --request GET \
--url "https://api.us.nylas.com/v3/grants/GRANT_ID/messages?limit=5" \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <API_KEY_OR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
Node.js
Ruby
Python
Java
Curl
const events = await nylas.events.list({
identifier: 1,
queryParams: {
calendarId: 2
}
})
require 'nylas'
nylas = Nylas::Client.new(api_key: "<API_KEY>")
# Call a list of calendars
calendars, _request_ids = nylas.calendars.list(identifier: "<GRANT_ID>", query_params: {limit: 5})
calendars.each {|calendar|
puts calendar
}
events = nylas.events.list(
grant_id,
query_params={
"calendar_id": 1
}
)
import com.nylas.NylasClient;
import com.nylas.models.*;
import java.util.List;
public class read_calendars {
public static void main(String[] args) throws NylasSdkTimeoutError, NylasApiError {
NylasClient nylas = new NylasClient.Builder("<API_KEY>").build();
ListCalendersQueryParams listCalendersQueryParams = new
ListCalendersQueryParams.Builder().limit(5).build();
List<Calendar> calendars = nylas.calendars().list(dotenv.get("CALENDAR_ID"),
listCalendersQueryParams).getData();
for (Calendar calendar : calendars) {
System.out.println(calendar);
}
}
}
curl --request GET \
--url https://api.us.nylas.com/v3/grants/<GRANT_ID>/events
--header 'Accept: application/json' \
--header 'Authorization: Bearer <API_KEY_OR_ACCESS_TOKEN>' \
--header 'Content-Type: application/json'
Response
{
"request_id": "d0c951b9-61db-4daa-ab19-cd44afeeabac",
"data": [
{
"starred": false,
"unread": true,
"folders": [
"UNREAD",
"CATEGORY_PERSONAL",
"INBOX"
],
"grant_id": "1",
"date": 1706811644,
"attachments": [
{
"id": "1",
"grant_id": "1",
"filename": "invite.ics",
"size": 2504,
"content_type": "text/calendar; charset=\"UTF-8\"; method=REQUEST"
},
{
"id": "2",
"grant_id": "1",
"filename": "invite.ics",
"size": 2504,
"content_type": "application/ics; name=\"invite.ics\"",
"is_inline": false,
"content_disposition": "attachment; filename=\"invite.ics\""
}
],
"from": [
{
"name": "Nylas DevRel",
"email": "[email protected]"
}
],
"id": "1",
"object": "message",
"snippet": "Send Email with Nylas APIs",
"subject": "Learn how to Send Email with Nylas APIs",
"thread_id": "1",
"to": [
{
"name": "Nyla",
"email": "[email protected]"
}
],
"created_at": 1706811644,
"body": "Learn how to send emails using the Nylas APIs!"
}
],
"next_cursor": "123"
}
{
"type": "event.created1",
"data": {
"object": {
"busy": true,
"calendar_id": "mock-name%40nylas.com",
"created_at": 1234567890,
"description": "mock description",
"hide_participants": false,
"ical_uid": "[email protected]",
"id": "mock-data-id",
"object": "event",
"owner": "Mock Owner ",
"organizer": {
"name": "mock organizer name",
"email": "[email protected]"
},
"participants": [
{
"email": "[email protected]",
"name": "mockParticipantsA",
"status": "yes"
},
{
"email": "[email protected]",
"name": "mockParticipantsB",
"status": "noreply"
}
],
"read_only": false,
"reminders": null,
"status": "confirmed",
"title": "mock_title",
"updated_at": 1234567890,
"when": {
"start_time": 1234567890,
"start_timezone": "America/Edmonton",
"end_time": 1234567890,
"end_timezone": "America/Edmonton",
"object": "timespan"
}
}
}
}
Trusted by 250,000+ developers and growing.
Our enterprise-grade security is backed by compliance with industry-leading standards.
API transactions and 200TB of data processed daily.
historical uptime for Nylas services.
of dev resources to focus on core product functionality.
Get your API key and connect up to 5 accounts for free.