---
title: "Invite a GitHub user to the account"
method: POST
path: "/api/v1/account/invites"
tags: ["Account"]
---

# Invite a GitHub user to the account

`POST /api/v1/account/invites`

## Request

- Base URL: `https://api.uptimemonitoring.com`
- URL: `https://api.uptimemonitoring.com/api/v1/account/invites`
- Auth: HTTP bearer

Owner-only. `github_username` is validated locally (1–39 bytes,
`^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$`) before any outbound call —
`400 invalid_github_username` on failure. A valid login is resolved
via GitHub's public, unauthenticated `GET /users/{login}`:
`404 github_user_not_found` if GitHub reports no such user, `502
github_error` on any other GitHub failure. `409 member_exists` if a
user with that GitHub ID is already a member; `409 invite_exists`
if a live invite for them already exists. Invites expire after 7
days.

## Request body

- object
  - `github_username` string, required
  - `role` 'owner' | 'member' | 'viewer', required

## Response `201`

Invite created.

- Invite: An owner-issued invitation, as seen by the account's owners (issue
  - `id` integer
  - `github_id` integer
  - `github_username` string
  - `role` 'owner' | 'member' | 'viewer'
  - `created_at` string, date-time
  - `expires_at` string, date-time: Always `created_at` + 7 days.

## Other responses

- `400`: Invalid GitHub username, or an invalid role.
- `404`: GitHub reports no such user.
- `409`: Already a member, or a live invite already exists.
- `502`: GitHub lookup failed for a reason other than 404.

---

[API](https://skmtc.dev/uptimemonitoring/apis/uptimemonitoring-com-api.md) · [All operations](https://skmtc.dev/uptimemonitoring/apis/uptimemonitoring-com-api/llms.txt) · [OpenAPI document](https://skmtc.dev/uptimemonitoring/apis/uptimemonitoring-com-api/revisions/ddcb2a8bc70f?raw)
