Skip to main content

Invite a user

POST 

/v1/businesses/{businessId}/users

Invites a user to the business with the role you supply, and sends them a welcome email so they can set their password and sign in to the Hiya Console.

A person belongs to one business at a time. If the email already belongs to a user, the request is rejected with 409 — unless that user is on another of your businesses and you pass force=true, in which case they are moved here:

The email belongs to …force=false (default)force=true
nobody yet201 — user invited201 — user invited
a user on this business409409
a user on another of your businesses409200 — user moved here
any other Hiya user409409

Moving a user takes them off the other business, so they lose access to it. Their name and role are set to the ones you send, and they get a new welcome email. A user who isn't on one of your businesses is never moved, whatever force says.

The business must have completed verification (ACTIVE or INACTIVE); one still UNDER_REVIEW or in NEEDS_ATTENTION, or one being shut down, returns 409. When moving a user, so does a source business that is being shut down.

Path Parameters​


    businessId string<uuid>required

    The ID of the business, assigned by Hiya.

    Example: 9b8a1c4e-2c0f-4f3d-9a1e-7b3a2b4c6d8f

Query Parameters​


    force boolean

    Move the user onto this business if the email belongs to a user on another of your businesses. Without it, that case returns

    409
    . It never moves a user who isn't on one of your businesses.

    Default value: false
    Example:

Header Parameters​


    X-Hiya-Request-Id string

    Your own correlation ID for this call, returned as

    requestId
    in the response body. Hiya generates one if omitted. A value that doesn't match the pattern is rejected with
    400
    INVALID_HEADER
    .

    Possible values: <= 200 characters, Value must match regular expression ^[A-Za-z0-9._:/+=@-]+$

    Example: job-2f9c1a7e-0042

Body

required

application/json

Responses​

force=true was passed and the email belonged to a user on another of your businesses. The user was moved onto this business. Returns the user.

Response Body

application/json