Create a payee engagement

Enroll a Payee in an Engagement template, creating a concrete PayeeEngagement record. Idempotent via Idempotency-Key.

engagementType must agree with the template's type, or the request returns 422. It must also agree with the Payee's context (only an Employee engagement agrees with Employee), or the request returns 409 ResourceConflict; change the context first with change-context. A Payee with no recorded context takes its context from its first engagement.

If externalId is supplied and already used by another resource of this type for the owning Account, the request returns 409 ResourceConflict; create is not an upsert. Use filter[externalId][eq] on the list endpoint to retrieve the existing resource.

worksiteId must name a worksite owned by the payer, or the request returns 422 with detailCode payments.WorksiteNotFound. For an Employee engagement, the worksite must also be in a country W-2 payroll supports and a state enabled on the payer's employer payroll profile. Otherwise the request returns 422 with payments.WorksiteCountryUnsupported, payments.WorksiteJurisdictionUnsupported, or payments.WorksiteJurisdictionNotEnabled. Nothing is saved when the request is rejected.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
^[A-Za-z0-9_.]{22,80}$
Body Params
string
required
string
string
enum
required

The kind of work agreement between payer and payee.

  • Contractor — 1099-NEC payment relationship; no withholding.
  • Employee — W-2 payroll relationship; gross-to-net withholding.
    Location is selected on each PayeeEngagement; omitting its
    worksiteId means remote work.
  • EmployeeOfRecord — EOR engagement; Wingspan or partner is the
    legal employer-of-record. Requires resolved natural-person identity
    before the EOR flow completes.
  • AgentOfRecord — AOR engagement; agent acts on behalf of the
    payer for engagement administration.
Allowed:
date
date
string

For Employee engagements, omit for remote work.

string
string

Overrides the denormalized engagement name (e.g. to use as a job title).

metadata
object

Free-form key-value pairs. Max 50 keys; key length at most 40 characters; value length at most 500 characters. Where a list endpoint declares metadata filtering, it uses the QueryQL namespace via filter[metadata.{key}][eq]=value or filter[metadata.{key}][in][]=value. Endpoints that do not declare the dynamic Metadata filter do not support Metadata filtering.

Headers
string
length between 1 and 255
^[\x21-\x7e]{1,255}$

Optional idempotency token for authenticated POST and PATCH requests. Reusing the same key and body returns the cached response for 24 hours, except credential operations that explicitly document a 409 because one-time secret material is never cached; reusing it with a different body returns 409 IdempotencyKeyConflict. Use 1-255 printable ASCII characters.

string
^(?:[A-Za-z0-9_.]{22}|[a-f0-9]{24})$

Select the Account for an Account-scoped operation. A direct ServiceAccount API key MUST supply this header, and the target must be within the ServiceAccount owner's or Authorization grant's Account boundary. A Person bearer may select an Account on which it has an active Stakeholder, and an Account session may select its bound Account (or a descendant only when the session explicitly includes descendants).

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json