{"openapi":"3.1.0","info":{"title":"Ten O'Clock Postman API","version":"1.0.0","description":"Email sorting for Gmail and Outlook, driven from metadata only. Sign-up, mailbox connection and payment are done by a person in the web app; an API key then lets that person's assistant run the day-to-day loop. New keys can draft a cleanup but cannot move mail: pushing requires the 'apply' scope, which the user must switch on deliberately."},"servers":[{"url":"https://www.tenoclockpostman.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"tocp_live_…"}}},"paths":{"/api/me/entitlement":{"get":{"summary":"Remaining sorts and current plan","description":"Remaining sorts and current plan. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts":{"get":{"summary":"List connected mailboxes","description":"List connected mailboxes. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/dashboard":{"get":{"summary":"Overview for one mailbox","description":"Overview for one mailbox. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/changeset":{"get":{"summary":"Read the current proposed cleanup","description":"Read the current proposed cleanup. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/commits":{"get":{"summary":"List applied cleanups","description":"List applied cleanups. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/priority":{"get":{"summary":"Read the priority box","description":"Read the priority box. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/attention":{"get":{"summary":"Messages that need attention","description":"Messages that need attention. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/policy":{"get":{"summary":"Read the sorting rules","description":"Read the sorting rules. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/commits/{id}/preview":{"get":{"summary":"What one applied cleanup did","description":"What one applied cleanup did. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/jobs/{id}":{"get":{"summary":"Poll an async propose or push","description":"Poll an async propose or push. Scope: `read`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/snapshot":{"post":{"summary":"Refresh the mailbox metadata snapshot","description":"Refresh the mailbox metadata snapshot. Scope: `propose`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/propose":{"post":{"summary":"Draft a cleanup (blocking)","description":"Draft a cleanup (blocking). Scope: `propose`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/propose-async":{"post":{"summary":"Draft a cleanup (returns a job id)","description":"Draft a cleanup (returns a job id). Scope: `propose`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/accounts/{id}/triage":{"post":{"summary":"Re-run priority triage","description":"Re-run priority triage. Scope: `propose`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/changesets/{id}/ops/{opId}":{"post":{"summary":"Approve or decline one proposed move","description":"Approve or decline one proposed move. Scope: `propose`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"opId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/changesets/{id}/accept-all":{"post":{"summary":"Mark every operation accepted (does NOT move mail)","description":"Mark every operation accepted (does NOT move mail). Scope: `propose`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/changesets/{id}/discard":{"post":{"summary":"Throw the draft away","description":"Throw the draft away. Scope: `propose`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/changesets/{id}/push":{"post":{"summary":"Apply accepted operations (moves mail)","description":"Apply accepted operations (moves mail). Scope: `apply`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/changesets/{id}/push-async":{"post":{"summary":"Apply accepted operations (returns a job id)","description":"Apply accepted operations (returns a job id). Scope: `apply`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/commits/{id}/revert":{"post":{"summary":"Undo an applied cleanup","description":"Undo an applied cleanup. Scope: `apply`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}},"/api/commits/{id}/restore":{"post":{"summary":"Re-apply a reverted cleanup","description":"Re-apply a reverted cleanup. Scope: `apply`. Requires an API key with the scope shown. Keys are created in the web app under Setup. Send as `Authorization: Bearer tocp_live_…`.","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Missing, invalid or revoked key"},"402":{"description":"Sorting quota reached; the response carries `entitlement`"},"403":{"description":"The key lacks the required scope for this route"},"429":{"description":"Rate limited, either per key or by the mailbox provider"}}}}}}