Company User

Invite a user to a company

Changed on

Invite a user to a company

post/api/v1/company-user

Request

Request body

usernamestring required

Username of the user being invited.

emailstring required

Email address of the user being invited.

expiresAtstring date-time nullable

Expiration date and time of the invitation.

teamIdstring uuid nullable

ID of the team to which the user will be assigned

rolePresetSlugstring required

ID of the role preset to assign.

companyIdstring uuid required

ID of the company to which the user is being invited.

Example request

{
  "accessList": {
    "app_events_read": true,
    "app_events_show_own_only": false,
    "balances_delete": false,
    "balances_read": true,
    "balances_write": false,
    "landings_delete": false,
    "landings_read": true,
    "landings_show_own_only": false,
    "landings_write": false,
    "members_delete": false,
    "members_read": true,
    "members_write": false,
    "offers_delete": false,
    "offers_read": true,
    "offers_show_own_only": false,
    "offers_write": false,
    "pixels_delete": false,
    "pixels_read": true,
    "pixels_show_own_only": false,
    "pixels_write": false,
    "push_delete": true,
    "push_read": false,
    "push_show_own_only": false,
    "push_write": true,
    "pwa_delete": false,
    "pwa_read": true,
    "pwa_show_own_only": false,
    "pwa_write": false,
    "teams_delete": false,
    "teams_read": true,
    "teams_write": false,
    "trackers_delete": false,
    "trackers_read": true,
    "trackers_show_own_only": false,
    "trackers_write": false
  },
  "company_id": "123e4567-e89b-12d3-a456-426614174000",
  "email": "example.com",
  "expires_at": "2024-12-31T23:59:59Z",
  "role_preset_slug": "admin",
  "team_id": "123e4567-e89b-12d3-a456-426614174111",
  "username": "newuser"
}

Response

Successful Response

hashstring required

URL that the invitee can use to redeem the invitation.

Example response

{
  "hash": "abc123def456"
}

Changes

    • warning

      added the new DOMAIN_PURCHASE_INSUFFICIENT_FUNDS enum value to the / response property for the response status