AskforTask API Reference

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:

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).

FieldRequiredMax charsNotes
serviceYes60A slug from GET /services, or "multiple" for more than one service.
nameYes120The buyer’s contact name.
emailYes—Must be a valid email address. The quotes are delivered here.
cityYes80City where the facility is.
companyNo160Company or facility name.
phoneNo40If present, must contain at least 7 digits (include the area code).
facilityNo120Facility type, e.g. Office, Medical / Dental, Warehouse / Industrial, Retail, Restaurant, Retirement / Care Home, School, Gym / Fitness, Property Management (multi-site), Other.
facilityDetailNo160Branch detail for the facility type (scope specifics, areas in scope).
sqftNo60Size band, e.g. "5,000 – 10,000".
locationsNo60e.g. "1 location", "2 – 5 locations".
frequencyNo80e.g. "One-time", "2–3× per week", "5× per week", "Scheduled program (varies)".
startNo80e.g. "ASAP", "This month", "Just benchmarking prices".
serviceDetailNo160Service-specific scope detail (coverage areas, unit counts, phases).
situationNo60One of unhappy, comparing, none, inhouse.
providerNo160Current provider, if any.
expiryNo20Current contract expiry, YYYY-MM.
budgetNo80Budget band, only if the buyer volunteers one.
addressNo200Street address of the facility.
postalNo12Postal / ZIP code.
notesNo5,000Free text: access hours, special requirements. Over 5,000 characters is rejected with aftc_notes_too_long (not truncated).
messageNo5,000Alias for notes. If both are sent, notes wins.
callback_urlNo300Webhook 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:

HeaderValue
X-AFT-Eventquote_status.quotes_ready or quote_status.closed
X-AFT-Signaturesha256=<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:

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

HTTPcodeCause
401aftc_token_requiredNo token sent (neither header nor query parameter).
404aftc_not_foundUnknown reference or wrong token — deliberately the same response either way, so references cannot be probed.

Rate limits

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:

HTTPcodeCause
400aftc_validation_failedOne 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.
400aftc_notes_too_longnotes/message exceeds 5,000 characters.
400aftc_disposable_emailPOST /api-keys with a disposable/throwaway email domain.
404aftc_unknown_serviceGET /pricing called with a slug not in GET /services.
401aftc_token_requiredGET /quote-request/{reference} called without the access token.
401aftc_key_requiredGET /api-keys/me called without an API key.
401aftc_key_invalidGET /api-keys/me with an unknown or revoked API key.
404aftc_not_foundStatus lookup with an unknown reference or a wrong token (same response for both, by design).
413aftc_payload_too_largePOST body over 32 KB.
429aftc_rate_limitedA 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.
500aftc_store_failedThe request could not be stored. Fall back to the human quote form (below).

Agent rules

Stability policy

Build on this API. It will not move under you.

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/