---
title: Accounts API reference
description: API reference for managing account information and users.
url: https://docs.honeybadger.io/api/accounts/
---

In Honeybadger, all resources are tied to an account. A user may belong to one or more accounts (for instance, you can have a work account and a personal account). The Accounts API allows you to programmatically fetch details about your accounts.

## Get all accounts

```bash
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/accounts/
```

Returns a list of all accounts the authenticated user belongs to.

```json
{
  "results": [
    {
      "id": "Me3upk",
      "email": "homerjsimpson@gmail.com",
      "name": "homer",
      "active": true,
      "parked": false
    },
    {
      "id": "9bYfrm",
      "email": "homer.j@simpsons.io",
      "name": "Work",
      "active": true,
      "parked": false
    }
  ],
  "links": {
    "self": "http://localhost:3000/v2/accounts"
  }
}
```

## Get info for one account

```bash
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/accounts/ID
```

Returns info about an account, including the quota consumption for the current month. Each of the three sets of quota info is returned as an array of arrays, with one date & count pair for each day of the month, starting at midnight UTC on the first of the month. The different types of stats are as follows:

* Stored: The number of error notifications saved and available for display in the UI
* Limited: The number of notifications that were discarded due to throttling (429 responses)
* Ignored: Notifications discarded as a result of errors being flagged as ignored in the UI

The quota\_consumed value is a percentage, so `0.75` would mean 75% of the month’s quota has been consumed. The quota resets at the first of the month.

```json
{
  "id": "Me3upk",
  "email": "homerjsimpson@gmail.com",
  "name": "homer",
  "active": true,
  "parked": false,
  "quota_consumed": 0.75,
  "api_stats": {
    "stored": [
      [ 1648767600, 116 ],
      [ 1648771200, 65 ],
      ...
    ],
    "limited": [],
    "ignored": []
  }
}
```

## Get a list of account users or user details

```bash
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/accounts/ID/users
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/accounts/ID/users/ID
```

Returns all the users or a single user for the given account:

```json
{
  "results": [
    {
      "id": 1,
      "role": "Owner",
      "name": "",
      "email": "westley@example.com"
    }
  ]
}
```

## Update a user

```bash
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' -d '{"user":{"role":"Admin"}}' https://app.honeybadger.io/v2/accounts/ID/users/ID
```

The list of valid fields is as follows:

| Field name | Type   | Description                                     |
| ---------- | ------ | ----------------------------------------------- |
| `role`     | string | One of “Member”, “Billing”, “Admin”, or “Owner” |

## Remove a user from the account

```bash
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/accounts/ID/users/ID
```

## Create an invitation for a user to join an account

```bash
curl -u AUTH_TOKEN: -X POST -H 'Content-type: application/json' \
  -d '{"invitation":{"email":"inigo@example.com"}}' \
  https://app.honeybadger.io/v2/accounts/ID/invitations
```

You can specify these fields:

| Field name | Type   | Description                                               |
| ---------- | ------ | --------------------------------------------------------- |
| `email`    | string | The invited user’s email address.                         |
| `role`     | string | One of “Member”, “Billing”, “Admin”, or “Owner”           |
| `team_ids` | array  | Array of team ids to which the invited user will be added |

Returns the created user invitation:

```json
{
  "id": 9,
  "email": "inigo@example.com",
  "created_by": {
    "email": "westley@example.com",
    "name": "Westley"
  },
  "accepted_by": null,
  "role": "Member",
  "accepted_at": null,
  "created_at": "2013-01-08T15:42:16Z",
  "team_ids": []
}
```

## Update an account invitation

```bash
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' \
  -d '{"invitation":{"role": "Admin"}}' \
  https://app.honeybadger.io/v2/accounts/ID/invitations/ID
```

You can specify either of these fields:

| Field name | Type   | Description                                               |
| ---------- | ------ | --------------------------------------------------------- |
| `role`     | string | One of “Member”, “Billing”, “Admin”, or “Owner”           |
| `team_ids` | array  | Array of team ids to which the invited user will be added |

## Get an account invitation list or account invitation details

```bash
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/accounts/ID/invitations
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/accounts/ID/invitations/ID
```

Returns a list of account invitations or a single account invitation for the given account:

```json
{
  "results": [
    {
      "id": 9,
      "email": "inigo@example.com",
      "created_by": {
        "email": "westley@example.com",
        "name": "Westley"
      },
      "accepted_by": {
        "email": "inigo@example.com",
        "name": "Inigo Montoya"
      },
      "role": "Member",
      "accepted_at": "2013-01-08T15:42:41Z",
      "created_at": "2013-01-08T15:42:16Z",
      "team_ids": []
    }
  ]
}
```

## Delete an account invitation

```bash
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/accounts/ID/invitations/ID
```

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
