Skip to content

Create a service

POST
/services
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "baseHourlyRate": 1, "classKind": "FIXED_TEAM", "classTeamId": "example", "currency": "USD", "description": "example", "imageUrl": "https://example.com", "intakeFormId": "example", "isRecurring": false, "metadata": { "additionalProperty": "example" }, "name": "example", "orderTypeId": "example", "periodMonths": 1, "periodRule": "RECURRING", "pricing": { "hours": null, "mode": "single", "rate": 1 }, "recurringInterval": "WEEKLY", "recurringIntervalCount": 1, "revenueAccountId": "example", "reviewReminderDays": 1, "showInPortal": true, "subscriptionTermMonths": 1, "trialDurationDays": 1, "trialRate": 1 }'

Creates a catalog service with a single price or a list of pricing options. A trial requires a recurring, single-price service, and intakeFormId must name a non-archived SERVICE_INTAKE order form. revenueAccountId must name an active revenue account, orderTypeId an active order type of the workspace that an invoice can open and classKind FIXED_TEAM a team of the workspace; a periodRule left out defaults from the recurrence and the hours of the prices. A recurring service left without subscriptionTermMonths or reviewReminderDays gets a 12-month term and a 30-day review reminder. Requires the invoices.manage permission; setting revenueAccountId or the class rule also needs accounting.manage (403 otherwise).

Media typeapplication/json
object
baseHourlyRate

Standard hourly rate hour packages are priced at; null clears it. Package prices are sent in pricing, not derived from it.

Any of:
number
> 0 <= 99999999.99
classKind

FIXED_TEAM needs classTeamId; COMPANY_TEAM stores no team; null clears the rule. A change needs the accounting.manage permission, which by default the Owner and Admin roles hold.

Any of:

What fills the class of a line booked to the account: FIXED_TEAM is one team, COMPANY_TEAM is the team the company has in force on the invoice date.

string
Allowed values: FIXED_TEAM COMPANY_TEAM
classTeamId

A team of the same workspace; used only with classKind FIXED_TEAM. A change needs the accounting.manage permission, which by default the Owner and Admin roles hold.

Any of:
string
>= 1 characters
currency
string
default: USD >= 3 characters <= 3 characters
description
string | null
imageUrl
Any of:
string format: uri
intakeFormId

A non-archived SERVICE_INTAKE order form of the same workspace, asked of the buyer after purchase; null clears it. Any other form is refused with a field error.

Any of:
string
>= 1 characters
isRecurring
boolean
metadata
Any of:
object
key
additional properties
string
name
required
string
>= 1 characters <= 200 characters
orderTypeId

An active order type that an invoice can open: an order of it is the one an invoice with a line of this service starts with. An archived type or one no invoice opens is refused with a field error; null clears it.

Any of:
string
>= 1 characters
periodMonths

Months of a FIXED_MONTHS period, 1 to 120; ignored for any other rule.

Any of:
integer
>= 1 <= 120
periodRule

RECURRING needs a recurring service. A create that leaves it out defaults to RECURRING for a recurring service, FIXED_MONTHS 12 for one-off services whose prices carry hours, and MANUAL otherwise.

Any of:

How the service period of an invoice line is computed: RECURRING is one renewal interval from the invoice date, FIXED_MONTHS is periodMonths months from it, and MANUAL leaves the dates to the person invoicing.

string
Allowed values: RECURRING FIXED_MONTHS MANUAL
pricing
required

single sets one price; options replaces the pricing options with this list, in display order. An update drops options it omits, disabling those a submission already references.

One of:
object
hours
Any of:
number
> 0
mode
required
string
Allowed value: single
rate
required
number
recurringInterval
Any of:
string
Allowed values: WEEKLY MONTHLY QUARTERLY YEARLY
recurringIntervalCount
Any of:
integer
>= 1 <= 9007199254740991
revenueAccountId

An active revenue account of the same workspace the service books to; null clears it. Choosing a new account fills the class rule from the account’s default unless the service holds a rule of its own. A change needs the accounting.manage permission, which by default the Owner and Admin roles hold.

Any of:
string
>= 1 characters
reviewReminderDays

Recurring services only: days, 1 to 365, before the term ends (or each anniversary when it runs until canceled) that the order’s responsibles and the admins get a SUBSCRIPTION_REVIEW_DUE notification; null turns the reminder off. A new recurring service that leaves it out gets 30.

Any of:
integer
>= 1 <= 365
showInPortal
boolean
subscriptionTermMonths

Recurring services only: months, 1 to 120, an order opened from an invoice of the service runs before it closes and stops billing; null renews it until canceled. A new recurring service that leaves it out gets 12. Ignored for a one-off service.

Any of:
integer
>= 1 <= 120
trialDurationDays
Any of:
integer
> 0 <= 9007199254740991
trialRate
Any of:
number

The created service.

Media typeapplication/json
object
data
required

A workspace service-catalog entry.

object
baseHourlyRate
required

Standard hourly rate hour packages are priced at, in the service currency; null when not set.

number | null
classKind
required

How a line of the service gets its class; null when no rule is set.

Any of:

What fills the class of a line booked to the account: FIXED_TEAM is one team, COMPANY_TEAM is the team the company has in force on the invoice date.

string
Allowed values: FIXED_TEAM COMPANY_TEAM
classTeamId
required

The fixed class team; null unless classKind is FIXED_TEAM.

string | null
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
currency
required
string
description
required
string | null
hours
required

Hours the single price includes; null in options mode.

number | null
id
required
string
imageUrl
required
string | null
intakeFormId
required

The SERVICE_INTAKE order form a buyer fills in after purchase; null when the service asks for nothing.

string | null
isActive
required

False when the service is archived.

boolean
isRecurring
required
boolean
metadata
required
Any of:
object
key
additional properties
string
name
required
string
orderTypeId
required

The order type an invoice line of this service opens; null leaves the type to be chosen on the invoice, from the hours the service sells.

string | null
periodMonths
required

Months of a FIXED_MONTHS period; null for any other rule.

Any of:
integer
>= -9007199254740991 <= 9007199254740991
periodRule
required

How a line’s service period is computed; null when no rule is set.

Any of:

How the service period of an invoice line is computed: RECURRING is one renewal interval from the invoice date, FIXED_MONTHS is periodMonths months from it, and MANUAL leaves the dates to the person invoicing.

string
Allowed values: RECURRING FIXED_MONTHS MANUAL
pricingMode
required

single sells one price (rate); options sells one of pricingOptions.

string
Allowed values: single options
pricingOptions
required

Every option by position, disabled ones included; empty in single mode.

Array<object>

A purchasable pricing option of a service.

object
hours
required

Hours the option includes, when hour-bound.

number | null
id
required
string
isActive
required

Disabled options are not offered to buyers.

boolean
label
required
string
position
required
integer
>= -9007199254740991 <= 9007199254740991
price
required

Price of the option in the service currency.

number
pricePerHour
required

Price / hours rounded to cents; null when the option has no hours.

number | null
rate
required

Single price in the service currency; null in options mode.

number | null
recurringInterval
required

Billing cadence; null for one-off services.

Any of:
string
Allowed values: WEEKLY MONTHLY QUARTERLY YEARLY
recurringIntervalCount
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
revenueAccountId
required

The revenue account the service books to; null when none is set.

string | null
reviewReminderDays
required

Days before the term ends, or before each anniversary when it runs until canceled, that the order’s responsibles and the admins are reminded to review it; null sends no reminder.

Any of:
integer
>= -9007199254740991 <= 9007199254740991
showInPortal
required

Listed in the client portal; hidden services still sell on forms.

boolean
subscriptionTermMonths
required

Months an order opened from an invoice of this recurring service runs before it closes and stops billing; null when it renews until canceled. Each invoice still covers one billing cycle.

Any of:
integer
>= -9007199254740991 <= 9007199254740991
trialDurationDays
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
trialRate
required
number | null
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/

Example

{
"data": {
"classKind": "FIXED_TEAM",
"periodRule": "RECURRING",
"pricingMode": "single",
"recurringInterval": "WEEKLY"
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input, with field-level messages.

Media typeapplication/json

Error envelope with field-level messages.

object
error
required
object
code
required

Stable machine-readable error code.

string
fieldErrors
required

Message per offending field; a list item is keyed <field>.<index>.<key>.

object
key
additional properties
string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.