{"openapi":"3.1.0","info":{"title":"Halfpenny Mac API","version":"1.2.0","summary":"Manage your rented Macs: list them, check they are online, fetch credentials, restart, rotate passwords, update macOS. Order another Mac on the card on file. Open and reply to support tickets.","description":"Base URL: https://halfpennymac.com/api/v1. JSON in and out.\n\nAuthenticate with a personal access token from Account → API on the dashboard: `Authorization: Bearer hpm_…`.\n\nScopes: **read** (list your machines, their status, actions and the catalogue); **connect** (fetch credentials: the macos password, tailscale invite and ssh relay key); **manage** (restart, rotate the password and update macos); **support** (open and reply to support tickets); **order** (order a mac on your saved card, up to the limit you set on this token, and read the catalogue).\n\nA token acts as its user. Macs shared with you as a team member appear with role \"member\": you can read and connect, not restart.\n\nThe support scope stands alone: it reaches only /tickets, and no other scope does. Give an agent a support-only token and it can reach a person without being able to touch a Mac.\n\nThe order scope stands alone too: it reaches only /orders. An order is charged to the card already on file (the API never takes card details), and each token carries a limit, set when it is made, on how many Macs it may order. An order is followed rather than instant: POST /orders, then poll GET /orders/{id} until it is delivered. In-stock tiers are online within the hour, built-to-order ones within 48 hours.\n\nEvery response carries X-Request-Id (quote it when you write to support, on the dashboard or with POST /tickets) and X-RateLimit-* headers; 120 requests a minute per token.\n\nThe ticket writes take an `Idempotency-Key` header of your own, so a retry after a timeout does not open or post twice. On POST /orders the header is required.\n\nErrors: one shape, `{ \"error\": { \"code\", \"message\", \"details\"? } }`. `unauthenticated` 401, `forbidden` 403, `insufficient_scope` 403, `not_found` 404, `invalid_input` 400, `conflict` 409, `locked` 423, `awaiting_payment` 402, `payment_method_required` 402, `subscription_ended` 410, `rate_limited` 429, `service_error` 500.\n\nAlso available: the `halfpenny` CLI and MCP server, `npx halfpennymac --help` (https://www.npmjs.com/package/halfpennymac).","contact":{"name":"Halfpenny Mac support","email":"team@halfpennymac.com","url":"https://halfpennymac.com/account/support"}},"servers":[{"url":"https://halfpennymac.com/api/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"account","description":"The token and the account it acts for."},{"name":"machines","description":"Your rented Macs."},{"name":"actions","description":"Restarts and password rotations run asynchronously; poll an Action for the result."},{"name":"catalog","description":"Tiers, prices and stock."},{"name":"order","description":"Order a Mac on the card on file, follow the order, cancel it before handover (scope: order)."},{"name":"support","description":"Support tickets: the same inbox as the dashboard, answered by people (scope: support)."}],"paths":{"/me":{"get":{"tags":["account"],"operationId":"getMe","summary":"Who the token acts as","description":"Any scope. The user, and the token name and scopes.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"No or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/machines":{"get":{"tags":["machines"],"operationId":"listMachines","summary":"List your machines","description":"Newest first. Includes machines shared with you as a team member. Cancelled requests are left out unless `include=cancelled`.","parameters":[{"name":"include","in":"query","schema":{"type":"string","enum":["cancelled"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachinesResponse"}}}},"401":{"description":"No or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/machines/{id}":{"get":{"tags":["machines"],"operationId":"getMachine","summary":"One machine","parameters":[{"name":"id","in":"path","required":true,"description":"The machine id (a UUID) or its name, e.g. mini-01-123.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MachineResponse"}}}},"404":{"description":"Not yours or does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/machines/{id}/status":{"get":{"tags":["machines"],"operationId":"getMachineStatus","summary":"Live checks: online, invite accepted, connected before, restart phase","parameters":[{"name":"id","in":"path","required":true,"description":"The machine id (a UUID) or its name, e.g. mini-01-123.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"409":{"description":"Not delivered yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/machines/{id}/credentials":{"post":{"tags":["machines"],"operationId":"getMachineCredentials","summary":"Credentials (scope: connect)","description":"The macOS username and password, the Tailscale host and invite, and the SSH relay key when one exists. Logged like a dashboard reveal. Treat the response as a secret.","parameters":[{"name":"id","in":"path","required":true,"description":"The machine id (a UUID) or its name, e.g. mini-01-123.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsResponse"}}}},"402":{"description":"First payment not completed (details.checkout_url)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Token lacks the connect scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"Subscription ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/machines/{id}/actions":{"get":{"tags":["actions"],"operationId":"listMachineActions","summary":"Recent actions on a machine","parameters":[{"name":"id","in":"path","required":true,"description":"The machine id (a UUID) or its name, e.g. mini-01-123.","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionsResponse"}}}}}}},"/machines/{id}/actions/{command}":{"post":{"tags":["actions"],"operationId":"runMachineAction","summary":"Restart, or rotate the macOS password (scope: manage)","description":"Owners only. `restart` has a 10-minute cooldown and is refused while FileVault is on (the Mac could not come back unattended). `rotate_password` issues a new password; fetch it from /credentials once the action succeeds.","parameters":[{"name":"id","in":"path","required":true,"description":"The machine id (a UUID) or its name, e.g. mini-01-123.","schema":{"type":"string"}},{"name":"command","in":"path","required":true,"schema":{"type":"string","enum":["restart","rotate_password"]}}],"responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResponse"}}}},"403":{"description":"Team member, or token lacks the manage scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Cooldown, FileVault on, or not delivered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"423":{"description":"An action is already running on this machine","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/machines/{id}/macos-update":{"post":{"tags":["actions"],"operationId":"updateMacos","summary":"Install pending macOS updates (scope: manage)","description":"Minor updates install (with a restart where needed); a major upgrade is reported in major_available but never installed by this call.","parameters":[{"name":"id","in":"path","required":true,"description":"The machine id (a UUID) or its name, e.g. mini-01-123.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MacosUpdateResponse"}}}},"409":{"description":"Not updatable from here, or FileVault on","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/actions/{id}":{"get":{"tags":["actions"],"operationId":"getAction","summary":"One action","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionResponse"}}}},"404":{"description":"No such action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/catalog":{"get":{"tags":["catalog"],"operationId":"getCatalog","summary":"Tiers, prices and stock (scope: read or order)","parameters":[{"name":"currency","in":"query","schema":{"type":"string","enum":["gbp","usd"]},"description":"Preview currency; a billing currency already on the account wins."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}}}}},"/orders":{"get":{"tags":["order"],"operationId":"listOrders","summary":"List orders placed over the API (scope: order)","description":"Newest first, with `allowance`: how many Macs this token may order, how many it has, and whether a card is on file. Orders placed on the dashboard are not listed here; once delivered, every Mac is under GET /machines.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersResponse"}}}},"403":{"description":"Token lacks the order scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["order"],"operationId":"placeOrder","summary":"Order a Mac on the card on file (scope: order)","description":"Orders one machine, billed monthly to the card already on the account. Tiers the catalogue marks `orderable` can be ordered: in stock (claimed, charged and online within the hour) or built to order (queued, online within 48 hours, charged when the Mac is reserved). The answer is the order as it stands when the call returns; poll GET /orders/{id} until `status` is delivered, then use the same id with GET /machines/{id}. Refused with 402 when there is no card on file, 403 when the token has used its order limit, and 409 for a special order (deposit and minimum term), which is placed on the dashboard. The Mac Studios are quoted, not ordered.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Required on an order. Any string of your own, up to 255 printable characters with no spaces (a UUID is a good choice). Send the same key when you retry: you get the first order back and never a second Mac. The key stays tied to its order for good. The same key with a different order is refused with 409.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewOrder"}}}},"responses":{"200":{"description":"Ordered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"400":{"description":"No Idempotency-Key, an unknown tier or bundle, or a discount code that is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"No card on file (payment_method_required); a person adds one on the dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Token lacks the order scope, or has used its order limit (details.reason order_limit_reached)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A special-order tier (details.reason special_order), or the Idempotency-Key is still running or was used for a different order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orders/{id}":{"get":{"tags":["order"],"operationId":"getOrder","summary":"One order: where it stands (scope: order)","description":"Poll this after POST /orders; once a minute is plenty. `detail` says in a sentence what is happening and what, if anything, to do.","parameters":[{"name":"id","in":"path","required":true,"description":"The order id (a UUID), as returned by POST /orders and listed by GET /orders.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"404":{"description":"Not an order placed over the API on this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orders/{id}/cancel":{"post":{"tags":["order"],"operationId":"cancelOrder","summary":"Cancel an order before handover (scope: order)","description":"Works while nothing has been charged (`cancellable` is true: queued, payment_required or payment_failed). An open first payment is cancelled with it. Safe to repeat: an order already cancelled comes back unchanged. A cancelled order no longer counts against the token's limit. Once a Mac is paid for or handed over this is refused with 409: ending a rental is done on the dashboard.","parameters":[{"name":"id","in":"path","required":true,"description":"The order id (a UUID), as returned by POST /orders and listed by GET /orders.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"404":{"description":"Not an order placed over the API on this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Already paid, being set up or handed over","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tickets":{"get":{"tags":["support"],"operationId":"listTickets","summary":"List your support tickets (scope: support)","description":"Newest activity first. `status` is open (with us), waiting_user (we replied, your move) or resolved. `unread_reply` is true when we have replied since the ticket was last read.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketsResponse"}}}},"403":{"description":"Token lacks the support scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["support"],"operationId":"openTicket","summary":"Open a support ticket (scope: support)","description":"Opens a ticket as you, exactly as the dashboard does: it lands in the same inbox, the team is notified, and replies come back on the ticket and by email. Reply with POST /tickets/{id}/messages rather than opening another ticket about the same thing. At most 10 new tickets an hour per account. Send an Idempotency-Key so a retry cannot open it twice.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string of your own, up to 255 printable characters with no spaces (a UUID is a good choice). Send the same key when you retry: the first successful response comes back again with `Idempotency-Replayed: true` and nothing is done twice. Kept for 24 hours, per account. A failed request does not use up its key. The same key with a different request is refused with 409.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTicket"}}}},"responses":{"200":{"description":"Opened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"400":{"description":"Empty subject or body, or over the maximum length","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Token lacks the support scope","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The Idempotency-Key is still running, or was used for a different request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Ten tickets already opened this hour","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tickets/{id}":{"get":{"tags":["support"],"operationId":"getTicket","summary":"One ticket with its messages (scope: support)","description":"Messages oldest first, each with author_role (user or admin). Attachments are listed by name and size only. Reading a ticket marks it seen, as opening it on the dashboard does.","parameters":[{"name":"id","in":"path","required":true,"description":"The ticket id (a UUID), as listed by GET /tickets.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"404":{"description":"Not yours or does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/tickets/{id}/messages":{"post":{"tags":["support"],"operationId":"replyToTicket","summary":"Reply on a ticket (scope: support)","description":"Posts your reply and notifies the team. A waiting_user ticket goes back to open. A resolved ticket is refused with 409: open a new ticket to follow up. Send an Idempotency-Key so a retry cannot post it twice.","parameters":[{"name":"id","in":"path","required":true,"description":"The ticket id (a UUID), as listed by GET /tickets.","schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string of your own, up to 255 printable characters with no spaces (a UUID is a good choice). Send the same key when you retry: the first successful response comes back again with `Idempotency-Replayed: true` and nothing is done twice. Kept for 24 hours, per account. A failed request does not use up its key. The same key with a different request is refused with 409.","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTicketMessage"}}}},"responses":{"200":{"description":"Posted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketMessageResponse"}}}},"400":{"description":"Empty body, or over the maximum length","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not yours or does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Ticket is resolved, or the Idempotency-Key is still running or was used for a different request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"hpm_… personal access token"}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthenticated","forbidden","insufficient_scope","not_found","invalid_input","conflict","locked","awaiting_payment","payment_method_required","subscription_ended","rate_limited","service_error"]},"message":{"type":"string"},"details":{"description":"Depends on the code: invalid_input has fields[{name,message}], awaiting_payment has checkout_url, insufficient_scope has required and granted, payment_method_required has dashboard_url, forbidden on an order has reason order_limit_reached with limit and used."}}}}},"MeResponse":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":["string","null"]},"customer_since":{"type":["string","null"],"format":"date-time"}}},"token":{"type":"object","properties":{"id":{"type":"string","description":"hpm_… prefix"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","connect","manage","support","order"]}},"order_limit":{"type":"integer","description":"Only on a token with the order scope: how many Macs it may order."}}}}},"Machine":{"type":"object","description":"A rental. `id` is stable for the life of the rental; `name` is the physical Mac.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"],"examples":["mini-01-123"]},"status":{"type":"string","enum":["pending","provisioning","awaiting_payment","active","ended","cancelled"],"description":"pending: ordered, no Mac assigned yet. provisioning: being set up. awaiting_payment: reserved, first payment outstanding. active: yours to use. ended: subscription lapsed. cancelled: request cancelled."},"role":{"type":"string","enum":["owner","member"]},"tier":{"type":"string"},"tier_label":{"type":"string"},"spec":{"type":["string","null"],"examples":["M2, 16 GB RAM, 512 GB"]},"region":{"type":["string","null"]},"software_bundle":{"type":"string"},"software_bundle_label":{"type":"string"},"online":{"type":["boolean","null"],"description":"From the last heartbeat; null before delivery."},"last_seen_at":{"type":["string","null"],"format":"date-time"},"connected_before":{"type":["boolean","null"]},"platform":{"type":"string","enum":["macos","linux"],"description":"What the machine runs. A Jetson runs Linux (Ubuntu): restart, rotate_password and macos-update do not apply to it, and it has no backups or screen sharing."},"os_version":{"type":["string","null"],"description":"The operating system version the machine last reported."},"macos":{"type":["object","null"],"description":"macOS update state. Null on a Jetson.","properties":{"version":{"type":["string","null"]},"update_available":{"type":"boolean"},"updating":{"type":"boolean"}}},"backups":{"type":"object","properties":{"ok":{"type":["boolean","null"]},"last_success_at":{"type":["string","null"],"format":"date-time"}}},"access":{"type":"object","properties":{"tailscale_host":{"type":["string","null"]},"username":{"type":["string","null"]},"ssh_relay":{"type":["object","null"],"properties":{"host":{"type":"string"},"port":{"type":"integer"},"user":{"type":"string"}}}}},"billing":{"type":["object","null"],"description":"null for a team member.","properties":{"cadence":{"type":"string","enum":["monthly","annual"]},"amount":{"type":["number","null"],"description":"What Stripe charges per interval, after discounts, in major units."},"currency":{"type":"string","enum":["gbp","usd"]},"interval":{"type":["string","null"],"enum":["month","year",null]},"status":{"type":["string","null"],"description":"Stripe subscription status."},"next_bill_at":{"type":["string","null"],"format":"date-time"},"cancel_at":{"type":["string","null"],"format":"date-time"},"trial_until":{"type":["string","null"],"format":"date-time"},"comped":{"type":"boolean"}}},"addons":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"status":{"type":"string"}}}},"shared_by":{"type":["object","null"],"properties":{"email":{"type":"string"},"label":{"type":"string"}}},"created_at":{"type":"string","format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"}}},"MachinesResponse":{"type":"object","properties":{"machines":{"type":"array","items":{"$ref":"#/components/schemas/Machine"}},"meta":{"type":"object","properties":{"total":{"type":"integer"}}}}},"MachineResponse":{"type":"object","properties":{"machine":{"$ref":"#/components/schemas/Machine"}}},"StatusResponse":{"type":"object","properties":{"status":{"type":"object","properties":{"machine_id":{"type":"string","format":"uuid"},"online":{"type":["boolean","null"]},"invite_accepted":{"type":["boolean","null"]},"connected_before":{"type":"boolean"},"last_heartbeat_at":{"type":["string","null"],"format":"date-time"},"restart":{"type":"object","properties":{"phase":{"type":"string","enum":["none","queued","restarting","online","late","failed"]},"at":{"type":["string","null"],"format":"date-time"}}},"checked_at":{"type":"string","format":"date-time"}}}}},"CredentialsResponse":{"type":"object","properties":{"credentials":{"type":"object","properties":{"machine_id":{"type":"string","format":"uuid"},"username":{"type":"string"},"password":{"type":"string"},"tailscale":{"type":"object","properties":{"host":{"type":"string"},"invite_url":{"type":["string","null"]},"invite_state":{"type":"string","enum":["legacy","personal","sending","accepted","unavailable"]}}},"ssh_relay":{"type":["object","null"],"properties":{"host":{"type":"string"},"port":{"type":"integer"},"user":{"type":"string"},"target_host":{"type":"string"},"ports":{"type":"array","items":{"type":"integer"}},"private_key":{"type":"string","description":"OpenSSH private key for the relay; save it with mode 600."}}},"rotating":{"type":"boolean","description":"A password rotation is in flight; the password shown is about to change."},"role":{"type":"string"},"note":{"type":["string","null"]},"how_to_connect":{"type":"array","items":{"type":"string"}}}}}},"Action":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"machine_id":{"type":"string","format":"uuid"},"command":{"type":"string","enum":["restart","rotate_password","update_macos","install_bundle"]},"status":{"type":"string","enum":["queued","running","success","error","cancelled"]},"phase":{"type":["string","null"],"description":"Restart only: none, queued, restarting, online, late, failed."},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"]}}},"ActionResponse":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/Action"}}},"ActionsResponse":{"type":"object","properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"}},"meta":{"type":"object","properties":{"total":{"type":"integer"}}}}},"MacosUpdateResponse":{"type":"object","properties":{"macos_update":{"type":"object","properties":{"up_to_date":{"type":"boolean"},"updates":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"version":{"type":["string","null"]}}}},"major_available":{"type":["object","null"],"properties":{"label":{"type":"string"},"version":{"type":["string","null"]}}},"restart_queued":{"type":"boolean"},"declarative":{"type":"boolean","description":"macOS 27+: the Mac installs by a deadline on its own."},"deadline_minutes":{"type":["integer","null"]},"note":{"type":["string","null"]}}}}},"CatalogResponse":{"type":"object","properties":{"catalog":{"type":"object","properties":{"currency":{"type":"string","enum":["gbp","usd"]},"tiers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["mac","ai"]},"spec":{"type":"string"},"availability":{"type":"string","enum":["in_stock","built_to_order","special_order","quote"]},"lead_time":{"type":"string"},"orderable":{"type":"boolean","description":"POST /orders will take this tier right now."},"price":{"type":"object","properties":{"currency":{"type":"string"},"monthly":{"type":"number"},"annual_total":{"type":"number"},"annual_monthly":{"type":"number"},"vat_rate":{"type":"number"},"monthly_inc_vat":{"type":["number","null"]}}},"special_order":{"type":["object","null"],"properties":{"deposit":{"type":"number"},"minimum_months":{"type":"integer"}}}}}},"addons":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"spec":{"type":"string"},"price":{"type":"object"}}}},"notes":{"type":"array","items":{"type":"string"}}}}}},"Order":{"type":"object","description":"An order placed over the API. `id` is also the machine id once delivered.","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","payment_required","payment_failed","configuring","delivered","cancelled","ended"],"description":"queued: built to order, online within 48 hours, not charged yet. configuring: paid and being set up, usually within the hour. payment_required: the card needs a person (open payment_url). payment_failed: the first payment was not completed, nothing charged, no Mac held. delivered: handed over, see GET /machines/{id}. cancelled: cancelled before handover, nothing charged. ended: handed over and the rental has since ended."},"detail":{"type":"string","description":"One sentence on where the order stands and what, if anything, to do."},"tier":{"type":"string"},"tier_label":{"type":"string"},"software_bundle":{"type":"string"},"software_bundle_label":{"type":"string"},"price":{"type":"object","description":"List price per month, before any discount code and before UK VAT.","properties":{"currency":{"type":"string","enum":["gbp","usd"]},"monthly":{"type":"number"}}},"promo_code":{"type":["string","null"]},"lead_time":{"type":["string","null"],"description":"Set while the order is queued or configuring."},"expected_by":{"type":["string","null"],"format":"date-time","description":"Queued orders: when the Mac is due online at the latest (48 hours from the order)."},"payment_url":{"type":["string","null"],"format":"uri","description":"payment_required only: the page where a person completes the first payment."},"machine":{"type":["object","null"],"description":"Set once delivered.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]}}},"cancellable":{"type":"boolean","description":"Nothing has been charged, so POST /orders/{id}/cancel will work."},"created_at":{"type":"string","format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"url":{"type":"string","format":"uri","description":"The dashboard, for a person to open."}}},"OrderAllowance":{"type":"object","description":"What this token may still order.","properties":{"limit":{"type":"integer","description":"How many Macs this token may order in its lifetime, set when the token was made."},"used":{"type":"integer","description":"Orders this token has placed, less any cancelled before handover."},"remaining":{"type":"integer"},"card_on_file":{"type":["boolean","null"],"description":"Whether there is a card to charge. null when it could not be checked."}}},"NewOrder":{"type":"object","required":["tier"],"properties":{"tier":{"type":"string","enum":["budget","starter","pro","max","m5pro48","jetson"],"description":"A tier key from GET /catalog that is marked orderable."},"software_bundle":{"type":"string","enum":["bare","ios","ai","browser","agent","openclaw","jetson"],"description":"What is set up on it before handover. Leave out for the default (bare on a Mac). A Mac takes bare, ios, ai, browser, agent or openclaw."},"billing_cadence":{"type":"string","enum":["monthly"],"description":"Orders over the API bill monthly."},"use_case":{"type":"string","maxLength":500,"description":"Optional: what the Mac is for. Helps us set it up well."},"promo_code":{"type":"string","maxLength":40,"description":"Optional discount code."}}},"OrdersResponse":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"allowance":{"$ref":"#/components/schemas/OrderAllowance"},"meta":{"type":"object","properties":{"total":{"type":"integer"}}}}},"OrderResponse":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"}}},"Ticket":{"type":"object","description":"A support ticket on your account.","properties":{"id":{"type":"string","format":"uuid"},"subject":{"type":"string"},"status":{"type":"string","enum":["open","waiting_user","resolved"],"description":"open: with us. waiting_user: we replied, your move. resolved: closed; open a new ticket to follow up."},"unread_reply":{"type":"boolean","description":"We replied since the ticket was last read, on the dashboard or over the API."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"last_message_at":{"type":"string","format":"date-time"},"url":{"type":"string","format":"uri","description":"The thread on the dashboard, for a person to open."},"messages":{"type":"array","description":"Only on GET /tickets/{id} and the write calls; oldest first.","items":{"$ref":"#/components/schemas/TicketMessage"}}}},"TicketMessage":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"author_role":{"type":"string","enum":["user","admin"],"description":"user: you (dashboard or API). admin: the Halfpenny Mac team."},"body":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"attachments":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size_bytes":{"type":"integer"}}},"description":"Screenshots attached on the dashboard, by name and size; the files themselves are on the dashboard thread."}}},"NewTicket":{"type":"object","required":["subject","body"],"properties":{"subject":{"type":"string","minLength":1,"maxLength":200,"description":"One line: what it is about."},"body":{"type":"string","minLength":1,"maxLength":10000,"description":"What you need, what you tried, which machine (its name), and any X-Request-Id. Plain text."}}},"NewTicketMessage":{"type":"object","required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":10000,"description":"Plain text."}}},"TicketsResponse":{"type":"object","properties":{"tickets":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}},"meta":{"type":"object","properties":{"total":{"type":"integer"}}}}},"TicketResponse":{"type":"object","properties":{"ticket":{"$ref":"#/components/schemas/Ticket"}}},"TicketMessageResponse":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/TicketMessage"},"ticket":{"$ref":"#/components/schemas/Ticket"}}}}}}