Company User

Invite a user to a company

Invite a user to a company

post/api/v1/company-user

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

No recorded changes to this endpoint across all 1 revision of this API.