---
title: "Create invite"
method: POST
path: "/v2/organizations/{organization_id}/invites"
tags: ["invites"]
---

# Create invite

`POST /v2/organizations/{organization_id}/invites`

## Request

- Base URL: `https://api.hubstaff.com`
- URL: `https://api.hubstaff.com/v2/organizations/{organization_id}/invites`
- Auth: OAuth 2
  - Authorization code: `https://account.hubstaff.com/authorizations/new`
  - Token URL: `https://account.hubstaff.com/access_tokens` scopes: `hubstaff:read`, `hubstaff:write`
- TypeScript: <https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/docs/v2/organizations/:organization_id/invites/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new invite.

Returns the created invite.

Note: If there is an account for the email in Hubstaff, the invite will be auto accepted.
Note: There is a rate limit on how many invites you may create.

Available roles:
- organization_manager - Invited as an organization manager
- project_manager - Invited as a project manager
- project_user - Invited as a project user
- project_viewer - Invited as a project viewer

If no project_ids are set, any project_* role will default to project_viewer (no projects assigned).

## Path parameters

- `organization_id` integer, required

## Request body

- PostV2OrganizationsOrganizationIdInvites: Create invite
  - `email` string, required: The email to invite
  - `role` 'organization_manager' | 'project_manager' | 'project_user' | 'project_viewer': The role to invite the user as
  - `pay_rate` number, float: A pay rate to set for the user
  - `project_ids` integer[]: List of project IDs to add the user to after they accept the invite
  - `trackable` boolean: Whether the user can track time
  - `view_only` boolean: Whether the user is in view only mode or not

## Response `201`

An invite

- object
  - `invite` Invite: Invite model
    - `id` integer, required: Invite ID
    - `email` string, required: Invite email
    - `invited_by_id` integer, required: User ID for who created the invite
    - `pay_rate` string: Pay rate
    - `project_ids` integer[], required: Projects to add the user to once invite is accepted
    - `role` string, required: The role they will be added as once accepted
    - `status` string, required: Invite status
    - `accepted_at` string, date-time: When the invite was accepted
    - `trackable` boolean: Whether the user can track time
    - `created_at` string, date-time, required: When the record was created
    - `updated_at` string, date-time, required: When the record was last updated

## Other responses

- `400`: Invalid parameters
- `401`: Unauthorized
- `403`: API access is only for organizations on an active plan
- `404`: Could not find record
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api.md) - [All operations](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hubstaff/apis/hubstaff-v2-api/revisions/c6b90e4e4bdc?raw)
