Docs/API

Reseller

Oh Dear's reseller program allows agencies, hosting providers, and consultants to offer website monitoring services to their clients under their own brand. As a reseller, you can use the API to create and manage multiple client teams, each with their own monitors and users.

To become a reseller, contact us to discuss your needs and how our program can fit into your business model.

All reseller endpoints are prefixed with /api/reseller/{resellerTeamId}/ -- replace with your reseller team's ID.

Example request:

$ OHDEAR_TOKEN="your API token"
$ curl https://ohdear.app/api/reseller/11111/managed-teams \
    -H "Authorization: Bearer $OHDEAR_TOKEN" \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

All endpoints use the same authentication as the regular Oh Dear API.

Managed team response fields #

Every managed team endpoint returns an object with these fields:

{
  "id": 12345,
  "name": "Client Company",
  "timezone": "UTC",
  "created_at": "2024-01-15T10:30:00.000000Z",
  "monitors_count": 5
}
  • id: unique identifier for the team
  • name: the team name
  • timezone: the team's timezone
  • created_at: when the team was created (UTC)
  • monitors_count: number of monitors in this team

Get a managed team #

GET /api/reseller/{resellerTeamId}/managed-teams/{managedTeamId}

Returns a single managed team by its ID. The response follows the managed team shape above.

List all managed teams #

GET /api/reseller/{resellerTeamId}/managed-teams

Returns a paginated list of all teams managed by your reseller account. Each item follows the same managed team shape above.

Query parameters:

  • filter[name] (string, optional) -- filter by team name (partial match)
  • filter[timezone] (string, optional) -- filter by timezone (exact match)
  • sort (string, optional) -- sort by name or created_at (default ordering is by team ID)
  • page[number] (integer, optional) -- page number for pagination
  • page[size] (integer, optional) -- results per page (default 200, max 1000)

Create a managed team #

POST /api/reseller/{resellerTeamId}/managed-teams

Creates a new team managed by your reseller account.

Request body (JSON):

  • name (string, required) -- the name of the team
  • timezone (string, optional) -- team timezone (defaults to reseller's timezone)
  • default_uptime_check_location (string, optional) -- default uptime check location for new monitors

Returns the managed team object.

Decouple a managed team #

POST /api/reseller/{resellerTeamId}/managed-teams/{managedTeamId}/decouple

Removes the reseller relationship from a managed team, making it independent.

When decoupling:

  • The team is no longer managed by your reseller account
  • The team owner receives an email notification
  • All monitors and configuration are retained
  • The team no longer inherits your reseller subscription status; monitoring behavior depends on the managed team's own subscription

Delete a managed team #

DELETE /api/reseller/{resellerTeamId}/managed-teams/{managedTeamId}

Deletes a managed team and all its associated data. This action cannot be undone. All monitors are deleted, all users are detached, and all pending invitations are revoked.

Returns 204 No Content on success.

Add a user to a managed team #

POST /api/reseller/{resellerTeamId}/managed-teams/{managedTeamId}/users

Adds a user to a managed team. If the user doesn't have an Oh Dear account yet, one will be created.

Request body (JSON):

  • email (string, required) -- email address of the user
  • name (string, required) -- full name of the user
  • role (string, required) -- user role. Possible values: admin, member, guest

User roles:

  • admin -- can perform any action
  • member -- can perform all actions except team management
  • guest -- can perform all actions except creating, updating, or deleting monitors
POST /api/reseller/{resellerTeamId}/managed-teams/{managedTeamId}/users/{userId}/generate-login-link

Generates a secure, time-limited login link for a user of a managed team. The link is valid for 5 minutes.

Here's what the response looks like:

{
  "login_url": "https://ohdear.app/reseller-login/98765/12345?expires=1640995200&signature=abc123...",
  "valid_until": "2025-01-01 12:05:00"
}
  • login_url: the one-time login URL
  • valid_until: when the link expires (UTC)

Managing monitors #

Once you've created managed teams, use the standard monitors API to manage monitors for those teams. Pass the managed team's ID as the team_id when creating monitors.

Was this page helpful?

Feel free to reach out via [email protected] or on X via @OhDearApp if you have any other questions. We'd love to help!