Skip to content

About

Elixir client library for the Calendly API v2

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ExCalendly

Elixir client library for the Calendly API v2.

Installation

Add ex_calendly to your dependencies:

def deps do
  [
    {:ex_calendly, "~> 0.1.0"}
  ]
end

Quick Start

client = ExCalendly.client("your_personal_access_token")

{:ok, me} = ExCalendly.Users.me(client)
{:ok, event_types} = ExCalendly.EventTypes.list(client, user: me["uri"]) 
{:ok, events} = ExCalendly.Events.list(client, user: me["uri"], status: "active")

Authentication

ExCalendly.Client expects a Calendly Personal Access Token and sends Bearer auth automatically.

client = ExCalendly.Client.new("your_personal_access_token")

Core API Surface

Users

ExCalendly.Users.me(client)
ExCalendly.Users.get(client, "ABCDEF")

Event Types

ExCalendly.EventTypes.list(client, user: "ABCDEF")
ExCalendly.EventTypes.get(client, "EVTYPE123")

ExCalendly.EventTypes.available_times(client, "EVTYPE123",
  start_time: "2026-03-01T00:00:00Z",
  end_time: "2026-03-08T00:00:00Z"
)

Scheduled Events

ExCalendly.Events.list(client, user: "ABCDEF", status: "active")
ExCalendly.Events.get(client, "EV123")
ExCalendly.Events.cancel(client, "EV123", reason: "Rescheduling")

Invitees

ExCalendly.Invitees.list(client, "EV123")
ExCalendly.Invitees.get(client, "https://api.calendly.com/scheduled_events/EV123/invitees/INV456")
ExCalendly.Invitees.create(client, "EV123", %{email: "person@example.com", name: "Person"})

Organizations

ExCalendly.Organizations.memberships(client, organization: "ORG123")
ExCalendly.Organizations.invitations(client, "ORG123")
ExCalendly.Organizations.invite(client, "ORG123", email: "teammate@example.com")

Scheduling Links

ExCalendly.SchedulingLinks.create(client,
  owner: "EVTYPE123",
  owner_type: "EventType",
  max_event_count: 1
)

Availability

ExCalendly.Availability.schedules(client, user: "USER123")

ExCalendly.Availability.busy_times(client,
  user: "USER123",
  start_time: "2026-03-01T00:00:00Z",
  end_time: "2026-03-08T00:00:00Z"
)

Pagination

Use ExCalendly.Pagination.all_pages/4 for cursor-based list endpoints:

ExCalendly.Pagination.all_pages(client, :get, "/scheduled_events",
  user: "https://api.calendly.com/users/ABCDEF",
  count: 100
)

Webhooks

Subscription CRUD

ExCalendly.Webhooks.list(client, organization: "ORG123", scope: "organization")

ExCalendly.Webhooks.create(client,
  url: "https://example.com/webhooks/calendly",
  events: ["invitee.created", "invitee.canceled"],
  organization: "ORG123",
  scope: "organization"
)

Payload Parsing

case ExCalendly.Webhook.parse(params) do
  {:ok, %ExCalendly.Webhook.InviteeCreated{} = event} ->
    event

  {:ok, %ExCalendly.Webhook.InviteeCanceled{} = event} ->
    event

  {:ok, %ExCalendly.Webhook.RoutingFormSubmission{} = event} ->
    event

  {:error, reason} ->
    reason
end

Signature Verification

ExCalendly.Webhook.verify_signature(raw_body, signature_header, signing_key)
# => :ok | {:error, :invalid_signature}

About

Elixir client library for the Calendly API v2

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages