Skip to content

Create an external referrer

POST
/commissions/referrers
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/commissions/referrers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "commissionPercentage": 1, "email": "hello@example.com", "firstName": "example", "lastName": "example", "name": "example" }'

Creates an external referrer: a new Client with the External Agency status, a passwordless portal login, and the invitation that lets them set a password. Requires commissions.manage.

Media typeapplication/json
object
commissionPercentage

Default commission percentage for this referrer. Omitted or null uses the workspace default.

Any of:
number
<= 100
email
required
string format: email
/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/
firstName
required
string
>= 1 characters <= 100 characters
lastName
required
string
>= 1 characters <= 100 characters
name
required

Name for the referrer Client record created alongside the login.

string
>= 1 characters <= 200 characters

Example generated

{
"commissionPercentage": 1,
"email": "hello@example.com",
"firstName": "example",
"lastName": "example",
"name": "example"
}

The created external referrer.

Media typeapplication/json
object
data
required

The external referrer created: its Client, portal login, and invitation.

object
clientId
required

The referrer Client created for this referral.

string
invitationSent
required
boolean
memberId
required

WorkspaceMember identifier of the new portal login.

string

Example

{
"data": {
"invitationSent": true
}
}

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"
}
}

Conflict.

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.

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"
}
}

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.