> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# mailtrap-accounts

> Mailtrap Accounts - account management, API tokens, billing, organizations, and permissions

**Server path:** `/mailtrap-accounts` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                                      | Description                         |
| --------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| [`mailtrap_accounts_create_api_token`](#mailtrap_accounts_create_api_token)                               | Create API token                    |
| [`mailtrap_accounts_create_organization_sub_account`](#mailtrap_accounts_create_organization_sub_account) | Create organization sub account     |
| [`mailtrap_accounts_delete_account_access_by_id`](#mailtrap_accounts_delete_account_access_by_id)         | Remove account access               |
| [`mailtrap_accounts_delete_api_token`](#mailtrap_accounts_delete_api_token)                               | Delete API token                    |
| [`mailtrap_accounts_get_account_billing_usage`](#mailtrap_accounts_get_account_billing_usage)             | Get current billing cycle usage     |
| [`mailtrap_accounts_get_all_accounts`](#mailtrap_accounts_get_all_accounts)                               | List account(s) you have access to  |
| [`mailtrap_accounts_get_all_users_in_account`](#mailtrap_accounts_get_all_users_in_account)               | List User & Invite account accesses |
| [`mailtrap_accounts_get_api_token`](#mailtrap_accounts_get_api_token)                                     | Get API token                       |
| [`mailtrap_accounts_get_organization_sub_accounts`](#mailtrap_accounts_get_organization_sub_accounts)     | Get organization sub accounts       |
| [`mailtrap_accounts_get_resources`](#mailtrap_accounts_get_resources)                                     | Get resources                       |
| [`mailtrap_accounts_list_api_tokens`](#mailtrap_accounts_list_api_tokens)                                 | List API tokens                     |
| [`mailtrap_accounts_reset_api_token`](#mailtrap_accounts_reset_api_token)                                 | Reset API token                     |
| [`mailtrap_accounts_update_user_permissions`](#mailtrap_accounts_update_user_permissions)                 | Manage user or token permissions    |

***

## mailtrap\_accounts\_create\_api\_token

Create API token

**Parameters:**

| Parameter    | Type      | Required | Default | Description                        |
| ------------ | --------- | -------- | ------- | ---------------------------------- |
| `account_id` | integer   | Yes      | —       | Unique account ID                  |
| `name`       | string    | Yes      | —       | Display name for the token         |
| `resources`  | object\[] | No       | —       | Permissions to assign to the token |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      },
      "name": {
        "type": "string",
        "description": "Display name for the token"
      },
      "resources": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "resource_type": {
              "type": "string",
              "enum": [
                "account",
                "project",
                "inbox",
                "sending_domain"
              ],
              "description": "Resource type for API token permissions."
            },
            "resource_id": {
              "description": "Resource Id"
            },
            "access_level": {
              "type": "integer",
              "enum": [
                10,
                100
              ],
              "description": "10 = viewer, 100 = admin."
            }
          },
          "required": [
            "resource_type",
            "resource_id",
            "access_level"
          ]
        },
        "description": "Permissions to assign to the token"
      }
    },
    "required": [
      "PCID",
      "account_id",
      "name"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_create\_organization\_sub\_account

Create organization sub account

**Parameters:**

| Parameter         | Type    | Required | Default | Description            |
| ----------------- | ------- | -------- | ------- | ---------------------- |
| `organization_id` | integer | Yes      | —       | Unique organization ID |
| `account`         | object  | Yes      | —       | The account value      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "organization_id": {
        "type": "integer",
        "description": "Unique organization ID"
      },
      "account": {
        "type": "object",
        "description": "The account value",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the sub account to create"
          }
        },
        "required": [
          "name"
        ]
      }
    },
    "required": [
      "PCID",
      "organization_id",
      "account"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_delete\_account\_access\_by\_id

Remove account access

**Parameters:**

| Parameter           | Type    | Required | Default | Description              |
| ------------------- | ------- | -------- | ------- | ------------------------ |
| `account_id`        | integer | Yes      | —       | Unique account ID        |
| `account_access_id` | integer | Yes      | —       | Unique account access ID |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      },
      "account_access_id": {
        "type": "integer",
        "description": "Unique account access ID"
      }
    },
    "required": [
      "PCID",
      "account_id",
      "account_access_id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_delete\_api\_token

Delete API token

**Parameters:**

| Parameter    | Type    | Required | Default | Description       |
| ------------ | ------- | -------- | ------- | ----------------- |
| `account_id` | integer | Yes      | —       | Unique account ID |
| `id`         | integer | Yes      | —       | API token ID      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      },
      "id": {
        "type": "integer",
        "description": "API token ID"
      }
    },
    "required": [
      "PCID",
      "account_id",
      "id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_get\_account\_billing\_usage

Get current billing cycle usage

**Parameters:**

| Parameter    | Type    | Required | Default | Description       |
| ------------ | ------- | -------- | ------- | ----------------- |
| `account_id` | integer | Yes      | —       | Unique account ID |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      }
    },
    "required": [
      "PCID",
      "account_id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_get\_all\_accounts

List account(s) you have access to

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_get\_all\_users\_in\_account

List User & Invite account accesses

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                                      |
| ------------- | --------- | -------- | ------- | ---------------------------------------------------------------- |
| `account_id`  | integer   | Yes      | —       | Unique account ID                                                |
| `project_ids` | string\[] | No       | —       | The identifiers of the projects for which to include the results |
| `inbox_ids`   | string\[] | No       | —       | The identifiers of the inboxes for which to include the results  |
| `domain_ids`  | string\[] | No       | —       | The identifiers of the domains for which to include the results  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      },
      "project_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The identifiers of the projects for which to include the results"
      },
      "inbox_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The identifiers of the inboxes for which to include the results"
      },
      "domain_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The identifiers of the domains for which to include the results"
      }
    },
    "required": [
      "PCID",
      "account_id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_get\_api\_token

Get API token

**Parameters:**

| Parameter    | Type    | Required | Default | Description       |
| ------------ | ------- | -------- | ------- | ----------------- |
| `account_id` | integer | Yes      | —       | Unique account ID |
| `id`         | integer | Yes      | —       | API token ID      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      },
      "id": {
        "type": "integer",
        "description": "API token ID"
      }
    },
    "required": [
      "PCID",
      "account_id",
      "id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_get\_organization\_sub\_accounts

Get organization sub accounts

**Parameters:**

| Parameter         | Type    | Required | Default | Description            |
| ----------------- | ------- | -------- | ------- | ---------------------- |
| `organization_id` | integer | Yes      | —       | Unique organization ID |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "organization_id": {
        "type": "integer",
        "description": "Unique organization ID"
      }
    },
    "required": [
      "PCID",
      "organization_id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_get\_resources

Get resources

**Parameters:**

| Parameter    | Type    | Required | Default | Description       |
| ------------ | ------- | -------- | ------- | ----------------- |
| `account_id` | integer | Yes      | —       | Unique account ID |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      }
    },
    "required": [
      "PCID",
      "account_id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_list\_api\_tokens

List API tokens

**Parameters:**

| Parameter    | Type    | Required | Default | Description       |
| ------------ | ------- | -------- | ------- | ----------------- |
| `account_id` | integer | Yes      | —       | Unique account ID |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      }
    },
    "required": [
      "PCID",
      "account_id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_reset\_api\_token

Reset API token

**Parameters:**

| Parameter    | Type    | Required | Default | Description       |
| ------------ | ------- | -------- | ------- | ----------------- |
| `account_id` | integer | Yes      | —       | Unique account ID |
| `id`         | integer | Yes      | —       | API token ID      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      },
      "id": {
        "type": "integer",
        "description": "API token ID"
      }
    },
    "required": [
      "PCID",
      "account_id",
      "id"
    ]
  }
  ```
</Expandable>

***

## mailtrap\_accounts\_update\_user\_permissions

Manage user or token permissions

**Parameters:**

| Parameter           | Type      | Required | Default | Description              |
| ------------------- | --------- | -------- | ------- | ------------------------ |
| `account_id`        | integer   | Yes      | —       | Unique account ID        |
| `account_access_id` | integer   | Yes      | —       | Unique account access ID |
| `permissions`       | object\[] | No       | —       | The permissions value    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "account_id": {
        "type": "integer",
        "description": "Unique account ID"
      },
      "account_access_id": {
        "type": "integer",
        "description": "Unique account access ID"
      },
      "permissions": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "resource_id": {
              "type": "string",
              "description": "Resource Id"
            },
            "resource_type": {
              "type": "string",
              "enum": [
                "account",
                "billing",
                "project",
                "inbox",
                "sending_domain",
                "email_campaign_permission_scope"
              ],
              "description": "Resource Type"
            },
            "access_level": {
              "type": "string",
              "description": "Use a number or string. The higher the number, the more rights the specifier has: - 100 or \"admin\" - 10 or \"viewer\""
            },
            "_destroy": {
              "type": "boolean",
              "description": "(Optional) If true, instead of creating/updating the permission, it destroys it."
            }
          }
        },
        "description": "The permissions value"
      }
    },
    "required": [
      "PCID",
      "account_id",
      "account_access_id"
    ]
  }
  ```
</Expandable>
