# REST API

59 routes under https://prubex.com/api/v1, each running the MCP tool of the same name with the same keys, scopes and approvals. Send an API key as a bearer token. The full description, with every schema: https://prubex.com/openapi.json.

- `GET /api/v1/accounts`: `accounts_list`, List connected accounts.
- `GET /api/v1/accounts/{account_id}`: `accounts_get`, Get one account.
- `GET /api/v1/accounts/{account_id}/health`: `accounts_get_account_health`, Health of one account.
- `POST /api/v1/accounts/{account_id}/move`: `accounts_move_account_to_profile`, Move an account to a profile.
- `POST /api/v1/accounts/{account_id}/pause`: `accounts_pause`, Pause an account.
- `GET /api/v1/accounts/{account_id}/policy`: `policies_get`, Read an account's sending policy.
- `POST /api/v1/accounts/{account_id}/resume`: `accounts_resume`, Resume a paused account.
- `POST /api/v1/accounts/connect-links`: `accounts_generate_connect_link`, Link to connect a new account.
- `GET /api/v1/accounts/health`: `accounts_get_all_accounts_health`, Health of every account.
- `GET /api/v1/approvals`: `approvals_list`, List approval requests.
- `GET /api/v1/approvals/{approval_id}`: `approvals_get`, Check an approval request.
- `POST /api/v1/approvals/{approval_id}/cancel`: `approvals_cancel`, Withdraw an approval request.
- `POST /api/v1/attachments/upload-links`: `attachments_generate_upload_link`, Link for the user to upload files.
- `GET /api/v1/attachments/uploads/{upload_id}`: `attachments_check_upload_status`, Check an upload.
- `GET /api/v1/calendar/agenda`: `calendar_get_agenda`, Day or week agenda.
- `GET /api/v1/calendar/calendars`: `calendar_list_calendars`, List calendars.
- `GET /api/v1/calendar/events`: `calendar_list_events`, List events across calendars.
- `POST /api/v1/calendar/events`: `calendar_create_event`, Create an event.
- `GET /api/v1/calendar/events/{event_id}`: `calendar_get_event`, Get an event.
- `PATCH /api/v1/calendar/events/{event_id}`: `calendar_update_event`, Change an event.
- `DELETE /api/v1/calendar/events/{event_id}`: `calendar_delete_event`, Delete or cancel an event.
- `GET /api/v1/calendar/events/{event_id}/instances`: `calendar_list_event_instances`, Occurrences of a recurring event.
- `POST /api/v1/calendar/events/{event_id}/respond`: `calendar_respond_to_event`, Accept or decline an invitation.
- `POST /api/v1/calendar/free-busy`: `calendar_get_free_busy`, Get free/busy times.
- `POST /api/v1/calendar/meeting-times`: `calendar_find_meeting_times`, Find meeting times.
- `GET /api/v1/docs/search`: `docs_search`, Search the Prubex docs.
- `GET /api/v1/mail/attachments/{attachment_id}`: `mail_get_attachment`, Get an attachment.
- `GET /api/v1/mail/changes`: `mail_list_changes`, What's new since I last looked.
- `POST /api/v1/mail/drafts`: `mail_create_draft`, Create a draft.
- `GET /api/v1/mail/drafts`: `mail_list_drafts`, List drafts.
- `PATCH /api/v1/mail/drafts/{draft_id}`: `mail_update_draft`, Edit a draft.
- `DELETE /api/v1/mail/drafts/{draft_id}`: `mail_delete_draft`, Discard a draft.
- `POST /api/v1/mail/drafts/{draft_id}/send`: `mail_send_draft`, Send a draft.
- `GET /api/v1/mail/folders`: `mail_list_folders`, List folders and labels.
- `POST /api/v1/mail/folders`: `mail_create_folder`, Create a folder.
- `PATCH /api/v1/mail/folders/{folder_id}`: `mail_rename_folder`, Rename a folder.
- `GET /api/v1/mail/labels`: `mail_list_labels`, List labels and categories.
- `GET /api/v1/mail/messages`: `mail_list_messages`, List messages in a folder.
- `GET /api/v1/mail/messages/{message_id}`: `mail_get_message`, Read a message.
- `POST /api/v1/mail/messages/{message_id}/archive`: `mail_archive`, Archive a message.
- `POST /api/v1/mail/messages/{message_id}/flag`: `mail_flag`, Flag or star a message.
- `POST /api/v1/mail/messages/{message_id}/forward`: `mail_forward`, Forward an email.
- `POST /api/v1/mail/messages/{message_id}/labels`: `mail_set_labels`, Add or remove labels.
- `POST /api/v1/mail/messages/{message_id}/move`: `mail_move`, Move a message to a folder.
- `GET /api/v1/mail/messages/{message_id}/raw`: `mail_get_raw`, Get the raw source of a message.
- `POST /api/v1/mail/messages/{message_id}/read`: `mail_mark_read`, Mark read or unread.
- `POST /api/v1/mail/messages/{message_id}/reply`: `mail_reply`, Reply to an email.
- `POST /api/v1/mail/messages/{message_id}/trash`: `mail_trash`, Move a message to Trash.
- `POST /api/v1/mail/search`: `mail_search`, Search mail across accounts.
- `POST /api/v1/mail/send`: `mail_send`, Send an email.
- `GET /api/v1/mail/threads/{thread_id}`: `mail_get_thread`, Read a conversation.
- `POST /api/v1/mail/validate-send`: `mail_validate_send`, Check whether a send is allowed.
- `GET /api/v1/overview`: `prubex_overview`, Overview of your Prubex access.
- `GET /api/v1/profiles`: `profiles_list`, List profiles.
- `POST /api/v1/profiles`: `profiles_create`, Create a profile.
- `GET /api/v1/profiles/{profile_id}`: `profiles_get`, Get one profile.
- `PATCH /api/v1/profiles/{profile_id}`: `profiles_update`, Rename or recolour a profile.
- `DELETE /api/v1/profiles/{profile_id}`: `profiles_delete`, Delete a profile.
- `GET /api/v1/usage`: `usage_get_usage`, Usage and estimated cost.
