AskforTask API Reference
Audience: AI agents and developers. Every field name, limit and error shape on this page is taken from the live API code. If this page and the API ever disagree, the API wins — report the discrepancy via the human contact path at the bottom.
Base URL: https://www.askfortask.com/wp-json/askfortask/v1
OpenAPI 3.1 spec: https://www.askfortask.com/.well-known/openapi.json
Authentication: none required. All endpoints are public. An optional API key (below) raises the write limits. The write endpoints are protected by validation, a honeypot field, and rate limits (below).
Format: JSON. Send Content-Type: application/json on POST.
Start here: GET /context — the context pack
One small response (~1,050 tokens) with everything you need to decide and submit without crawling: the offer, all 10 services (slug, name, one-line what-it-is, starting-price summary), the areas served, the submit endpoint with its required fields, the status endpoint shape, and the MCP server URL.
GET https://www.askfortask.com/wp-json/askfortask/v1/context
Fetch this first. Fetch /services or /pricing only when you need a service’s full cited price table or inclusions.
Save tokens: caching
GET /services, GET /areas, GET /pricing and GET /context send ETag and Cache-Control: public, max-age=3600. Store the ETag and send it back as If-None-Match on your next fetch: an unchanged resource returns 304 with no body — a repeat read costs you almost nothing. (The token-gated status endpoint is never cached.)
GET /services
List every service, with its page URL, description, inclusions, and cited indicative pricing.
GET https://www.askfortask.com/wp-json/askfortask/v1/services
Response 200:
{
"company": "AskforTask",
"offer": "3 quotes within 24 hours. One contract. One invoice. Zero vendor chasing.",
"how_it_works": "Describe the job once. Vetted, insured vendors bid on the same written scope; you get 3 written quotes within 24 hours, sign one contract with AskforTask, and AskforTask manages the vendor. A request goes to at most 3 vendors — then it closes.",
"services": [
{
"slug": "commercial-cleaning",
"name": "Commercial Cleaning",
"url": "https://www.askfortask.com/ca/commercial-cleaning/",
"description": "…",
"term": "…",
"includes": ["…"],
"pricing": {
"currency": "CAD",
"rows": [
{ "item": "…", "detail": "…", "price": "…" }
],
"source": "…"
},
"quote_url": "https://www.askfortask.com/ca/get-quotes/?service=commercial-cleaning"
}
],
"areas_url": "https://www.askfortask.com/wp-json/askfortask/v1/areas",
"quote_form": "https://www.askfortask.com/ca/get-quotes/",
"for_ai": "https://www.askfortask.com/for-ai/"
}
Field notes:
services[].slug— the identifier used by/pricingand/quote-request. Never invent a slug; copy it from this response.services[].pricing.rows[].price— a display string (e.g. a range), not a number.pricing.sourcenames the published source of the table.pricingfigures are indicative published market ranges. They are not quotes.
GET /areas
List where AskforTask operates today.
GET https://www.askfortask.com/wp-json/askfortask/v1/areas
Response 200:
{
"countries": [
{ "code": "ca", "name": "Canada", "url": "https://www.askfortask.com/ca/" }
],
"service_area": "Toronto and the surrounding area, Ontario, Canada",
"cities": [
{ "name": "Toronto", "province": "Ontario", "status": "pilot — quote requests open" },
{ "name": "Mississauga", "province": "Ontario", "status": "served — quote requests open" }
],
"city_page_pattern": "https://www.askfortask.com/ca/{service}/toronto/",
"note": "New cities open as vendor panels are vetted. Requests from outside the listed cities are waitlisted and quoted first when their city opens.",
"quote_form": "https://www.askfortask.com/ca/get-quotes/"
}
The city list in the live response is authoritative; the example above is abbreviated. Toronto is the pilot city; its per-service pages follow city_page_pattern.
GET /pricing?service=
Return one service’s full cited price table.
GET https://www.askfortask.com/wp-json/askfortask/v1/pricing?service=commercial-cleaning
Query parameter: service — required, a slug from GET /services.
Response 200:
{
"service": "commercial-cleaning",
"name": "Commercial Cleaning",
"url": "https://www.askfortask.com/ca/commercial-cleaning/",
"pricing": {
"currency": "CAD",
"rows": [
{ "item": "…", "detail": "…", "price": "…" }
],
"source": "…"
},
"note": "Indicative published market ranges, with the source named. Your actual price comes from 3 competing vendor bids on your exact written scope — request quotes and the bids set the number.",
"quote_url": "https://www.askfortask.com/ca/get-quotes/?service=commercial-cleaning"
}
Unknown slug → 404 (error shape below), code aftc_unknown_service.
POST /quote-request
Submit a quote request. The request is stored privately, routed to at most 3 vetted vendors, and the normalised bids (Quote A/B/C) are emailed to the buyer.
POST https://www.askfortask.com/wp-json/askfortask/v1/quote-request
Content-Type: application/json
Request fields
Required fields are marked. All other fields are optional — send what the buyer gave you; do not fabricate values for empty fields. Lengths are maximum characters kept; longer values are truncated, except notes/message (see its note).
| Field | Required | Max chars | Notes |
|---|---|---|---|
service | Yes | 60 | A slug from GET /services, or "multiple" for more than one service. |
name | Yes | 120 | The buyer’s contact name. |
email | Yes | — | Must be a valid email address. The quotes are delivered here. |
city | Yes | 80 | City where the facility is. |
company | No | 160 | Company or facility name. |
phone | No | 40 | If present, must contain at least 7 digits (include the area code). |
facility | No | 120 | Facility type, e.g. Office, Medical / Dental, Warehouse / Industrial, Retail, Restaurant, Retirement / Care Home, School, Gym / Fitness, Property Management (multi-site), Other. |
facilityDetail | No | 160 | Branch detail for the facility type (scope specifics, areas in scope). |
sqft | No | 60 | Size band, e.g. "5,000 – 10,000". |
locations | No | 60 | e.g. "1 location", "2 – 5 locations". |
frequency | No | 80 | e.g. "One-time", "2–3× per week", "5× per week", "Scheduled program (varies)". |
start | No | 80 | e.g. "ASAP", "This month", "Just benchmarking prices". |
serviceDetail | No | 160 | Service-specific scope detail (coverage areas, unit counts, phases). |
situation | No | 60 | One of unhappy, comparing, none, inhouse. |
provider | No | 160 | Current provider, if any. |
expiry | No | 20 | Current contract expiry, YYYY-MM. |
budget | No | 80 | Budget band, only if the buyer volunteers one. |
address | No | 200 | Street address of the facility. |
postal | No | 12 | Postal / ZIP code. |
notes | No | 5,000 | Free text: access hours, special requirements. Over 5,000 characters is rejected with aftc_notes_too_long (not truncated). |
message | No | 5,000 | Alias for notes. If both are sent, notes wins. |
callback_url | No | 300 | Webhook URL (https, public hosts only). When the request’s status reaches quotes_ready or closed, the status payload is POSTed to it — see Webhooks below. A URL that fails validation is dropped silently; it never blocks the submission. |
website | — | — | Leave empty. Honeypot: a filled value returns a success-shaped 200 and stores nothing. |
The whole request body is capped at 32 KB — a larger body is rejected with 413 (aftc_payload_too_large). Legitimate requests are a few KB at most.
Example request
curl -X POST https://www.askfortask.com/wp-json/askfortask/v1/quote-request \
-H "Content-Type: application/json" \
-d '{
"service": "commercial-cleaning",
"name": "Jordan Lee",
"email": "jordan@example.com",
"company": "Example Properties Inc.",
"city": "Toronto",
"facility": "Office",
"sqft": "5,000 – 10,000",
"frequency": "5× per week",
"start": "This month",
"message": "Two washrooms, kitchen, boardroom. Access after 6 pm via loading dock."
}'
Success response — 201 Created
{
"reference": "AFT-000123",
"access_token": "9f2c…(48 hex characters)",
"status": "received",
"status_url": "https://www.askfortask.com/wp-json/askfortask/v1/quote-request/AFT-000123",
"promise": "3 quotes within 24 hours",
"service": "commercial-cleaning",
"city": "Toronto",
"message": "Your request goes to at most 3 vetted vendors — then it closes. AskforTask normalises the bids into Quote A/B/C and emails them to jordan@example.com. One contract, one invoice, zero vendor chasing."
}
Store reference and access_token together. The token is issued once, in this response only — it cannot be recovered or re-issued. It is the key to the status endpoint below: with it, you can read the request’s status and, when ready, the full quote pack. Without it, the reference alone reveals nothing. The quotes also arrive by email at the address in the request.
When a valid callback_url was stored, the response also carries "webhook_registered": true.
Safe retries — idempotency
Submissions are deduplicated. If the identical payload — same normalised email + phone + service + postal — arrives again within 15 minutes, the API returns the original response (201, the original reference) plus "duplicate": true and a note, and creates nothing: no second inbox entry, no second lead. On a duplicate response access_token is null — the token from the first response still applies.
So: retry freely on timeouts and network errors. Inside the window, a retry can never double-submit. (Beyond the window, a resubmission is a new request — don’t.)
Webhooks — stop polling
Send callback_url with the POST and you never need to poll. When the request’s status reaches quotes_ready or closed, AskforTask POSTs the same payload shape as the status GET to your URL, once, with one retry 15 minutes later if the delivery fails (transport error or non-2xx).
Headers on the webhook call:
| Header | Value |
|---|---|
X-AFT-Event | quote_status.quotes_ready or quote_status.closed |
X-AFT-Signature | sha256=<hex> — HMAC-SHA256 of the raw request body |
Verifying the signature: the HMAC key is SHA-256(access_token) — the hash of the access token from your POST response (the raw token itself is never stored server-side, so it cannot be the key). Compute hash_hmac('sha256', $rawBody, hash('sha256', $accessToken)) and compare with the header value after sha256=.
Rules for callback_url: https only, and the host must resolve to public IPs only — private, loopback and link-local addresses (including 169.254.169.254) are rejected, at registration and again when the webhook fires. A rejected URL is dropped and the submission proceeds without a webhook.
API keys (optional)
A key is an upgrade, never a gate — the anonymous API above stays open exactly as documented. A key gets you:
- a higher submission limit: 60 per 10 minutes (vs 5 anonymous), counted per key;
- your
agent_namestamped on every keyed submission.
Get a key — POST /api-keys
Instant and self-serve: no approval, no email verification round-trip.
POST https://www.askfortask.com/wp-json/askfortask/v1/api-keys
Content-Type: application/json
{ "agent_name": "Your Agent", "contact_email": "you@yourcompany.com", "use_case": "optional" }
Response 201:
{
"api_key": "aft_live_9f2c…(32 hex characters)",
"agent_name": "Your Agent",
"created": "2026-12-04T01:00:00+00:00",
"header": "X-AFT-API-Key",
"verify_url": "https://www.askfortask.com/wp-json/askfortask/v1/api-keys/me",
"note": "Shown once — store it now. …"
}
The key is shown once; only its SHA-256 hash is stored. Limits: 3 issuances per hour per IP (429 beyond). Disposable/throwaway email domains are refused (400, aftc_disposable_email). The website honeypot applies here too.
Use it
Send the key as a header on any request: X-AFT-API-Key: aft_live_…. An invalid or revoked key is treated as anonymous — a submission never fails because a key was wrong.
Verify it — GET /api-keys/me
GET https://www.askfortask.com/wp-json/askfortask/v1/api-keys/me
X-AFT-API-Key: aft_live_…
→ 200 { "agent_name": "…", "created": "…", "requests_made": 12 }. This is the one endpoint where a bad key is an error: missing key → 401 aftc_key_required; invalid/revoked → 401 aftc_key_invalid.
Revocation is admin-side only (AskforTask revokes compromised keys in wp-admin); there is no public revoke endpoint.
GET /quote-request/{reference}
Read a request back: its status and, when ready, the quote pack. This is the return path — submitting is only half the loop.
GET https://www.askfortask.com/wp-json/askfortask/v1/quote-request/AFT-000123
X-AFT-Access-Token: <the access_token from the POST response>
Authentication: the access_token from the POST response, sent as the X-AFT-Access-Token header (preferred) or as the access_token query parameter. Tokens are stored hashed server-side. Quotes are never public by reference alone — references are sequential, so the token is the only thing that opens a request.
Status values
received → in_progress (vendors are bidding) → quotes_ready → closed (buyer accepted, or the validity window passed). cancelled if the request was withdrawn.
Response while bids are being collected — 200
{
"reference": "AFT-000123",
"status": "received",
"service": "commercial-cleaning",
"city": "Toronto",
"submitted_at": "2026-12-03T02:40:00+00:00",
"quotes": null,
"message": "Request received. Bids are being collected from at most 3 vetted vendors. The promise: 3 quotes within 24 hours of submission — check back, or watch the buyer's inbox."
}
Response when the quote pack is ready — 200
{
"reference": "AFT-000123",
"status": "quotes_ready",
"service": "commercial-cleaning",
"city": "Toronto",
"submitted_at": "2026-12-03T02:40:00+00:00",
"quotes": {
"issued_at": "2026-12-04",
"valid_until": "2026-12-18",
"currency": "CAD",
"bids": [
{ "vendor": "Vendor A", "price": "C$…", "detail": "…", "recommended": false },
{ "vendor": "Vendor B", "price": "C$…", "detail": "…", "recommended": true },
{ "vendor": "Vendor C", "price": "C$…", "detail": "…", "recommended": false }
],
"recommendation": "Why the flagged bid is the pick, in one or two factual sentences.",
"next_action": "How the buyer accepts — stated in the pack, e.g. reply to the quote email."
},
"message": "3 quotes are ready. Prices are firm until valid_until. Vendor identities are revealed to the buyer when they choose one — bids are always anonymised as Vendor A/B/C."
}
Vendor anonymity is structural: bids never carry a real vendor name, at any status. Exactly one bid carries "recommended": true.
Polling discipline
Prefer a callback_url webhook (above) — it replaces polling entirely. If you do poll: quotes land within 24 hours of submission, so poll politely — no more than once every 15 minutes per reference, and stop at quotes_ready or closed. Do not poll references you do not hold the token for; you will only ever get the error below.
Errors specific to this endpoint
| HTTP | code | Cause |
|---|---|---|
| 401 | aftc_token_required | No token sent (neither header nor query parameter). |
| 404 | aftc_not_found | Unknown reference or wrong token — deliberately the same response either way, so references cannot be probed. |
Rate limits
POST /quote-request: 5 submissions per 10 minutes per IP — or 60 per 10 minutes with a valid API key (counted per key). Plus a site-wide soft cap of 300 submissions per hour across all sources.POST /api-keys: 3 issuances per hour per IP.- All POST bodies: 32 KB maximum (
413beyond).
Exceeding a limit returns 429 (code aftc_rate_limited) with a plain-language message. On 429, wait — do not retry in a loop.
Error shape
All errors use the standard WordPress REST error envelope:
{
"code": "aftc_validation_failed",
"message": "service must be one of the slugs from GET /services, or \"multiple\". name is required.",
"data": { "status": 400 }
}
Error codes:
| HTTP | code | Cause |
|---|---|---|
| 400 | aftc_validation_failed | One or more validation failures, listed in message: unknown/missing service, missing name, missing/invalid email, missing city, or a phone with fewer than 7 digits. On POST /api-keys: missing agent_name or missing/invalid contact_email. |
| 400 | aftc_notes_too_long | notes/message exceeds 5,000 characters. |
| 400 | aftc_disposable_email | POST /api-keys with a disposable/throwaway email domain. |
| 404 | aftc_unknown_service | GET /pricing called with a slug not in GET /services. |
| 401 | aftc_token_required | GET /quote-request/{reference} called without the access token. |
| 401 | aftc_key_required | GET /api-keys/me called without an API key. |
| 401 | aftc_key_invalid | GET /api-keys/me with an unknown or revoked API key. |
| 404 | aftc_not_found | Status lookup with an unknown reference or a wrong token (same response for both, by design). |
| 413 | aftc_payload_too_large | POST body over 32 KB. |
| 429 | aftc_rate_limited | A rate limit was exceeded: submissions per IP or per key, the site-wide hourly cap, or key issuance per hour. The message says which and what to do. |
| 500 | aftc_store_failed | The request could not be stored. Fall back to the human quote form (below). |
Agent rules
- One request per real need. Never resubmit the same job to “check” — check via the status endpoint or a webhook instead. (Retrying the identical payload after a timeout is safe: the 15-minute idempotency window returns the original instead of duplicating.)
- Submit only with the buyer’s real contact details and their consent to be quoted.
- Never present
/pricingfigures to a buyer as a quote. The quote is the 3 bids. - Start with
GET /context; use theETag/If-None-Matchcaching on the read endpoints; prefer acallback_urlwebhook over polling. Tokens you don’t spend are the whole point.
Stability policy
Build on this API. It will not move under you.
- The
askfortask/v1namespace is permanent. These routes keep their URLs and meanings indefinitely. - Additive only. New fields may appear in responses, and new optional fields may be accepted in requests. Existing fields are never renamed, removed, or changed in type or meaning.
- Slugs are stable. A service slug issued by
GET /servicesremains valid for/pricingand/quote-request; if a service is ever retired, its slug returns a clear error rather than silently changing meaning. - The reference format is stable:
AFT-followed by six digits. - The status contract is stable: the status values (
received,in_progress,quotes_ready,closed,cancelled) and the quote-pack shape (anonymised Vendor A/B/C bids, onerecommendedflag,valid_until) are part of the v1 contract under the same additive-only rule. - If a breaking change ever becomes unavoidable, it ships under a new namespace (
askfortask/v2) alongside v1 — v1 is not edited in place. Deprecation, if it ever happens, is announced on this page and inllms.txtat least 12 months before any shutdown. - The OpenAPI spec at
https://www.askfortask.com/.well-known/openapi.jsonis generated from the same contract and is the machine-readable source of truth for it.
Human fallback
The same request in a form, with the same promise: https://www.askfortask.com/ca/get-quotes/
Related: hub https://www.askfortask.com/for-ai/ · quickstart https://www.askfortask.com/for-ai/quickstart/ · MCP https://www.askfortask.com/for-ai/mcp/