Wex Health and Benefits APIs

Sections

Theme switcher

Create Employee Group

Header Parameters

X-Request-Idstring

Optional correlation ID for distributed tracing.

Idempotency-Keystring Required

Required client-generated UUID v4 used to deduplicate retried mutating requests (POST, PUT, PATCH, DELETE). Requests without this header are rejected with 400 Bad Request. The first successful (2xx) response is cached for 24h and replays of the same key return the cached response without re-executing the operation.

Authorizationstring

Body Parameters

group_codestring Required

Unique code for this group within the employer account.

Min length
1
Max length
100
group_namestring Required

Human-readable name for the employee group.

Min length
1
Max length
255
descriptionstring | null

Optional description of the group's purpose.

statusstring

Initial status of the group.

effective_datestring

Date the group becomes effective (YYYY-MM-DD).

termination_datestring | null

Date the group terminates (YYYY-MM-DD).

employer_account_idstring Required

Employer account this group belongs to.

Min length
1
Max length
255
eligibility_defaultsobject | null

Show child attributes

metadataobject | null

Show child attributes

Response

201
Object

Created – Employee group successfully created

Response Attributes

external_idstring

Public UUID for cross-domain references and API addressing (used as the {id} path parameter). No internal numeric identifier is exposed on the wire.

group_codestring | null

Unique code for this group within the employer account.

Max length
100
group_namestring | null

Human-readable name for the employee group.

Max length
255
descriptionstring | null

Optional description of the group's purpose.

statusstring | null

Current status of the employee group.

effective_datestring

Date the group becomes effective (YYYY-MM-DD).

termination_datestring | null

Date the group was terminated (YYYY-MM-DD).

employer_account_idstring | null

Employer account identifier this group belongs to.

Max length
255
eligibility_defaultsobject | null

Show child attributes

metadataobject | null

Show child attributes

membership_rulesarray | null

Active membership rules for this group.

Show child attributes

employee_match_countinteger

Number of employees currently matched by this group's rules.

created_bystring | null

Identity of the principal who created the record.

updated_bystring | null

Identity of the principal who last modified the record.

created_datestring

ISO 8601 timestamp of record creation.

updated_datestring

ISO 8601 timestamp of last modification.

400
Object

Bad Request – Validation failed. The errors map keys mirror the snake_case JSON property names used in the request payload.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

Show child attributes

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

401
Object

Unauthorized – Missing or invalid credentials.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

403
Object

Forbidden – Insufficient permissions.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

409
Object

Conflict – Returned for duplicate-record conflicts and optimistic concurrency version mismatches. See duplicate_record and version_conflict examples.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

429
Object

Too Many Requests – Rate limit exceeded.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

500
Object

Internal Server Error.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

default
Object

Internal Server Error.

Response Attributes

typestring | null
titlestring | null
statusinteger | null
detailstring | null
instancestring | null
invalid_paramsarray | null

List of invalid parameters that caused the validation error.

Max items
10

Show child attributes

errorsobject

Human-readable validation error messages keyed by field name. Each key maps to one or more error message strings.

validation_errorsobject

Field-level validation errors keyed by field name. Each key maps to one or more structured error details.

Was this section helpful?

POST

/

Select
1

Response

Was this section helpful?