Skip to main content

API Standards

The SalesKick API adheres to widely adopted RFCs and ISO standards for data formats. This page documents each standard, explains how it applies to the API, and provides examples of valid and invalid values.

Phone numbers (E.164)

All phone number fields follow the ITU-T E.164 international telephone numbering format.

Phone numbers must start with a + followed by the country code and subscriber number, with no spaces, hyphens, or parentheses. The maximum length is 15 digits (including the country code).

ValueValidReason
+14155552671YesUS number with country code 1
+442071838750YesUK number with country code 44
+5511998765432YesBrazil number with country code 55
(415) 555-2671NoContains parentheses, spaces, and hyphens
415-555-2671NoMissing + prefix and country code
+0123456789NoCountry code cannot start with 0
14155552671NoMissing + prefix
JSON
1{
2 "phone_number": "+14155552671"
3}

Country codes (ISO 3166-1)

Country fields use ISO 3166-1 alpha-2 two-letter country codes.

ValueValidReason
USYesUnited States
CAYesCanada
DEYesGermany
USANoAlpha-3 code; the API requires alpha-2
usNoMust be uppercase
United StatesNoFull name not accepted
JSON
1{
2 "country": "US"
3}

State and province codes (ISO 3166-2)

State and province fields use ISO 3166-2 subdivision codes in the format {country}-{subdivision}.

ValueValidReason
US-CAYesCalifornia, United States
US-DCYesDistrict of Columbia
CA-ONYesOntario, Canada
CANoMissing subdivision code
CaliforniaNoFull name not accepted
us-caNoCountry prefix must be uppercase
JSON
1{
2 "country": "US",
3 "state": "US-NY"
4}

Timestamps (ISO 8601 / RFC 3339)

All timestamp fields use ISO 8601 format as profiled by RFC 3339. Timestamps are always in UTC, indicated by the Z suffix.

ValueValidReason
2024-02-17T10:45:23ZYesStandard UTC timestamp
2024-02-17T10:45:23.123ZYesWith millisecond precision
2024-02-17T10:45:23.123456ZYesWith microsecond precision
2024-02-17T10:45:23+00:00YesExplicit UTC offset
2024-02-17NoMissing time component
2024-02-17 10:45:23NoSpace instead of T separator
02/17/2024NoNot ISO 8601 format
1708166723NoUnix timestamp not accepted
JSON
1{
2 "created_at": "2024-02-17T10:45:23Z",
3 "updated_at": "2024-02-17T14:30:00.000Z"
4}

Language tags (BCP 47)

Language and locale fields use BCP 47 language tags as defined in RFC 5646. Tags consist of a lowercase ISO 639-1 language code followed by an uppercase ISO 3166-1 region code, separated by a hyphen.

ValueValidReason
en-USYesEnglish (United States)
es-USYesSpanish (United States)
es-MXYesSpanish (Mexico)
fr-CAYesFrench (Canada)
pt-BRYesPortuguese (Brazil)
en_USNoUnderscore instead of hyphen
EN-usNoLanguage must be lowercase, region uppercase
englishNoFull language name not accepted
JSON
1{
2 "preferred_language": "en-US"
3}

Postal codes (USPS)

For US addresses, postal code fields accept standard USPS 5-digit ZIP codes or 9-digit ZIP+4 codes with a hyphen separator.

ValueValidReason
94102YesStandard 5-digit ZIP
94102-1234YesZIP+4 format
9410NoFewer than 5 digits
941021234NoZIP+4 missing hyphen
94102-123NoZIP+4 extension must be 4 digits
ABCDENoMust be numeric
JSON
1{
2 "postal_code": "94102-1234"
3}

Identifiers (UUID)

All resource identifiers use RFC 9562 Universally Unique Identifiers (UUIDs) in their canonical lowercase string representation.

ValueValidReason
550e8400-e29b-41d4-a716-446655440000YesStandard UUID format
550e8400e29b41d4a716446655440000NoMissing hyphens
550e8400-e29b-41d4-a716NoIncomplete UUID
not-a-uuidNoInvalid format
JSON
1{
2 "id": "550e8400-e29b-41d4-a716-446655440000",
3 "organization_id": "123e4567-e89b-12d3-a456-426614174000",
4 "payment_id": "789e0123-e89b-12d3-a456-426614174000"
5}

Currency codes (ISO 4217)

All monetary amounts include a currency field using ISO 4217 three-letter currency codes.

ValueValidReason
USDYesUnited States Dollar
CADYesCanadian Dollar
MXNYesMexican Peso
usdNoMust be uppercase
USNoMust be a 3-letter code
$NoCurrency symbols are not accepted
JSON
1{
2 "fee": {
3 "amount": 50,
4 "currency": "USD"
5 }
6}

Recurrence rules (RFC 5545)

Subscription schedules use recurrence rules as defined in RFC 5545 (iCalendar), expressed as an RRULE: string. This format describes how events repeat over time.

Format

A recurrence rule begins with the RRULE: prefix followed by one or more semicolon-separated properties:

RRULE:FREQ=<frequency>[;PROPERTY=VALUE...]

Key properties

PropertyDescriptionExample values
FREQRequired. Recurrence frequency.DAILY, WEEKLY, MONTHLY, YEARLY
INTERVALHow often the rule repeats (default: 1).2 (every 2 weeks)
COUNTTotal number of occurrences before the schedule ends.12
UNTILUTC datetime after which no more occurrences are generated.20261231T000000Z
BYDAYDays of the week. Use two-letter codes: MO, TU, WE, TH, FR, SA, SU.MO,WE,FR
BYMONTHDAYDay(s) of the month.1, 15
BYMONTHMonth(s) of the year (1–12).3, 6, 9, 12

Validity table

ValueValidReason
RRULE:FREQ=MONTHLY;COUNT=12YesMonthly, 12 occurrences
RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FRYesEvery Monday, Wednesday, Friday
RRULE:FREQ=YEARLY;UNTIL=20261231T000000ZYesYearly until end of 2026
RRULE:FREQ=MONTHLY;INTERVAL=3YesEvery 3 months (quarterly)
RRULE:FREQ=DAILY;COUNT=30YesDaily for 30 days
monthlyNoMissing RRULE: prefix and FREQ property
RRULE:INTERVAL=2NoFREQ is required
P1MNoISO 8601 duration — not an RRULE string

Ending a subscription

To end a subscription, update the schedule field and add an UNTIL date. Do not delete the subscription.

JSON
1{
2 "schedule": "RRULE:FREQ=MONTHLY;UNTIL=20261231T000000Z"
3}

Examples

JSON
1{
2 "name": "Monthly Software License",
3 "schedule": "RRULE:FREQ=MONTHLY;COUNT=12"
4}
JSON
1{
2 "name": "Weekly Service",
3 "schedule": "RRULE:FREQ=WEEKLY;BYDAY=MO"
4}
JSON
1{
2 "name": "Annual Subscription",
3 "schedule": "RRULE:FREQ=YEARLY"
4}

Error responses (RFC 9457)

All error responses follow RFC 9457 Problem Details for HTTP APIs. For the full error response format, status codes, and validation error structure, see the Errors page.

Standards reference

StandardSpecificationFields
ITU-T E.164ITU-T E.164phone_number
ISO 3166-1 alpha-2ISO 3166country
ISO 3166-2ISO 3166state
ISO 4217ISO 4217currency
ISO 8601 / RFC 3339ISO 8601 / RFC 3339created_at, updated_at, expires_at
BCP 47 / RFC 5646BCP 47 / RFC 5646preferred_language
USPS ZIP CodeUSPSpostal_code
RFC 9562RFC 9562id, organization_id, payment_id
RFC 5545RFC 5545schedule
RFC 9457RFC 9457Error responses