Invites

Create and manage team invitations. Invite new members via email.

Manage team invitations to onboard new members. An invite stays open for its email address until it is accepted or revoked.

GET /api/v1/invites

Returns the pending and accepted invitations for your team.

The list is paginated. See Pagination for how to walk it a page at a time.

Required scope: invites:read

Query Parameters

  • perPageinteger

    Results per page, 1-200 (default: 50)

  • cursorstring

    Page to fetch, taken from a Link header

Response Fields

  • data.invitesarray

    One page of invites

  • data.invites[].idstring

    Unique invite identifier

  • data.invites[].emailstring

    Email address of the invited user

  • data.invites[].senderIdstring

    User ID of the team member who sent the invite

  • data.invites[].teamIdstring

    Team ID the invite is for

  • data.invites[].acceptedAtinteger | null

    Unix timestamp in milliseconds of the acceptance

  • data.invites[].createdAtinteger

    Unix timestamp in milliseconds of the creation

  • data.invites[].updatedAtinteger

    Unix timestamp in milliseconds of the last update

  • meta.requestIdstring

    Identifier for this request

  • meta.timestampstring

    ISO 8601 timestamp of the response

  • meta.pagination.nextstring | null

    Cursor for the following page, null on the last

  • meta.pagination.prevstring | null

    Cursor for the preceding page, null on the first

  • meta.pagination.perPageinteger

    Results this page was built with

  • meta.pagination.totalinteger

    Invites matching, across every page

Errors (3)
StatusTypeMeaning
400bad-requestThe request is malformed
401unauthorizedThe API key is missing or invalid
403forbiddenThe API key lacks the required scope
Response fields (200)
  • dataobjectRequired
    Show nested fields
    • invitesInvite[]Required
      Show nested fields
      • idstringRequired
      • emailstringRequired
      • senderIdstringRequired
      • teamIdstringRequired
      • acceptedAtinteger | nullRequired

        When accepted; null while pending

      • createdAtintegerRequired

        Epoch milliseconds

      • updatedAtintegerRequired

        Epoch milliseconds

  • metaobjectRequired
    Show nested fields
    • requestIdstringRequired

      Format: uuid.

    • timestampstringRequired

      Format: date-time.

    • paginationobjectRequired
      Show nested fields
      • nextstring | nullRequired

        Cursor of the following page

      • prevstring | nullRequired

        Cursor of the preceding page

      • perPageintegerRequired
      • totalinteger

cURL

Terminal
curl -i "https://uptime.sergiodxa.com/api/v1/invites?perPage=100" \
  -H "Authorization: Bearer uptime_your_api_key"

Response

json
{
	"data": {
		"invites": [
			{
				"id": "inv_abc123",
				"email": "alice@example.com",
				"senderId": "usr_xyz789",
				"teamId": "team_def456",
				"acceptedAt": 1770733800000,
				"createdAt": 1770542100000,
				"updatedAt": 1770733800000
			},
			{
				"id": "inv_def456",
				"email": "bob@example.com",
				"senderId": "usr_xyz789",
				"teamId": "team_def456",
				"acceptedAt": null,
				"createdAt": 1770894000000,
				"updatedAt": 1770894000000
			}
		]
	},
	"meta": {
		"requestId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
		"timestamp": "2026-02-14T12:00:00.000Z",
		"pagination": {
			"next": null,
			"prev": null,
			"perPage": 100,
			"total": 2
		}
	}
}

POST /api/v1/invites

Creates a pending invitation for the specified email address. The API records the invite; the invited person joins the team by accepting it. Answers 201 Created.

Required scope: invites:write

Request Body

  • emailstringRequired

    Valid email address of the person to invite

Errors (7)
StatusTypeMeaning
400validation-errorThe request failed validation
400idempotency-key-invalidThe Idempotency-Key header is not valid
401unauthorizedThe API key is missing or invalid
403forbiddenThe API key lacks the required scope
409conflictThe resource's state prevents this request
409idempotency-key-in-useA request with this idempotency key is still being processed
422idempotency-key-reusedThis idempotency key was already used for a different request
Response fields (201)
  • dataobjectRequired
    Show nested fields
    • inviteobjectRequired
      Show nested fields
      • idstringRequired
      • emailstringRequired
      • senderIdstringRequired
      • teamIdstringRequired
      • acceptedAtinteger | nullRequired

        When accepted; null while pending

      • createdAtintegerRequired

        Epoch milliseconds

      • updatedAtintegerRequired

        Epoch milliseconds

  • metaobjectRequired
    Show nested fields
    • requestIdstringRequired

      Format: uuid.

    • timestampstringRequired

      Format: date-time.

cURL

Terminal
curl -X POST https://uptime.sergiodxa.com/api/v1/invites \
  -H "Authorization: Bearer uptime_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"email": "newuser@example.com"}'
request.js
let response = await fetch("https://uptime.sergiodxa.com/api/v1/invites", {
	method: "POST",
	headers: {
		"Authorization": "Bearer uptime_your_api_key",
		"Content-Type": "application/json",
	},
	body: JSON.stringify({
		"email": "newuser@example.com"
	}),
});
let result = await response.json();

Response

json
{
	"data": {
		"invite": {
			"id": "inv_ghi789",
			"email": "newuser@example.com",
			"senderId": "usr_xyz789",
			"teamId": "team_def456",
			"acceptedAt": null,
			"createdAt": 1771087500000,
			"updatedAt": 1771087500000
		}
	},
	"meta": {
		"requestId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
		"timestamp": "2026-02-14T16:45:00.000Z"
	}
}

DELETE /api/v1/invites/:id

Revokes a pending invitation, so the invited user can no longer join the team with it. An invite that was already accepted stays in place and answers 409 conflict.

Required scope: invites:write

Path Parameters

  • idstring

    The invite ID to delete

Errors (5)
StatusTypeMeaning
400validation-errorThe request failed validation
401unauthorizedThe API key is missing or invalid
403forbiddenThe API key lacks the required scope
404not-foundThe resource does not exist
409conflictThe resource's state prevents this request
Response fields (200)
  • dataobjectRequired
    Show nested fields
    • deletedtrueRequired
  • metaobjectRequired
    Show nested fields
    • requestIdstringRequired

      Format: uuid.

    • timestampstringRequired

      Format: date-time.

cURL

Terminal
curl -X DELETE https://uptime.sergiodxa.com/api/v1/invites/inv_ghi789 \
  -H "Authorization: Bearer uptime_your_api_key"
request.js
let response = await fetch("https://uptime.sergiodxa.com/api/v1/invites/inv_ghi789", {
	method: "DELETE",
	headers: {
		"Authorization": "Bearer uptime_your_api_key",
	},
});
let result = await response.json();

Response

json
{
	"data": {
		"deleted": true
	},
	"meta": {
		"requestId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
		"timestamp": "2026-02-14T17:00:00.000Z"
	}
}
Documentation