API reference
Accounts
Account management and API keys.
/v1/accounts/{id}Get account details
account:rRequires account:r.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string |
Responses
200Account with its active API keys.
Field Type Description accountrequiredobject An account, as signup and PATCH /v1/accounts/{id} return it.
idrequiredstring namerequiredstring emailrequiredstring stripe_customer_idrequiredstring - Can be null
email_verified_atrequiredstring - Format: date-time
- Can be null
statusrequiredstring - One of: PENDING_PAYMENT | ACTIVE | SUSPENDED | CLOSED
balance_centsrequiredinteger Credit balance in cents CAD.
verified_phonerequiredstring - Can be null
phone_verified_atrequiredstring - Format: date-time
- Can be null
email_undeliverablerequiredboolean True when platform email to this address is bouncing or being marked as spam.
email_undeliverable_atrequiredstring The bounce or complaint that made the address unreachable.
- Format: date-time
- Can be null
email_undeliverable_reasonrequiredstring BOUNCE or COMPLAINT.
- Can be null
terms_accepted_atrequiredstring When the owner accepted the Terms of Service and Privacy Policy.
- Format: date-time
- Can be null
terms_versionrequiredstring The Terms version (last-updated date) that was accepted.
- Can be null
created_atrequiredstring - Format: date-time
monthly_rent_centsrequiredinteger Monthly rent owed on every number not yet released (ACTIVE and SUSPENDED).
low_balancerequiredboolean True when the credit balance would not cover next month's phone-number rent.
phone_number_limitrequiredinteger Maximum phone numbers this account may hold.
phone_numbers_usedrequiredinteger Numbers currently held (ACTIVE and SUSPENDED).
email_domain_limitinteger Maximum live sending domains this account may hold. Present only while email is available.
email_domains_usedinteger Live sending domains held (every status but FAILED). Present only while email is available.
inbound_email_daily_capinteger Received emails this account may accept per rolling 24 h before further mail is stored rejected and uncharged (0 = unlimited); the account's own override, or the platform default. Present only while email is available.
inbound_email_received_24hinteger Received emails counted against the cap above, in the current rolling 24 h window. Present only while email is available.
inbound_sms_daily_caprequiredinteger Received texts this account may accept per rolling 24 h before further texts are stored uncharged and not delivered as message.received (0 = unlimited); the account's own override, or the platform default.
inbound_sms_received_24hrequiredinteger Received texts counted against the cap above, in the current rolling 24 h window.
api_keys[]requiredobject[] The account's active USER keys (dashboard session keys are not listed).
idrequiredstring keyPrefixrequiredstring Non-secret prefix for display and identification.
moderequiredstring - One of: LIVE | TEST
labelrequiredstring - Can be null
createdAtrequiredstring - Format: date-time
lastUsedAtrequiredstring - Format: date-time
- Can be null
defaultDenyrequiredboolean Present on GET /v1/accounts/me and /v1/accounts/{id}; absent from the login response.
permissionsrequiredobject Per-resource permissions. Each key is a resource name; value is a string of allowed operation letters: r=read, w=write/create, m=modify/update, d=delete. A missing key denies all access to that resource.
email_domain_idsrequiredstring[] The email domains this key may send from (ids from /v1/email-domains): null when unrestricted, [] when restricted to none (its domains were deleted). Present on GET /v1/accounts/me and /v1/accounts/{id}; absent from the login response.
- Can be null
oauth_grantrequiredboolean True when an OAuth connection holds this key: it can be revoked but not rotated (409 CONFLICT, details.reason "oauth_grant"). Present on GET /v1/accounts/me and /v1/accounts/{id}; absent from the login response.
featuresrequiredobject Platform capabilities currently available to this account.
emailrequiredboolean True when the email product is live; false while it is still gated.
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN: the id is not the calling key's account, or the key lacks the permission this operation requires.The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/accounts/ID \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}Update account name or settings
account:mname is required: an omitted or empty value is refused with 422 VALIDATION_ERROR.
Requires account:m.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string |
Request body
| Field | Type | Description |
|---|---|---|
name | string | Required.
|
Responses
200The updated account.
Field Type Description idrequiredstring namerequiredstring emailrequiredstring stripe_customer_idrequiredstring - Can be null
email_verified_atrequiredstring - Format: date-time
- Can be null
statusrequiredstring - One of: PENDING_PAYMENT | ACTIVE | SUSPENDED | CLOSED
balance_centsrequiredinteger Credit balance in cents CAD.
verified_phonerequiredstring - Can be null
phone_verified_atrequiredstring - Format: date-time
- Can be null
email_undeliverablerequiredboolean True when platform email to this address is bouncing or being marked as spam.
email_undeliverable_atrequiredstring The bounce or complaint that made the address unreachable.
- Format: date-time
- Can be null
email_undeliverable_reasonrequiredstring BOUNCE or COMPLAINT.
- Can be null
terms_accepted_atrequiredstring When the owner accepted the Terms of Service and Privacy Policy.
- Format: date-time
- Can be null
terms_versionrequiredstring The Terms version (last-updated date) that was accepted.
- Can be null
created_atrequiredstring - Format: date-time
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN: the id is not the calling key's account, or the key lacks the permission this operation requires.The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X PATCH https://api.honkio.ca/v1/accounts/ID \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Clinics"
}'/v1/accounts/meGet the account the API key belongs to
account:rReturns the same document as GET /v1/accounts/{id}, resolving the account from the API key so no id is needed.
Requires account:r.
Responses
200The account the API key belongs to.
Field Type Description accountrequiredobject An account, as signup and PATCH /v1/accounts/{id} return it.
idrequiredstring namerequiredstring emailrequiredstring stripe_customer_idrequiredstring - Can be null
email_verified_atrequiredstring - Format: date-time
- Can be null
statusrequiredstring - One of: PENDING_PAYMENT | ACTIVE | SUSPENDED | CLOSED
balance_centsrequiredinteger Credit balance in cents CAD.
verified_phonerequiredstring - Can be null
phone_verified_atrequiredstring - Format: date-time
- Can be null
email_undeliverablerequiredboolean True when platform email to this address is bouncing or being marked as spam.
email_undeliverable_atrequiredstring The bounce or complaint that made the address unreachable.
- Format: date-time
- Can be null
email_undeliverable_reasonrequiredstring BOUNCE or COMPLAINT.
- Can be null
terms_accepted_atrequiredstring When the owner accepted the Terms of Service and Privacy Policy.
- Format: date-time
- Can be null
terms_versionrequiredstring The Terms version (last-updated date) that was accepted.
- Can be null
created_atrequiredstring - Format: date-time
monthly_rent_centsrequiredinteger Monthly rent owed on every number not yet released (ACTIVE and SUSPENDED).
low_balancerequiredboolean True when the credit balance would not cover next month's phone-number rent.
phone_number_limitrequiredinteger Maximum phone numbers this account may hold.
phone_numbers_usedrequiredinteger Numbers currently held (ACTIVE and SUSPENDED).
email_domain_limitinteger Maximum live sending domains this account may hold. Present only while email is available.
email_domains_usedinteger Live sending domains held (every status but FAILED). Present only while email is available.
inbound_email_daily_capinteger Received emails this account may accept per rolling 24 h before further mail is stored rejected and uncharged (0 = unlimited); the account's own override, or the platform default. Present only while email is available.
inbound_email_received_24hinteger Received emails counted against the cap above, in the current rolling 24 h window. Present only while email is available.
inbound_sms_daily_caprequiredinteger Received texts this account may accept per rolling 24 h before further texts are stored uncharged and not delivered as message.received (0 = unlimited); the account's own override, or the platform default.
inbound_sms_received_24hrequiredinteger Received texts counted against the cap above, in the current rolling 24 h window.
api_keys[]requiredobject[] The account's active USER keys (dashboard session keys are not listed).
idrequiredstring keyPrefixrequiredstring Non-secret prefix for display and identification.
moderequiredstring - One of: LIVE | TEST
labelrequiredstring - Can be null
createdAtrequiredstring - Format: date-time
lastUsedAtrequiredstring - Format: date-time
- Can be null
defaultDenyrequiredboolean Present on GET /v1/accounts/me and /v1/accounts/{id}; absent from the login response.
permissionsrequiredobject Per-resource permissions. Each key is a resource name; value is a string of allowed operation letters: r=read, w=write/create, m=modify/update, d=delete. A missing key denies all access to that resource.
email_domain_idsrequiredstring[] The email domains this key may send from (ids from /v1/email-domains): null when unrestricted, [] when restricted to none (its domains were deleted). Present on GET /v1/accounts/me and /v1/accounts/{id}; absent from the login response.
- Can be null
oauth_grantrequiredboolean True when an OAuth connection holds this key: it can be revoked but not rotated (409 CONFLICT, details.reason "oauth_grant"). Present on GET /v1/accounts/me and /v1/accounts/{id}; absent from the login response.
featuresrequiredobject Platform capabilities currently available to this account.
emailrequiredboolean True when the email product is live; false while it is still gated.
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403The API key lacks the permission this operation requires, or the account is suspended or closed.The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/accounts/me \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/topup-allowanceTop-up allowance (balance cap and rolling 30-day cap)
account:rRequires account:r.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string |
Responses
200How much may be added now. Amounts are CAD cents.
Field Type Description max_topup_now_centsrequiredinteger The largest top-up accepted right now: the smaller of the two headrooms.
headroom_balance_centsrequiredinteger Room left under the balance cap.
headroom_30d_centsrequiredinteger Room left under the rolling 30-day cap.
max_balance_centsrequiredinteger max_30d_centsrequiredinteger balance_centsrequiredinteger topped_up_30d_centsrequiredinteger - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN: the id is not the calling key's account, or the key lacks the permission this operation requires.The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/accounts/ID/topup-allowance \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/usageGet usage summary for a billing period
account:rMessage counts, billed cost and segments for the period (defaults to the current calendar month), plus live delivery health: "delivery" { liveOutbound, delivered, failed, undelivered, pending, failureRatePct } over live outbound messages (auto-replies excluded) and "byNumber", the same figures per sending number, busiest first. A rising failureRatePct usually means wrong numbers, landlines, or a script retrying one recipient; above 10 % over your last 50 sends you are emailed and account.delivery_warning fires.
Requires account:r.
Parameters
| Parameter | Type | Description |
|---|---|---|
fromquery | string | Start date (YYYY-MM-DD)
|
toquery | string | End date (YYYY-MM-DD)
|
idrequiredpath | string |
Responses
200Usage for the period. Field names are camelCase, unlike the rest of the API.
Field Type Description totalMessagesrequiredinteger Every message in the period, inbound and test-mode included.
testMessagesrequiredinteger How many of totalMessages were test-mode simulations, billed nothing.
outboundMessagesrequiredinteger inboundMessagesrequiredinteger totalCostCentsrequiredinteger What LIVE messages cost, in CAD cents.
segmentCountrequiredinteger LIVE SMS parts billed.
deliveryrequiredobject liveOutboundrequiredinteger deliveredrequiredinteger failedrequiredinteger undeliveredrequiredinteger pendingrequiredinteger Accepted, no verdict from the carrier yet.
failureRatePctrequirednumber (failed + undelivered) / liveOutbound x 100, one decimal; 0 with no traffic.
byNumber[]requiredobject[] The same delivery figures per sending number, busiest first.
fromrequiredstring liveOutboundrequiredinteger deliveredrequiredinteger failedrequiredinteger undeliveredrequiredinteger failureRatePctrequirednumber periodrequiredobject fromrequiredstring - Format: date-time
torequiredstring Exclusive end of the period.
- Format: date-time
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN: the id is not the calling key's account, or the key lacks the permission this operation requires.The standard error body.
- 422VALIDATION_ERROR: a malformed date, or to before from.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/accounts/ID/usage \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/transactionsList balance transactions (ledger), newest first
account:rEvery non-message balance movement: Stripe top-ups/refunds/disputes, phone rent, provisioning fees, and verification upcharges, paginated newest first. Per-message SMS/email costs are NOT included here; see the messages/emails list for those.
Requires account:r.
Parameters
| Parameter | Type | Description |
|---|---|---|
limitquery | integer |
|
beforequery | string | Id of the oldest transaction already seen. Returns the next (older) page. |
idrequiredpath | string |
Responses
200Paginated balance transaction ledger
Field Type Description transactions[]object[] idstring amount_centsinteger Signed: positive = credit, negative = debit
balance_after_centsinteger reasonstring Why the balance moved: topup, refund, dispute, phone_rent, provisioning, activation, verification, and their *_refund reversals; admin_adjustment for staff changes. Per-message SMS charges do not appear here: they are on the messages themselves. One-off corrections carry their own reasons (inbound_backfill, overcharge_refund, sweep_reversal).
tax_centsinteger Top-ups only, when sales tax was charged: the GST/HST charged on top of amount_cents. amount_cents is always the credit, before tax. Absent otherwise.
charged_centsinteger Top-ups only, when sales tax was charged: what the card was charged, amount_cents plus tax_cents. Absent otherwise.
created_atstring - Format: date-time
has_moreboolean - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403The API key lacks the permission this operation requires, or the account is suspended or closed.The standard error body.
- 404NOT_FOUND: also when the id is not the calling key's account (404 rather than 403, so the ledger's existence is not confirmed).The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/accounts/ID/transactions \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/api-keysIssue a new API key
api_keys:wRequires api_keys:w.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
X-Step-Up-Tokenheader | string | A token from POST /v1/auth/step-up with the api_keys:elevate scope. Only needed to request permissions broader than the calling key's own, or when the calling key is a dashboard session key. |
Request body
| Field | Type | Description |
|---|---|---|
mode | string | Defaults to the calling key's mode. A test key can only create test keys.
|
label | string |
|
permissions | object | Per-resource permissions. Each key is a resource name; value is a string of allowed operations: r=read, w=write, m=modify, d=delete. Omit a resource to deny all access to it. Example: { "messages": "rw", "contacts": "r" }. When omitted, the new key gets the calling key's permissions. A key can only grant permissions it holds itself, unless the request carries an |
email_domain_ids | string[] | Restrict the key to sending email from these domains (ids from /v1/email-domains). Omitted: the key inherits the calling key's restriction, if any. A restricted key can only create keys restricted to a subset of its own domains, unless the request carries an api_keys:elevate step-up token. |
Responses
201API key issued. The raw key is shown only once: store it securely.
Field Type Description keystring Full API key (shown once only)
prefixstring Non-secret prefix for display/identification
modestring - One of: live | test
permissionsobject Per-resource permissions.
email_domain_idsstring[] - Can be null
noticestring - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account), LIVE_KEY_REQUIRED (a test key asked for a live key), KEY_FENCED (the calling key has an allow/deny fence), or PERMISSION_ESCALATION (broader permissions or email domains than the calling key, or a dashboard session key, without an api_keys:elevate step-up).The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X POST https://api.honkio.ca/v1/accounts/ID/api-keys \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "live",
"label": "Production server"
}'/v1/accounts/{id}/api-keys/{keyId}/rotateRotate an API key (issue replacement and revoke the old one atomically)
api_keys:wSession keys (the ones minted by dashboard login) can't be rotated: they always expire on their own; rotating one returns 409 CONFLICT with details.reason "session_key". Rotate a USER key instead. A key an OAuth connection holds (oauth_grant on the keys list) can't be rotated either: the replacement would not belong to the connection, so the app would stop working. That returns 409 CONFLICT with details.reason "oauth_grant"; revoke the connection and reconnect instead.
Requires api_keys:w.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
keyIdrequiredpath | string | |
X-Step-Up-Tokenheader | string | A token from POST /v1/auth/step-up with the api_keys:elevate scope. Only needed to rotate a key into one holding more than the calling key's own permissions, or when the calling key is a dashboard session key. |
Responses
201The replacement key, shown once. The old key is revoked in the same step; the new one keeps its mode, label, permissions, default-deny setting, lists and email-domain restriction.
Field Type Description keyrequiredstring The full new API key (shown once only).
prefixrequiredstring moderequiredstring - One of: live | test
revoked_idrequiredstring The id of the key this replaced.
noticerequiredstring - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account), LIVE_KEY_REQUIRED (a test key rotating a live key), KEY_FENCED (a key with an allow/deny fence rotating any key but itself), or PERMISSION_ESCALATION (the target holds more than the calling key, or the caller is a dashboard session key, without an api_keys:elevate step-up).The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 409CONFLICT: the key is already revoked, is being rotated by another request, is a dashboard session key (details.reason is session_key), or is held by an OAuth connection (details.reason is oauth_grant).The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X POST https://api.honkio.ca/v1/accounts/ID/api-keys/KEY_ID/rotate \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/api-keys/{keyId}Revoke an API key
api_keys:dRequires api_keys:d.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
keyIdrequiredpath | string |
Responses
- 204Revoked.
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account) or LIVE_KEY_REQUIRED (a test key revoking a live key).The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X DELETE https://api.honkio.ca/v1/accounts/ID/api-keys/KEY_ID \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/api-keys/{keyId}/default-denyToggle default-deny mode for an API key
api_keys:mWhen default_deny is true, messages via this key are blocked unless the recipient is in an assigned ALLOW list.
Requires api_keys:m.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
keyIdrequiredpath | string |
Request body
| Field | Type | Description |
|---|---|---|
default_denyrequired | boolean |
Responses
200The key's new default-deny setting.
Field Type Description api_key_idrequiredstring default_denyrequiredboolean - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account), LIVE_KEY_REQUIRED (a test key changing a live key), or KEY_FENCED (a fenced key changing its own or any other key's default-deny).The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X PATCH https://api.honkio.ca/v1/accounts/ID/api-keys/KEY_ID/default-deny \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"default_deny": false
}'/v1/accounts/{id}/api-keys/{keyId}/listsGet allow/deny list assignments for an API key
api_keys:rRequires api_keys:r.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
keyIdrequiredpath | string |
Responses
200The key's allow and deny lists, null when none is assigned.
Field Type Description allow_listrequiredobject | any deny_listrequiredobject | any - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN: the id is not the calling key's account, or the key lacks the permission this operation requires.The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/accounts/ID/api-keys/KEY_ID/lists \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/api-keys/{keyId}/lists/{mode}Assign an allow or deny list to an API key
api_keys:mRequires api_keys:m.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
keyIdrequiredpath | string | |
moderequiredpath | string |
|
Request body
| Field | Type | Description |
|---|---|---|
list_idrequired | string |
Responses
200The list now assigned.
Field Type Description api_key_idrequiredstring moderequiredstring - One of: ALLOW | DENY
list_idrequiredstring - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account), LIVE_KEY_REQUIRED (a test key changing a live key), or KEY_FENCED (a fenced key changing its own or any other key's lists).The standard error body.
- 404NOT_FOUND (no such key) or CONTACT_LIST_NOT_FOUND.The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X PUT https://api.honkio.ca/v1/accounts/ID/api-keys/KEY_ID/lists/MODE \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"list_id": "..."
}'/v1/accounts/{id}/api-keys/{keyId}/lists/{mode}Remove an allow or deny list from an API key
api_keys:mRequires api_keys:m.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string | |
keyIdrequiredpath | string | |
moderequiredpath | string |
|
Responses
- 204Unassigned (also when nothing was assigned).
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account), LIVE_KEY_REQUIRED (a test key changing a live key), or KEY_FENCED (a fenced key changing its own or any other key's lists).The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X DELETE https://api.honkio.ca/v1/accounts/ID/api-keys/KEY_ID/lists/MODE \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/accounts/{id}/phone-verificationStart account owner phone verification
account:mRequires account:m.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string |
Request body
| Field | Type | Description |
|---|---|---|
phonerequired | string | Canadian or US NANP number in E.164, e.g. +14165551234 |
Responses
200The code was sent by SMS.
Field Type Description sentrequiredboolean - One of: true
expires_in_secondsrequiredinteger - 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account) or LIVE_KEY_REQUIRED (owner verification needs a live key).The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429RATE_LIMITED: 3 codes per hour per account.The standard error body.
- 500Unexpected server error.The standard error body.
- 502CARRIER_ERROR: the carrier did not accept the SMS.The standard error body.
- 503SERVICE_UNAVAILABLE: owner verification is not configured.The standard error body.
Example
curl -X POST https://api.honkio.ca/v1/accounts/ID/phone-verification \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+1613XXXXXXX"
}'/v1/accounts/{id}/phone-verification/confirmConfirm OTP to complete phone verification
account:mRequires account:m.
Parameters
| Parameter | Type | Description |
|---|---|---|
idrequiredpath | string |
Request body
| Field | Type | Description |
|---|---|---|
coderequired | string | The 6-digit code sent by SMS |
Responses
200Verified: live sending is unlocked.
Field Type Description verifiedrequiredboolean - One of: true
verified_phonerequiredstring verified_atrequiredstring - Format: date-time
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403FORBIDDEN (not your account) or LIVE_KEY_REQUIRED (owner verification needs a live key).The standard error body.
- 422VALIDATION_ERROR, VERIFICATION_EXPIRED (no code pending; body statusCode 422) or VERIFICATION_INVALID_CODE.The standard error body.
- 429VERIFICATION_MAX_ATTEMPTS: five wrong codes; request a new one.The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X POST https://api.honkio.ca/v1/accounts/ID/phone-verification/confirm \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "123456"
}'/v1/send-limitYour sending limits and current usage
account:rThe daily cap (a rolling 24 hours), how much of it is used, the per-recipient cap, the probation status that gates "request a higher volume", any active pause, and your past requests.
Requires account:r.
Responses
200Sending limits, usage and past volume requests.
Field Type Description daily_limitrequiredinteger Live sends allowed in a rolling 24 hours.
sent_last_24hrequiredinteger remainingrequiredinteger window_hoursrequiredinteger approved_daily_limitrequiredinteger The standard volume a request is granted by default.
probation_daysrequiredinteger recipient_rate_per_hourrequiredinteger Messages one recipient may receive from the account in an hour.
recipient_rate_per_dayrequiredinteger Messages one recipient may receive from the account in a day.
probationrequiredobject started_atrequiredstring The first live send; null before it.
- Format: date-time
- Can be null
ends_atrequiredstring - Format: date-time
- Can be null
eligible_to_requestrequiredboolean paused_untilrequiredstring Set while sending is paused.
- Format: date-time
- Can be null
pause_reasonrequiredstring Why sending is paused: OPT_OUT_RATE, FAILURE_RATE or MANUAL.
- Can be null
requests[]requiredobject[] idrequiredstring requested_limitrequiredinteger Messages per day asked for; null asks for the standard approved volume.
- Can be null
limit_at_requestrequiredinteger sent_last_30d_at_requestrequiredinteger reasonrequiredstring statusrequiredstring - One of: PENDING | APPROVED | DENIED
granted_limitrequiredinteger - Can be null
staff_noterequiredstring - Can be null
decided_atrequiredstring - Format: date-time
- Can be null
created_atrequiredstring - Format: date-time
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403The API key lacks the permission this operation requires, or the account is suspended or closed.The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/send-limit \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/send-limit/requestsList your volume requests
account:rRequires account:r.
Responses
200The account's volume requests, newest first.
Field Type Description data[]requiredobject[] idrequiredstring requested_limitrequiredinteger Messages per day asked for; null asks for the standard approved volume.
- Can be null
limit_at_requestrequiredinteger sent_last_30d_at_requestrequiredinteger reasonrequiredstring statusrequiredstring - One of: PENDING | APPROVED | DENIED
granted_limitrequiredinteger - Can be null
staff_noterequiredstring - Can be null
decided_atrequiredstring - Format: date-time
- Can be null
created_atrequiredstring - Format: date-time
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403The API key lacks the permission this operation requires, or the account is suspended or closed.The standard error body.
- 429Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl https://api.honkio.ca/v1/send-limit/requests \
-H "Authorization: Bearer mk_live_YOUR_KEY"/v1/send-limit/requestsRequest a higher daily sending volume
account:wOpens once the account has completed its probation period (counted from its first live send). Omit requested_limit to ask for the standard approved volume, or name a target. One request may be pending at a time; you are emailed when it is decided.
Requires account:w.
Request body
| Field | Type | Description |
|---|---|---|
requested_limit | integer | Messages per day you want (not an increment). Omit for the standard approved volume.
|
reasonrequired | string | What you send and to whom. Staff decide on this. 10 to 1000 characters. |
Responses
201The request, pending review.
Field Type Description idrequiredstring requested_limitrequiredinteger Messages per day asked for; null asks for the standard approved volume.
- Can be null
limit_at_requestrequiredinteger sent_last_30d_at_requestrequiredinteger reasonrequiredstring statusrequiredstring - One of: PENDING | APPROVED | DENIED
granted_limitrequiredinteger - Can be null
staff_noterequiredstring - Can be null
decided_atrequiredstring - Format: date-time
- Can be null
created_atrequiredstring - Format: date-time
- 401Missing, invalid, revoked or expired API key.The standard error body.
- 402The account has no balance, or a LIVE key was used before the first top-up.The standard error body.
- 403SEND_LIMIT_REQUEST_TOO_EARLY (probation not over; details.eligible_at) or LIVE_KEY_REQUIRED.The standard error body.
- 404NOT_FOUND: no such resource on this account.The standard error body.
- 409SEND_LIMIT_REQUEST_PENDING: a request is already pending.The standard error body.
- 422VALIDATION_ERROR: the request failed validation; details names the fields.The standard error body.
- 429RATE_LIMITED: 3 requests per day per account.The standard error body.
- 500Unexpected server error.The standard error body.
Example
curl -X POST https://api.honkio.ca/v1/send-limit/requests \
-H "Authorization: Bearer mk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "..."
}'
HonkIO