API reference

Version 0.14.0. Generated from the server's code, so it matches what's running.

Every operation under https://ringhuddle.com/api/v1. The same, machine-readable: OpenAPI 3.1. For keys, dry runs, retries and errors, see conventions.

Account

GET /api/v1/me

Who the account is. Needs the read scope.

Reply 200: Me

  • api_key ApiKeyInfo
  • email string
  • user_id string

Balance

GET /api/v1/balance

Minutes left, and whether auto-reload is on. Needs the read scope.

Reply 200: Balance

  • auto_reload_enabled boolean
  • minute_pool integerBought minutes left (the account's pool).
  • user_id string

API keys

GET /api/v1/api-keys

The account's API keys, without their secrets. Needs the read scope.

Reply 200: ApiKeys

  • api_keys array of ApiKey

GET /api/v1/activity

What the account's API keys changed in the last 90 days. Needs the read scope.

Parameters

  • api_key_id query, string or nullOnly this key's activity.
  • cursor query, string or null
  • limit query, integer or null

Reply 200: Activity

  • entries array of ActivityEntry
  • next_cursor string or null, may be absentPass as `cursor` for the next page; absent on the last one.

DELETE /api/v1/api-keys/{api_key_id}

Revoke an API key. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Can't be undone.

Parameters

  • api_key_id path, string, required

Reply 200: ApiKeyRevoked

  • api_key_id string
  • dry_run boolean, may be absent
  • ok boolean
  • revoked_this_key booleanThe request revoked its own key; the next one needs another.

Device-code login

POST /api/v1/device-logins

Ask for an API key with a code the person approves on the site (RFC 8628); no key needed. Takes no API key.

Body: StartDeviceLogin

  • client_name string, requiredWhat the program calls itself, shown to the person approving, e.g. `"rh on laptop"`. Becomes the key's name unless they change it.

Reply 200: DeviceLogin

  • device_code stringSecret: only the program polling should have it.
  • expires_in integerSeconds until the codes stop working.
  • interval integerSeconds to wait between polls.
  • user_code stringFor the person to type, e.g. `"BKTW-QHZM"`.
  • verification_uri string
  • verification_uri_complete stringThe same page with the code filled in.

POST /api/v1/device-logins/token

Collect the API key once its code is approved; poll until then. No key needed. Takes no API key.

Body: FinishDeviceLogin

  • device_code string, required

Reply 200: DeviceKey

  • api_key stringThe secret, for `Authorization: Bearer`.
  • key ApiKeyInfo

Webhooks

GET /api/v1/webhooks

The account's webhooks and how each last delivered, without their secrets. Needs the read scope.

Reply 200: Webhooks

  • webhooks array of Webhook

POST /api/v1/webhooks

Send events (a call ended, minutes running low) to an HTTPS address, signed with a secret shown once. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Not safe to repeat on its own: send an Idempotency-Key to retry.

Body: CreateWebhook

  • events array of string, requiredSome of [`WEBHOOK_EVENTS`].
  • url string, required

Reply 201: WebhookCreated

  • dry_run boolean, may be absent
  • ok boolean
  • secret string or null, may be absent
  • webhook Webhook

POST /api/v1/webhooks/{webhook_id}/test

Send a webhook a ping, to check it's reachable and checks signatures. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • webhook_id path, string, required

Reply 200: WebhookTestQueued

  • dry_run boolean, may be absentA dry run checks the webhook exists and queues nothing.
  • ok boolean
  • webhook_id string

POST /api/v1/webhooks/{webhook_id}/rotate-secret

Give a webhook a new signing secret, shown once; the old one also signs for 24 hours. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Not safe to repeat on its own: send an Idempotency-Key to retry.

Parameters

  • webhook_id path, string, required

Reply 200: WebhookSecretRotated

  • dry_run boolean, may be absent
  • ok boolean
  • previous_secret_expires_at date-time or null, may be absent
  • secret string or null, may be absent
  • webhook_id string

DELETE /api/v1/webhooks/{webhook_id}

Remove a webhook, and what was waiting to be sent to it. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Can't be undone.

Parameters

  • webhook_id path, string, required

Reply 200: WebhookRemoved

  • dry_run boolean, may be absent
  • ok boolean
  • webhook_id string

Sessions

GET /api/v1/sessions

Where the account is signed in. Needs the read scope.

Reply 200: Sessions

  • sessions array of Session

POST /api/v1/sessions/revoke

Sign out one device, or every device but this one. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Can't be undone.

Body: RevokeSessions

  • all boolean
  • session string or null

Reply 200: SessionsRevoked

  • dry_run boolean, may be absent
  • ok boolean
  • revoked integer

Phone numbers

Ring groups

GET /api/v1/ring-groups

List the account's ring groups. Needs the read scope.

Reply 200: RingGroupList

  • ring_groups array of RingGroupSummary

GET /api/v1/ring-groups/{ring_group_id}

One ring group's settings and numbers, and warnings such as a phone that keeps sending calls to voicemail. Needs the read scope.

Parameters

  • ring_group_id path, string, required

Reply 200: RingGroup

  • dsl stringThe call flow as text (see [`CallFlowText`]).
  • first_call_at date-time or null, may be absentWhen the number first took a call. `None` for a new number that carriers may not route yet.
  • forward_numbers array of ForwardNumber
  • id string
  • is_active boolean
  • name string
  • phone_number string
  • show_caller_number boolean, may be absentForwarded calls show the caller's number instead of the group's; a withheld or malformed caller number still shows the group's.
  • steps array of Step, may be absentThe call flow's steps, in the order a call goes through them, each with its own dialing mode and ring time. A number's `tier` is the step it rings in.
  • timezone string
  • voicemail_guard boolean
  • warnings array of RingGroupWarning, may be absentThings about the group worth telling its owner, such as a phone that keeps sending calls to voicemail. Empty when there is nothing to say.

POST /api/v1/ring-groups

Buy a RingHuddle number and start a ring group on it (yearly subscription). Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Never charges a card: answers with a Stripe Checkout page for a person to pay on.

Body: CreateRingGroup

  • name string, required
  • phone_number string, required

Reply 200: CheckoutStarted

  • checkout_url string or null, may be absent
  • dry_run boolean, may be absent
  • ok boolean
  • ring_group_id string

PATCH /api/v1/ring-groups/{ring_group_id}

Change a ring group's name, the most phones one call rings, voicemail guard, whose number forwarded calls show, or timezone, or pause or resume it. How the phones ring (all at once or one after another) and for how long are settings of each call-flow step: use call_flow_update_step. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required

Body: UpdateRingGroup

  • is_active boolean or nullFalse pauses the ring group: callers are turned away until it's resumed.
  • name string or null
  • show_caller_number boolean or nullShow the caller's number on forwarded calls instead of the group's.
  • timezone string or nullAn IANA zone, e.g. `America/Los_Angeles`.
  • voicemail_guard boolean or null

Reply 200: Updated

  • dry_run boolean, may be absent
  • ok boolean
  • ring_group_id string

DELETE /api/v1/ring-groups/{ring_group_id}

Delete a ring group. Take its number out of any call box or call forwarding first: once deleted, the number answers no calls for 30 days, then is released for good. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Can't be undone.

Parameters

  • ring_group_id path, string, required

Reply 200: DeleteConfirmation

  • confirm_url string
  • dry_run boolean, may be absent
  • number_held_days integer, may be absentHow long a deleted group's number is held, answering no calls, before it is released for good.
  • ok boolean
  • ring_group_id string
  • warning string, may be absentWhat deleting does to the number, to show before confirming.

Call flow

GET /api/v1/ring-groups/{ring_group_id}/now

What a call to a ring group does right now, and when that next changes (its phones' hours, snoozes and gate codes). Needs the read scope.

Parameters

  • ring_group_id path, string, required

Reply 200: CallFlowNow

  • next string"From today 17:00: rings Bob.", or that nothing scheduled changes it.
  • next_at date-time or null, may be absentWhen that next changes; `null` when nothing on the schedule does.
  • now string"Now: rings Alice and Bob, then the keypad (codes that work: Master)."
  • ring_group_id string
  • timezone stringThe timezone the times are in: the group's.

GET /api/v1/ring-groups/{ring_group_id}/dsl

A ring group's whole call flow as text: each step with its dialing mode, ring time and phones (or gate codes). Needs the read scope.

Parameters

  • ring_group_id path, string, required

Reply 200: CallFlowText

  • dsl string
  • ring_group_id string

PUT /api/v1/ring-groups/{ring_group_id}/dsl

Replace a ring group's whole call flow (steps, their settings and phones) with call-flow text. For one change, prefer the tool for it: call_flow_update_step for a step's dialing mode or ring time, the forward_number tools for a phone. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required

Body: ApplyCallFlow

  • dsl string, required

Reply 200: CallFlowApplied

  • dry_run boolean, may be absent
  • dsl stringThe flow as stored, in canonical form.
  • ok boolean
  • ring_group_id string
  • total_numbers integer

POST /api/v1/ring-groups/{ring_group_id}/steps/{step}/move

Move a whole step of the call flow up or down; the steps are numbered again. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Not safe to repeat on its own: send an Idempotency-Key to retry.

Parameters

  • ring_group_id path, string, required
  • step path, string, required

Body: MoveStep

  • direction Direction, required

Reply 200: StepMoved

  • dry_run boolean, may be absent
  • moved booleanFalse when it was already first (or last).
  • ok boolean
  • ring_group_id string
  • step integerThe step's number before the move.

PATCH /api/v1/ring-groups/{ring_group_id}/steps/{step}

Change how one step of the call flow rings: its dialing mode (simultaneous: all its phones at once; sequential: one after another; conference) and how many seconds it rings before the call goes to the next step. To ring a step's phones one after another, set its mode to sequential; don't move them into separate steps. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required
  • step path, string, required

Body: UpdateStep

  • mode StepDialMode | null`simultaneous` (all the step's phones at once), `sequential` (one after another, in their order) or `conference`. Not `keypad`: a step is a keypad because it has gate codes.
  • timeout_seconds integer or nullSeconds the step rings before the next step, 5 to 120 (in a `sequential` step, seconds each phone rings); for a keypad step, seconds it waits for a code.

Reply 200: StepUpdated

  • dry_run boolean, may be absent
  • mode StepDialMode
  • ok boolean
  • ring_group_id string
  • step integer
  • timeout_seconds integer

Forwarding numbers

POST /api/v1/ring-groups/{ring_group_id}/numbers

Add a phone to a ring group. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Not safe to repeat on its own: send an Idempotency-Key to retry.

Parameters

  • ring_group_id path, string, required

Body: AddForwardNumber

  • label string or null
  • new_step booleanMake a new step at `tier` for it: the step there and the ones after it move down one. Absent: false, it joins the step there.
  • phone_number string, requiredAny common format; stored as E.164.
  • tier integer or nullThe call-flow step it rings in; 1 when absent.

Reply 201: ForwardNumberChanged

  • dry_run boolean, may be absent
  • forward_number ForwardNumber
  • ok boolean
  • ring_group_id string

PATCH /api/v1/ring-groups/{ring_group_id}/numbers/{number_id}

Change a forwarding number's phone number, label, step or the hours it rings. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required
  • number_id path, string, required

Body: UpdateForwardNumber

  • label string or null
  • new_step booleanMake a new step at `tier` for it: the step there and the ones after it move down one. Absent: false, it joins the step there.
  • phone_number string or null
  • schedule Schedule | null
  • tier integer or null

Reply 200: ForwardNumberChanged

  • dry_run boolean, may be absent
  • forward_number ForwardNumber
  • ok boolean
  • ring_group_id string

DELETE /api/v1/ring-groups/{ring_group_id}/numbers/{number_id}

Remove a phone from a ring group. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Can't be undone.

Parameters

  • ring_group_id path, string, required
  • number_id path, string, required

Reply 200: Removed

  • dry_run boolean, may be absent
  • forward_number_id string
  • ok boolean
  • ring_group_id string

POST /api/v1/ring-groups/{ring_group_id}/numbers/{number_id}/move

Move a phone up or down the ring order within its step. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Not safe to repeat on its own: send an Idempotency-Key to retry.

Parameters

  • ring_group_id path, string, required
  • number_id path, string, required

Body: MoveForwardNumber

  • direction Direction, required

Reply 200: Moved

  • dry_run boolean, may be absent
  • forward_number_id string
  • moved booleanFalse when the number was already first (or last) in its step.
  • ok boolean
  • ring_group_id string

Snooze

POST /api/v1/ring-groups/{ring_group_id}/snooze

Stop one phone, or the whole ring group, ringing for a while. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required

Body: Snooze

  • duration string, requiredOne of [`SNOOZE_DURATIONS`] or [`SNOOZE_ENDS`].
  • forward_number_id string or nullThe number to snooze; absent (or `"group"`) snoozes the whole group.

Reply 200: Snoozed

  • dry_run boolean, may be absent
  • forward_number_id string or null, may be absentSet when one number was snoozed rather than the group.
  • ok boolean
  • ring_group_id string
  • snoozed_until date-time or null, may be absent`None` when the snooze was ended.

Gate codes

GET /api/v1/ring-groups/{ring_group_id}/access-codes

A ring group's gate codes, each with its keypad step, and whether each works now (no PINs). Needs the read scope.

Parameters

  • ring_group_id path, string, required

Reply 200: AccessCodes

  • codes array of AccessCode
  • ring_group_id string

POST /api/v1/ring-groups/{ring_group_id}/access-codes

Add a code to a keypad step: a step with codes, or a new one. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Not safe to repeat on its own: send an Idempotency-Key to retry.

Parameters

  • ring_group_id path, string, required

Body: CreateAccessCode

  • expires_at date-time or nullStops working at this time.
  • label string or nullWho or what the code is for, without commas. Absent: "Access code".
  • max_uses integer or nullStops working after this many entries.
  • new_step booleanMake a new step at `step` for it: the step there and the ones after it move down one. Absent: false, it joins the step there.
  • pin string or null4 to 8 digits, not already a code of this ring group. Absent: the server picks 6 random digits.
  • schedule Schedule | nullWhen in the week it works, as a phone's hours. Absent: always.
  • step integer or nullThe keypad step (1 to 10) the code opens the gate at. Required.

Reply 201: AccessCodeCreated

  • code AccessCode
  • dry_run boolean, may be absent
  • ok boolean
  • pin stringThe PIN, shown this once.
  • ring_group_id string

PUT /api/v1/ring-groups/{ring_group_id}/access-codes/{code_id}

Change a gate code: its name, PIN, step (or a new step), expiry, use limit or hours. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required
  • code_id path, string, required

Body: CreateAccessCode

  • expires_at date-time or nullStops working at this time.
  • label string or nullWho or what the code is for, without commas. Absent: "Access code".
  • max_uses integer or nullStops working after this many entries.
  • new_step booleanMake a new step at `step` for it: the step there and the ones after it move down one. Absent: false, it joins the step there.
  • pin string or null4 to 8 digits, not already a code of this ring group. Absent: the server picks 6 random digits.
  • schedule Schedule | nullWhen in the week it works, as a phone's hours. Absent: always.
  • step integer or nullThe keypad step (1 to 10) the code opens the gate at. Required.

Reply 200: AccessCodeChanged

  • code AccessCode
  • dry_run boolean, may be absent
  • ok boolean
  • ring_group_id string

DELETE /api/v1/ring-groups/{ring_group_id}/access-codes/{code_id}

Remove a gate code. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Can't be undone.

Parameters

  • ring_group_id path, string, required
  • code_id path, string, required

Reply 200: AccessCodeRemoved

  • access_code_id string
  • dry_run boolean, may be absent
  • ok boolean
  • ring_group_id string

GET /api/v1/ring-groups/{ring_group_id}/access-codes/log

When the keypad was used, and with which code. Needs the read scope.

Parameters

  • ring_group_id path, string, required
  • before query, date-time or null`next_before` from the previous page.
  • limit query, integer or null

Reply 200: EntryLog

  • entries array of Entry
  • locked_out_seconds integer or null, may be absentSeconds until the keypad takes codes again, after too many wrong ones.
  • next_before date-time or null, may be absentPass as `before` for the next page; absent on the last one.
  • ring_group_id string

Calendars

GET /api/v1/ring-groups/{ring_group_id}/calendars

A ring group's calendar feeds (never their addresses), and how a call reads the events of the next 7 days. Needs the read scope.

Parameters

  • ring_group_id path, string, required

Reply 200: Calendars

  • calendars array of Calendar
  • events array of CalendarEvent
  • more_events integerEvents of the next 7 days past the 30 listed.
  • ring_group_id string

POST /api/v1/ring-groups/{ring_group_id}/calendars/preview

Fetch a calendar's iCal address and show how a call would read its events, storing nothing. Needs the read scope.

Parameters

  • ring_group_id path, string, required

Body: PreviewCalendar

  • check_in string or nullAn Airbnb calendar's check-in time, `HH:MM` in the group's timezone; absent: 15:00.
  • check_out string or nullAn Airbnb calendar's check-out time, `HH:MM`; absent: 11:00.
  • kind CalendarKind | nullHow to read it; absent: `ical`.
  • url string, requiredThe calendar's iCal address (`https://` or `webcal://`).

Reply 200: CalendarPreview

  • calendar_name string or null, may be absentThe calendar's own name, if it gives one.
  • event_count integerIts events from now to 90 days ahead.
  • events array of CalendarEventThe first 10 of them.
  • host stringThe address's host: all of the address a reply carries.
  • kind CalendarKind, may be absentHow it was read.
  • left_out array of stringEvents it would leave out, and why (English, for people).
  • marked integerHow many of those have a `ringhuddle:` line; for an Airbnb calendar, how many are stays with a guest code.
  • more_events integerThose past the first 10.
  • no_details booleanIt has events but none has a description: the service is likely sending only busy times, so no `ringhuddle:` line can be read.
  • ring_group_id string

POST /api/v1/ring-groups/{ring_group_id}/calendars

Add a calendar feed (its iCal address) to a ring group with its events; an address that gives no calendar is refused. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Not safe to repeat on its own: send an Idempotency-Key to retry.

Parameters

  • ring_group_id path, string, required

Body: AddCalendar

  • check_in string or nullAn Airbnb calendar's check-in time, `HH:MM` in the group's timezone; absent: 15:00.
  • check_out string or nullAn Airbnb calendar's check-out time, `HH:MM`; absent: 11:00.
  • kind CalendarKind | nullHow to read it; absent: `ical`.
  • name string or nullWhat to call it. Absent or blank: the calendar's own name, else "Calendar".
  • url string, requiredThe calendar's iCal address (`https://` or `webcal://`): its secret address, for a calendar that isn't public.

Reply 201: CalendarAdded

  • calendar Calendar
  • dry_run boolean, may be absent
  • events integerOccurrences from a day ago to 90 days ahead.
  • ok boolean
  • ring_group_id string

POST /api/v1/ring-groups/{ring_group_id}/calendars/{calendar_id}/sync

Sync a ring group's calendar feed now. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required
  • calendar_id path, string, required

Reply 200: CalendarSynced

  • calendar_id string
  • dry_run boolean, may be absent
  • events integerOccurrences from a day ago to 90 days ahead.
  • left_out integerEvents left out (`Calendar::left_out` says which).
  • ok boolean
  • ring_group_id string

PUT /api/v1/ring-groups/{ring_group_id}/calendars/{calendar_id}

Set an Airbnb calendar's check-in and check-out times, which bound its guests' gate codes. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Parameters

  • ring_group_id path, string, required
  • calendar_id path, string, required

Body: UpdateCalendar

  • check_in string or null`HH:MM`, in the group's timezone; absent: as it is.
  • check_out string or null`HH:MM`, in the group's timezone; absent: as it is.

Reply 200: CalendarUpdated

  • calendar Calendar
  • dry_run boolean, may be absent
  • events integerOccurrences from a day ago to 90 days ahead.
  • ok boolean
  • ring_group_id string

DELETE /api/v1/ring-groups/{ring_group_id}/calendars/{calendar_id}

Remove a calendar feed and its events. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Can't be undone.

Parameters

  • ring_group_id path, string, required
  • calendar_id path, string, required

Reply 200: CalendarRemoved

  • calendar_id string
  • dry_run boolean, may be absent
  • ok boolean
  • ring_group_id string

Minutes

POST /api/v1/minute-packs

Buy a pack of minutes. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.
  • Never charges a card: answers with a Stripe Checkout page for a person to pay on.

Reply 200: MinutePackCheckout

  • checkout_url string or null, may be absentAbsent on a dry run.
  • dry_run boolean, may be absent
  • minutes integer
  • ok boolean
  • price_cents integer

Auto-reload

PUT /api/v1/auto-reload

Turn buying more minutes automatically on or off (one setting for the account). Only a person on the site can turn it on. Needs the write scope.

  • Takes ?dry_run=true: checked as if for real, nothing saved.

Body: SetAutoReload

  • enabled boolean, required

Reply 200: AutoReload

  • below_minutes integer
  • dry_run boolean, may be absent
  • enabled boolean
  • has_card booleanWithout a saved card nothing can be reloaded; `rh card` adds one.
  • ok boolean
  • pack_minutes integer
  • pack_price_cents integer

Card

POST /api/v1/card

Add or change the card on file (opens Stripe). Needs the write scope.

Reply 200: CardLink

  • card_url string
  • ok boolean

Calls

GET /api/v1/calls

Calls the ring groups took, and which phone answered. Needs the read scope.

Parameters

  • cursor query, string or null
  • limit query, integer or null
  • ring_group_id query, string or null

Reply 200: Calls

  • calls array of Call
  • next_cursor string or null, may be absentAbsent on the last page.

Ledger

GET /api/v1/ledger

Charges, refunds and minute changes. Needs the read scope.

Parameters

  • cursor query, string or null
  • limit query, integer or null

Reply 200: Ledger

  • entries array of LedgerEntry
  • next_cursor string or null, may be absent