API reference
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_keyApiKeyInfoemailstringuser_idstring
Balance
GET /api/v1/balance
Minutes left, and whether auto-reload is on. Needs the read scope.
Reply 200: Balance
auto_reload_enabledbooleanminute_poolintegerBought minutes left (the account's pool).user_idstring
API keys
GET /api/v1/api-keys
The account's API keys, without their secrets. Needs the read scope.
Reply 200: ApiKeys
api_keysarray 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_idquery, string or nullOnly this key's activity.cursorquery, string or nulllimitquery, integer or null
Reply 200: Activity
entriesarray of ActivityEntrynext_cursorstring 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_idpath, string, required
Reply 200: ApiKeyRevoked
api_key_idstringdry_runboolean, may be absentokbooleanrevoked_this_keybooleanThe 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_namestring, 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_codestringSecret: only the program polling should have it.expires_inintegerSeconds until the codes stop working.intervalintegerSeconds to wait between polls.user_codestringFor the person to type, e.g. `"BKTW-QHZM"`.verification_uristringverification_uri_completestringThe 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_codestring, required
Reply 200: DeviceKey
api_keystringThe secret, for `Authorization: Bearer`.keyApiKeyInfo
Webhooks
GET /api/v1/webhooks
The account's webhooks and how each last delivered, without their secrets. Needs the read scope.
Reply 200: Webhooks
webhooksarray 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
eventsarray of string, requiredSome of [`WEBHOOK_EVENTS`].urlstring, required
Reply 201: WebhookCreated
dry_runboolean, may be absentokbooleansecretstring or null, may be absentwebhookWebhook
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_idpath, string, required
Reply 200: WebhookTestQueued
dry_runboolean, may be absentA dry run checks the webhook exists and queues nothing.okbooleanwebhook_idstring
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_idpath, string, required
Reply 200: WebhookSecretRotated
dry_runboolean, may be absentokbooleanprevious_secret_expires_atdate-time or null, may be absentsecretstring or null, may be absentwebhook_idstring
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_idpath, string, required
Reply 200: WebhookRemoved
dry_runboolean, may be absentokbooleanwebhook_idstring
Sessions
GET /api/v1/sessions
Where the account is signed in. Needs the read scope.
Reply 200: Sessions
sessionsarray 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
allbooleansessionstring or null
Reply 200: SessionsRevoked
dry_runboolean, may be absentokbooleanrevokedinteger
Phone numbers
GET /api/v1/available-numbers
Search the RingHuddle numbers available to buy, by area code or digits. Needs the read scope.
Parameters
area_codequery, string, requiredcontainsquery, string or null
Reply 200: AvailableNumbers
area_codestringnumbersarray of AvailableNumbersuggested_area_codesarray of SuggestedAreaCode, may be absentNearby or overlay area codes with available numbers right now, populated when `numbers` is empty for an area-code search.
Ring groups
GET /api/v1/ring-groups
List the account's ring groups. Needs the read scope.
Reply 200: RingGroupList
ring_groupsarray 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_idpath, string, required
Reply 200: RingGroup
dslstringThe call flow as text (see [`CallFlowText`]).first_call_atdate-time or null, may be absentWhen the number first took a call. `None` for a new number that carriers may not route yet.forward_numbersarray of ForwardNumberidstringis_activebooleannamestringphone_numberstringshow_caller_numberboolean, 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.stepsarray 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.timezonestringvoicemail_guardbooleanwarningsarray 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
namestring, requiredphone_numberstring, required
Reply 200: CheckoutStarted
checkout_urlstring or null, may be absentdry_runboolean, may be absentokbooleanring_group_idstring
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_idpath, string, required
Body: UpdateRingGroup
is_activeboolean or nullFalse pauses the ring group: callers are turned away until it's resumed.namestring or nullshow_caller_numberboolean or nullShow the caller's number on forwarded calls instead of the group's.timezonestring or nullAn IANA zone, e.g. `America/Los_Angeles`.voicemail_guardboolean or null
Reply 200: Updated
dry_runboolean, may be absentokbooleanring_group_idstring
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_idpath, string, required
Reply 200: DeleteConfirmation
confirm_urlstringdry_runboolean, may be absentnumber_held_daysinteger, may be absentHow long a deleted group's number is held, answering no calls, before it is released for good.okbooleanring_group_idstringwarningstring, 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_idpath, string, required
Reply 200: CallFlowNow
nextstring"From today 17:00: rings Bob.", or that nothing scheduled changes it.next_atdate-time or null, may be absentWhen that next changes; `null` when nothing on the schedule does.nowstring"Now: rings Alice and Bob, then the keypad (codes that work: Master)."ring_group_idstringtimezonestringThe 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_idpath, string, required
Reply 200: CallFlowText
dslstringring_group_idstring
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_idpath, string, required
Body: ApplyCallFlow
dslstring, required
Reply 200: CallFlowApplied
dry_runboolean, may be absentdslstringThe flow as stored, in canonical form.okbooleanring_group_idstringtotal_numbersinteger
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_idpath, string, requiredsteppath, string, required
Body: MoveStep
directionDirection, required
Reply 200: StepMoved
dry_runboolean, may be absentmovedbooleanFalse when it was already first (or last).okbooleanring_group_idstringstepintegerThe 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_idpath, string, requiredsteppath, string, required
Body: UpdateStep
modeStepDialMode | 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_secondsinteger 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_runboolean, may be absentmodeStepDialModeokbooleanring_group_idstringstepintegertimeout_secondsinteger
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_idpath, string, required
Body: AddForwardNumber
labelstring or nullnew_stepbooleanMake 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_numberstring, requiredAny common format; stored as E.164.tierinteger or nullThe call-flow step it rings in; 1 when absent.
Reply 201: ForwardNumberChanged
dry_runboolean, may be absentforward_numberForwardNumberokbooleanring_group_idstring
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_idpath, string, requirednumber_idpath, string, required
Body: UpdateForwardNumber
labelstring or nullnew_stepbooleanMake 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_numberstring or nullscheduleSchedule | nulltierinteger or null
Reply 200: ForwardNumberChanged
dry_runboolean, may be absentforward_numberForwardNumberokbooleanring_group_idstring
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_idpath, string, requirednumber_idpath, string, required
Reply 200: Removed
dry_runboolean, may be absentforward_number_idstringokbooleanring_group_idstring
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_idpath, string, requirednumber_idpath, string, required
Body: MoveForwardNumber
directionDirection, required
Reply 200: Moved
dry_runboolean, may be absentforward_number_idstringmovedbooleanFalse when the number was already first (or last) in its step.okbooleanring_group_idstring
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_idpath, string, required
Body: Snooze
durationstring, requiredOne of [`SNOOZE_DURATIONS`] or [`SNOOZE_ENDS`].forward_number_idstring or nullThe number to snooze; absent (or `"group"`) snoozes the whole group.
Reply 200: Snoozed
dry_runboolean, may be absentforward_number_idstring or null, may be absentSet when one number was snoozed rather than the group.okbooleanring_group_idstringsnoozed_untildate-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_idpath, string, required
Reply 200: AccessCodes
codesarray of AccessCodering_group_idstring
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_idpath, string, required
Body: CreateAccessCode
expires_atdate-time or nullStops working at this time.labelstring or nullWho or what the code is for, without commas. Absent: "Access code".max_usesinteger or nullStops working after this many entries.new_stepbooleanMake 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.pinstring or null4 to 8 digits, not already a code of this ring group. Absent: the server picks 6 random digits.scheduleSchedule | nullWhen in the week it works, as a phone's hours. Absent: always.stepinteger or nullThe keypad step (1 to 10) the code opens the gate at. Required.
Reply 201: AccessCodeCreated
codeAccessCodedry_runboolean, may be absentokbooleanpinstringThe PIN, shown this once.ring_group_idstring
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_idpath, string, requiredcode_idpath, string, required
Body: CreateAccessCode
expires_atdate-time or nullStops working at this time.labelstring or nullWho or what the code is for, without commas. Absent: "Access code".max_usesinteger or nullStops working after this many entries.new_stepbooleanMake 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.pinstring or null4 to 8 digits, not already a code of this ring group. Absent: the server picks 6 random digits.scheduleSchedule | nullWhen in the week it works, as a phone's hours. Absent: always.stepinteger or nullThe keypad step (1 to 10) the code opens the gate at. Required.
Reply 200: AccessCodeChanged
codeAccessCodedry_runboolean, may be absentokbooleanring_group_idstring
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_idpath, string, requiredcode_idpath, string, required
Reply 200: AccessCodeRemoved
access_code_idstringdry_runboolean, may be absentokbooleanring_group_idstring
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_idpath, string, requiredbeforequery, date-time or null`next_before` from the previous page.limitquery, integer or null
Reply 200: EntryLog
entriesarray of Entrylocked_out_secondsinteger or null, may be absentSeconds until the keypad takes codes again, after too many wrong ones.next_beforedate-time or null, may be absentPass as `before` for the next page; absent on the last one.ring_group_idstring
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_idpath, string, required
Reply 200: Calendars
calendarsarray of Calendareventsarray of CalendarEventmore_eventsintegerEvents of the next 7 days past the 30 listed.ring_group_idstring
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_idpath, string, required
Body: PreviewCalendar
check_instring or nullAn Airbnb calendar's check-in time, `HH:MM` in the group's timezone; absent: 15:00.check_outstring or nullAn Airbnb calendar's check-out time, `HH:MM`; absent: 11:00.kindCalendarKind | nullHow to read it; absent: `ical`.urlstring, requiredThe calendar's iCal address (`https://` or `webcal://`).
Reply 200: CalendarPreview
calendar_namestring or null, may be absentThe calendar's own name, if it gives one.event_countintegerIts events from now to 90 days ahead.eventsarray of CalendarEventThe first 10 of them.hoststringThe address's host: all of the address a reply carries.kindCalendarKind, may be absentHow it was read.left_outarray of stringEvents it would leave out, and why (English, for people).markedintegerHow many of those have a `ringhuddle:` line; for an Airbnb calendar, how many are stays with a guest code.more_eventsintegerThose past the first 10.no_detailsbooleanIt has events but none has a description: the service is likely sending only busy times, so no `ringhuddle:` line can be read.ring_group_idstring
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_idpath, string, required
Body: AddCalendar
check_instring or nullAn Airbnb calendar's check-in time, `HH:MM` in the group's timezone; absent: 15:00.check_outstring or nullAn Airbnb calendar's check-out time, `HH:MM`; absent: 11:00.kindCalendarKind | nullHow to read it; absent: `ical`.namestring or nullWhat to call it. Absent or blank: the calendar's own name, else "Calendar".urlstring, requiredThe calendar's iCal address (`https://` or `webcal://`): its secret address, for a calendar that isn't public.
Reply 201: CalendarAdded
calendarCalendardry_runboolean, may be absenteventsintegerOccurrences from a day ago to 90 days ahead.okbooleanring_group_idstring
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_idpath, string, requiredcalendar_idpath, string, required
Reply 200: CalendarSynced
calendar_idstringdry_runboolean, may be absenteventsintegerOccurrences from a day ago to 90 days ahead.left_outintegerEvents left out (`Calendar::left_out` says which).okbooleanring_group_idstring
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_idpath, string, requiredcalendar_idpath, string, required
Body: UpdateCalendar
check_instring or null`HH:MM`, in the group's timezone; absent: as it is.check_outstring or null`HH:MM`, in the group's timezone; absent: as it is.
Reply 200: CalendarUpdated
calendarCalendardry_runboolean, may be absenteventsintegerOccurrences from a day ago to 90 days ahead.okbooleanring_group_idstring
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_idpath, string, requiredcalendar_idpath, string, required
Reply 200: CalendarRemoved
calendar_idstringdry_runboolean, may be absentokbooleanring_group_idstring
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_urlstring or null, may be absentAbsent on a dry run.dry_runboolean, may be absentminutesintegerokbooleanprice_centsinteger
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
enabledboolean, required
Reply 200: AutoReload
below_minutesintegerdry_runboolean, may be absentenabledbooleanhas_cardbooleanWithout a saved card nothing can be reloaded; `rh card` adds one.okbooleanpack_minutesintegerpack_price_centsinteger
Card
POST /api/v1/card
Add or change the card on file (opens Stripe). Needs the write scope.
Reply 200: CardLink
card_urlstringokboolean
Calls
GET /api/v1/calls
Calls the ring groups took, and which phone answered. Needs the read scope.
Parameters
cursorquery, string or nulllimitquery, integer or nullring_group_idquery, string or null
Reply 200: Calls
callsarray of Callnext_cursorstring or null, may be absentAbsent on the last page.
Ledger
GET /api/v1/ledger
Charges, refunds and minute changes. Needs the read scope.
Parameters
cursorquery, string or nulllimitquery, integer or null
Reply 200: Ledger
entriesarray of LedgerEntrynext_cursorstring or null, may be absent