You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+99Lines changed: 99 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -827,6 +827,105 @@ Get the status of a contact export job. Once `status` is `finished`, the `url` f
827
827
828
828
-`export_id` (required): ID of the contact export job
829
829
830
+
### list-accounts
831
+
832
+
List Mailtrap accounts the current API token can access, with each account's access levels.
833
+
834
+
**Parameters:**
835
+
836
+
- No parameters required
837
+
838
+
### get-billing-usage
839
+
840
+
Get the current billing cycle usage for the account: sending and testing plans, limits, and current counts.
841
+
842
+
**Parameters:**
843
+
844
+
- No parameters required
845
+
846
+
### list-account-accesses
847
+
848
+
List account accesses (users, invites, API tokens) for the account. Optional filters narrow the result to specific resources. Requires account admin/owner permissions.
849
+
850
+
**Parameters:**
851
+
852
+
-`domain_uuids` (optional): Filter by sending domain UUIDs (array of strings)
853
+
-`inbox_ids` (optional): Filter by sandbox inbox IDs (array of strings)
854
+
-`project_ids` (optional): Filter by sandbox project IDs (array of strings)
855
+
856
+
### remove-account-access
857
+
858
+
Remove an account access by ID. For `User` specifiers this revokes their permissions; for `Invite` or `ApiToken` specifiers it removes the specifier entirely. Requires admin/owner.
859
+
860
+
**Parameters:**
861
+
862
+
-`account_access_id` (required): ID of the access record to remove
863
+
864
+
### get-permission-resources
865
+
866
+
Get all resources (inboxes, projects, domains, billing, account) to which the API token has admin access, nested by hierarchy.
867
+
868
+
**Parameters:**
869
+
870
+
- No parameters required
871
+
872
+
### bulk-update-permissions
873
+
874
+
Bulk create, update, or destroy permissions for a single account access. Existing `(resource_type, resource_id)` pairs are updated; new ones are created. Set `destroy: true` on an entry to remove it.
875
+
876
+
**Parameters:**
877
+
878
+
-`account_access_id` (required): Target account access ID
879
+
-`permissions` (required): Array of permission entries. Each has:
880
+
-`resource_id` (required): Resource ID (number or string)
881
+
-`resource_type` (required): One of `account`, `project`, `inbox`, `domain`, `billing`
882
+
-`access_level` (optional): `admin`/`100` or `viewer`/`10`
883
+
-`destroy` (optional, boolean): When true, removes this permission instead of creating/updating it
884
+
885
+
### list-api-tokens
886
+
887
+
List all API tokens for the account.
888
+
889
+
**Parameters:**
890
+
891
+
- No parameters required
892
+
893
+
### create-api-token
894
+
895
+
Create a new API token. The response includes the secret `token` value — this is the **only time** the full token is returned, so store it immediately. If you lose it, recreate the token.
896
+
897
+
**Parameters:**
898
+
899
+
-`name` (required): Display name for the token
900
+
-`resources` (optional): Array of resource permissions to scope the token to. Each entry has:
901
+
-`resource_type` (required): One of `account`, `project`, `inbox`, `domain`, `billing`
902
+
-`resource_id` (required): ID of the resource
903
+
-`access_level` (required): `100` (admin) or `10` (viewer)
904
+
905
+
### get-api-token
906
+
907
+
Get an API token by ID. Returns metadata only — the secret token value is **not** returned here (only from `create-api-token` / `reset-api-token`).
908
+
909
+
**Parameters:**
910
+
911
+
-`api_token_id` (required): ID of the API token
912
+
913
+
### reset-api-token
914
+
915
+
Reset (rotate) an API token by ID. The response includes the **new** secret `token` value — returned only on this call, so store it immediately. The previous token is invalidated.
916
+
917
+
**Parameters:**
918
+
919
+
-`api_token_id` (required): ID of the API token to reset
920
+
921
+
### delete-api-token
922
+
923
+
Permanently delete an API token by ID. The token can no longer authenticate after deletion.
924
+
925
+
**Parameters:**
926
+
927
+
-`api_token_id` (required): ID of the API token to delete
"List Mailtrap accounts accessible to the API token, with each account's access levels.",
872
+
inputSchema: listAccountsSchema,
873
+
handler: listAccounts,
874
+
annotations: {
875
+
readOnlyHint: true,
876
+
},
877
+
},
878
+
{
879
+
name: "get-billing-usage",
880
+
description:
881
+
"Get the current billing cycle usage for the account (sending and testing plans, limits, and current counts).",
882
+
inputSchema: getBillingUsageSchema,
883
+
handler: getBillingUsage,
884
+
annotations: {
885
+
readOnlyHint: true,
886
+
},
887
+
},
888
+
{
889
+
name: "list-account-accesses",
890
+
description:
891
+
"List account accesses (users, invites, API tokens) for the account. Optionally scope by domain UUIDs, inbox IDs, or project IDs. Requires account admin/owner permissions.",
892
+
inputSchema: listAccountAccessesSchema,
893
+
handler: listAccountAccesses,
894
+
annotations: {
895
+
readOnlyHint: true,
896
+
},
897
+
},
898
+
{
899
+
name: "remove-account-access",
900
+
description:
901
+
"Remove an account access by ID. For User specifiers this revokes permissions; for Invite or ApiToken specifiers it removes the specifier itself. Requires admin/owner.",
902
+
inputSchema: removeAccountAccessSchema,
903
+
handler: removeAccountAccess,
904
+
annotations: {
905
+
destructiveHint: true,
906
+
},
907
+
},
908
+
{
909
+
name: "get-permission-resources",
910
+
description:
911
+
"Get all resources (inboxes, projects, domains, billing, account) to which the API token has admin access, nested by hierarchy.",
912
+
inputSchema: getPermissionResourcesSchema,
913
+
handler: getPermissionResources,
914
+
annotations: {
915
+
readOnlyHint: true,
916
+
},
917
+
},
918
+
{
919
+
name: "bulk-update-permissions",
920
+
description:
921
+
"Bulk create, update, or destroy permissions for an account access. Existing (resource_type, resource_id) pairs are updated; new ones are created. Set `destroy: true` to remove.",
922
+
inputSchema: bulkUpdatePermissionsSchema,
923
+
handler: bulkUpdatePermissions,
924
+
annotations: {
925
+
destructiveHint: true,
926
+
},
927
+
},
928
+
{
929
+
name: "list-api-tokens",
930
+
description: "List all API tokens for the account.",
931
+
inputSchema: listApiTokensSchema,
932
+
handler: listApiTokens,
933
+
annotations: {
934
+
readOnlyHint: true,
935
+
},
936
+
},
937
+
{
938
+
name: "create-api-token",
939
+
description:
940
+
"Create a new API token. The response includes the secret `token` value — this is the **only time** the full token is returned, so store it immediately.",
941
+
inputSchema: createApiTokenSchema,
942
+
handler: createApiToken,
943
+
annotations: {
944
+
destructiveHint: true,
945
+
},
946
+
},
947
+
{
948
+
name: "get-api-token",
949
+
description:
950
+
"Get an API token by ID. The secret token value is NOT returned here — only the metadata (name, last 4 digits, resources).",
951
+
inputSchema: apiTokenSchema,
952
+
handler: getApiToken,
953
+
annotations: {
954
+
readOnlyHint: true,
955
+
},
956
+
},
957
+
{
958
+
name: "reset-api-token",
959
+
description:
960
+
"Reset (rotate) an API token by ID. The response includes the **new** secret `token` value — returned only on this call, so store it immediately. The previous token is invalidated.",
961
+
inputSchema: apiTokenSchema,
962
+
handler: resetApiToken,
963
+
annotations: {
964
+
destructiveHint: true,
965
+
},
966
+
},
967
+
{
968
+
name: "delete-api-token",
969
+
description:
970
+
"Permanently delete an API token by ID. The token can no longer authenticate after deletion.",
0 commit comments