Rewalto Jobs API
The Jobs API from Rewalto — 1 operation(s) for jobs.
The Jobs API from Rewalto — 1 operation(s) for jobs.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/rewalto-com:rewalto-com-jobs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Rewalto Jobs API
version: 0.208.0
summary: India's data layer for AI agents and people
description: 'One front door for people and agents: the site, the dashboards, the CLI and MCP all call this API. Every route is under `/v1`. Errors always have the same envelope (`ErrorEnvelope`); decide what to do from `error.retry`. Using the tools is free: credits are charged only for data actually delivered (C-012). Requests are rate limited per credential (or, without one, per IP) in one-minute windows: every answer carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`, and over the limit the answer is 429 `rate_limited` with `Retry-After`. A change that removes or alters something ships behind `/v2`.'
servers:
- url: https://api-dev.rewalto.com
description: Staging, on the shared database (D-1360). API keys and Clerk sessions from the frontend dev issuer (D-1346); /v1/data is not served here until D-1391.
- url: https://api.rewalto.com
description: Production. API keys and Clerk sessions from the production issuer.
tags:
- name: Jobs
paths:
/v1/jobs/{id}:
get:
operationId: getJob
summary: Read a background job
description: 'One background job of your organisation: a call that answers `202` with a `jobId` runs its work here. `state` is `queued`, `running`, `succeeded` (then `result` or `resultUrl`) or `failed` (then `error`). Free. With `Accept: text/event-stream` the job is streamed as Server-Sent Events, one JSON `data:` line per change, `{"type":"job","job":Job}`, the first at once; the stream ends after the job succeeds or fails, or after 300 s with `{"type":"timeout"}` (stream or poll again). Needs scope data:read for an API key or MCP sign-in. Another organisation’s job is `not_found`, and so is a job started by a session-only call when read with a key.'
tags:
- Jobs
security:
- sessionJwt: []
- apiKey: []
responses:
'200':
description: Success
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
content:
application/json:
schema:
title: JobAnswer
type: object
additionalProperties: false
required:
- data
properties:
data:
title: Job
type: object
additionalProperties: false
required:
- id
- kind
- state
- attempt
- maxAttempts
- result
- resultUrl
- error
- createdAt
- updatedAt
- finishedAt
properties:
id:
type: string
description: The job id.
examples:
- '1042'
kind:
type: string
description: What the job does.
examples:
- snapshot.export
state:
type: string
enum:
- queued
- running
- succeeded
- failed
description: '`queued` (waiting for a worker), `running`, `succeeded` (see `result` or `resultUrl`) or `failed` (see `error`). A failed try that has tries left goes back to `queued`.'
attempt:
type: integer
minimum: 0
description: 1 on the first try; 0 before it starts.
maxAttempts:
type: integer
minimum: 1
description: How many tries it gets.
result:
type:
- 'null'
- object
additionalProperties: true
description: The answer once `succeeded`, for kinds that publish one; null otherwise.
resultUrl:
type:
- 'null'
- string
description: Where the finished thing is read (an API path), for kinds that make one; null otherwise.
examples:
- /v1/exports/3f2a0c5e-9b1d-4c1e-8f00-1a2b3c4d5e6f
error:
type:
- 'null'
- string
description: Why it failed, once `failed`; null otherwise.
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
finishedAt:
type:
- 'null'
- string
format: date-time
description: When it succeeded or failed; null before.
'400':
description: 'Error. The `error.code` is one of:
- `invalid_request`: retry advice `fix_request`'
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
code: invalid_request
status: 400
retry: fix_request
message: The request does not match the schema for this route
requestId: req_0b8f6d3a-2c1e-4a79-9e5d-6f4a7c1b2d83
details:
- path: body/expiresInDays
message: must be equal to one of the allowed values
'401':
description: 'Error. The `error.code` is one of:
- `key_expired`: retry advice `refresh_credentials`
- `key_revoked`: retry advice `refresh_credentials`
- `session_expired`: retry advice `refresh_credentials`
- `unauthenticated`: retry advice `refresh_credentials`'
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
error:
code: session_expired
status: 401
retry: refresh_credentials
message: The session token has expired; sign in again
requestId: req_7c1e2a90-4b3d-4f6e-8a15-0d9c2b7e3f41
'403':
description: 'Error. The `error.code` is one of:
- `org_missing`: retry advice `never`
- `scope_missing`: retry advice `never`'
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
'404':
description: 'Error. The `error.code` is one of:
- `not_found`: retry advice `fix_request`'
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
'429':
description: 'Error. The `error.code` is one of:
- `rate_limited`: retry advice `after_reset`'
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
RateLimit-Limit:
$ref: '#/components/headers/RateLimitLimitHeader'
RateLimit-Remaining:
$ref: '#/components/headers/RateLimitRemainingHeader'
RateLimit-Reset:
$ref: '#/components/headers/RateLimitResetHeader'
Retry-After:
$ref: '#/components/headers/RetryAfterHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
'500':
description: 'Error. The `error.code` is one of:
- `internal`: retry advice `bounded`'
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
'503':
description: 'Error. The `error.code` is one of:
- `unavailable`: retry advice `bounded`'
headers:
x-request-id:
$ref: '#/components/headers/RequestIdHeader'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
parameters:
- name: id
in: path
required: true
schema:
type: string
pattern: ^[1-9][0-9]{0,18}$
description: The job id, from the `202` answer that started it.
examples:
- '1042'
components:
headers:
RateLimitResetHeader:
description: Seconds until the current window resets.
schema:
type: integer
minimum: 1
RateLimitLimitHeader:
description: Requests allowed in the current one-minute window for this credential (or, without one, this IP).
schema:
type: integer
minimum: 1
RateLimitRemainingHeader:
description: Requests left in the current window.
schema:
type: integer
minimum: 0
RetryAfterHeader:
description: 'On a 429: seconds to wait before retrying (the same as `RateLimit-Reset`).'
schema:
type: integer
minimum: 1
RequestIdHeader:
description: The id of this request. Quote it when you report a problem. You may send your own `x-request-id` (8 to 128 plain characters); anything else is replaced.
schema:
type: string
schemas:
Quote:
title: Quote
description: 'What a run would cost at most. mode published: the recipe has a published rate and runs at once. mode approval: no rate is set yet, so the run starts only after the quote is approved. The ceiling is never exceeded; a run is charged for what it delivers, rounded up.'
type: object
additionalProperties: false
required:
- id
- mode
- status
- recipe
- unit
- units
- rateVersion
- extras
- lines
- ceiling
- expiresAt
- createdAt
- approvedAt
- recurring
properties:
id:
type: string
format: uuid
mode:
type: string
enum:
- published
- approval
status:
type: string
enum:
- open
- approved
- expired
description: 'open: can be approved. approved: credits are held. expired: ask for a new quote.'
recipe:
type: string
unit:
type: string
units:
type: integer
minimum: 1
description: The units estimate this quote prices.
rateVersion:
type: string
description: The one rate version every line was priced at, for example c1.r2.
extras:
type: array
items:
title: QuoteExtra
description: An extra (a tool such as a browser or OCR) applied to the quoted data.
type: object
additionalProperties: false
required:
- key
- credits
- perUnits
- multiplier
properties:
key:
type: string
description: The extra’s name, from the rate card.
credits:
type: integer
minimum: 0
description: Credits per perUnits units.
perUnits:
type: integer
minimum: 1
multiplier:
type: integer
minimum: 1
description: How many times the extra applies per unit, for example the number of pin codes.
examples:
- key: browser
credits: 1
perUnits: 1
multiplier: 1
lines:
type: array
items:
title: QuoteLine
description: 'One kind of data in a quote: the units expected and the credits for them.'
type: object
additionalProperties: false
required:
- recipe
- unit
- units
- base
- extras
- credits
properties:
recipe:
type: string
unit:
type: string
description: What one unit is, for example page or record.
units:
type: integer
minimum: 0
base:
type: object
additionalProperties: false
required:
- credits
- perUnits
properties:
credits:
type: integer
minimum: 0
perUnits:
type: integer
minimum: 1
extras:
type: array
items:
title: QuoteExtra
description: An extra (a tool such as a browser or OCR) applied to the quoted data.
type: object
additionalProperties: false
required:
- key
- credits
- perUnits
- multiplier
properties:
key:
type: string
description: The extra’s name, from the rate card.
credits:
type: integer
minimum: 0
description: Credits per perUnits units.
perUnits:
type: integer
minimum: 1
multiplier:
type: integer
minimum: 1
description: How many times the extra applies per unit, for example the number of pin codes.
examples:
- key: browser
credits: 1
perUnits: 1
multiplier: 1
credits:
type: integer
minimum: 0
description: Credits for this line, rounded up.
ceiling:
type: integer
minimum: 0
description: The most the run can be charged, in credits. This is what approval holds.
expiresAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
approvedAt:
type:
- 'null'
- string
format: date-time
run:
title: QuoteRun
description: 'Only for a fresh-read run: what it reads. Its id is this quote’s id (GET /v1/runs/{id} once approved).'
type:
- 'null'
- object
additionalProperties: false
required:
- query
- pincodes
properties:
query:
type: string
minLength: 1
maxLength: 200
description: A search term, or a product reference for a recipe that reads one product.
pincodes:
type: array
minItems: 1
maxItems: 20
uniqueItems: true
items:
type: string
pattern: ^([1-9][0-9]{5}|national)$
description: Pin codes to read at; `national` for a recipe that is not location scoped. One job each.
recurring:
title: QuoteRecurring
description: 'Only for a recurring report or watch, shown once before the first delivery: the cost of each delivery and of a month, and whether the month fits the credits left.'
type:
- 'null'
- object
additionalProperties: false
required:
- cadence
- deliveriesPerMonth
- perDelivery
- perMonth
- creditsAvailable
- fitsPlan
- notice
properties:
cadence:
type: string
enum:
- daily
- weekly
- monthly
deliveriesPerMonth:
type: integer
minimum: 1
description: 'Deliveries counted in a month: the most the cadence can make.'
perDelivery:
type: integer
minimum: 0
description: Credits for one delivery (at most).
perMonth:
type: integer
minimum: 0
description: Credits for a month of deliveries (at most).
creditsAvailable:
type: integer
minimum: -1
description: Credits the organisation has now; -1 when it has unlimited credits (as `available` on GET /v1/credits/balance, contract 0.28.0).
fitsPlan:
type: boolean
description: False when the month costs more than the credits left. Always true with unlimited credits.
notice:
type:
- 'null'
- string
description: 'When fitsPlan is false: that it will not fit and a bigger plan is needed.'
examples:
- id: 9b1d6e0a-4c3f-4f7e-8a21-5d0c7b9e1f42
mode: published
status: open
recipe: commerce_product_page
unit: page
units: 120
rateVersion: c1.r1
extras:
- key: browser
credits: 1
perUnits: 1
multiplier: 1
lines:
- recipe: commerce_product_page
unit: page
units: 120
base:
credits: 1
perUnits: 1
extras:
- key: browser
credits: 1
perUnits: 1
multiplier: 1
credits: 240
ceiling: 240
expiresAt: '2026-10-15T10:30:00.000Z'
createdAt: '2026-10-15T10:00:00.000Z'
approvedAt: null
recurring:
cadence: weekly
deliveriesPerMonth: 5
perDelivery: 240
perMonth: 1200
creditsAvailable: 1000
fitsPlan: false
notice: 'A month of deliveries can cost up to 1200 credits and 1000 are left: it will not fit. A bigger plan is needed.'
ErrorEnvelope:
type: object
additionalProperties: false
required:
- error
properties:
error:
type: object
additionalProperties: false
required:
- code
- status
- retry
- message
- requestId
properties:
code:
type: string
enum:
- invalid_request
- invalid_json
- unauthenticated
- session_expired
- key_expired
- key_revoked
- credits_exhausted
- over_quote
- plan_required
- preview_needs_approval
- price_changed
- forbidden
- org_missing
- scope_missing
- not_entitled
- private_data
- access_control
- not_found
- quote_expired
- quote_already_approved
- refund_refused
- catalogue_refused
- not_for_sale
- export_not_ready
- download_expired
- reopen_expired
- idempotency_conflict
- stale_version
- package_not_ready
- upload_not_ready
- cost_changed
- billing_profile_missing
- export_not_available
- already_applied
- unknown_capability
- schema_retired
- payload_too_large
- unsupported_media_type
- rate_limited
- internal
- evidence_unavailable
- payment_provider_unavailable
- payment_provider_retired
- checkout_unavailable
- invoicing_unavailable
- provider_access_pending
- connection_revoked
- owner_required
- provider_quota_exhausted
- workspace_closed
- workspace_exists
- unavailable
status:
type: integer
retry:
type: string
enum:
- fix_request
- refresh_credentials
- never
- after_reset
- bounded
message:
type: string
requestId:
type: string
quote:
$ref: '#/components/schemas/Quote'
details:
type: array
items:
type: object
additionalProperties: false
required:
- path
- message
properties:
path:
type: string
message:
type: string
securitySchemes:
sessionJwt:
type: http
scheme: bearer
bearerFormat: JWT
description: 'A Clerk session token for a signed-in user: `Authorization: Bearer <token>`. Mint it in the frontend with the Clerk JWT template named `rewalto-core`, whose audience is `rewalto-core-api`. It carries `sub`, `org_id` and `org_role`. An expired token is `session_expired`.'
apiKey:
type: http
scheme: bearer
bearerFormat: rwk_ API key
description: 'An organisation API key: `Authorization: Bearer rwk_...`. Minted with `createKey`; the secret is shown once. A key carries scopes and an expiry of 7, 30 or 90 days.'
x-scopes:
- data:read
- tools:run
- usage:read
serviceKey:
type: http
scheme: bearer
bearerFormat: rws_ service key
description: 'A Rewalto service key, for Rewalto''s own servers only: `Authorization: Bearer rws_...`. Minted and revoked by staff, never through the API; the secret is shown once. It carries scopes and an expiry, opens only `/v1/service` routes, and every call is audited.'
x-scopes:
- notification-preferences:read
- intake:write
- site-pages:read
- evidence:read
- ad-references:read
- ad-references:report
- external-data:connect
- external-data:read
- external-data:sync
- external-data:delete
- research:read
- signups:read
x-error-codes:
invalid_request:
status: 400
retry: fix_request
invalid_json:
status: 400
retry: fix_request
unauthenticated:
status: 401
retry: refresh_credentials
session_expired:
status: 401
retry: refresh_credentials
key_expired:
status: 401
retry: refresh_credentials
key_revoked:
status: 401
retry: refresh_credentials
credits_exhausted:
status: 402
retry: never
over_quote:
status: 402
retry: never
plan_required:
status: 402
retry: never
preview_needs_approval:
status: 402
retry: never
price_changed:
status: 409
retry: never
forbidden:
status: 403
retry: never
org_missing:
status: 403
retry: never
scope_missing:
status: 403
retry: never
not_entitled:
status: 403
retry: never
private_data:
status: 403
retry: never
access_control:
status: 403
retry: never
not_found:
status: 404
retry: fix_request
quote_expired:
status: 410
retry: fix_request
quote_already_approved:
status: 409
retry: never
refund_refused:
status: 409
retry: never
catalogue_refused:
status: 409
retry: never
not_for_sale:
status: 409
retry: never
export_not_ready:
status: 409
retry: never
download_expired:
status: 410
retry: fix_request
reopen_expired:
status: 410
retry: fix_request
idempotency_conflict:
status: 409
retry: never
stale_version:
status: 409
retry: never
package_not_ready:
status: 409
retry: never
upload_not_ready:
status: 409
retry: never
cost_changed:
status: 409
retry: never
billing_profile_missing:
status: 409
retry: never
export_not_available:
status: 409
retry: never
already_applied:
status: 409
retry: never
unknown_capability:
status: 404
retry: fix_request
schema_retired:
status: 410
retry: fix_request
payload_too_large:
status: 413
retry: fix_request
unsupported_media_type:
status: 415
retry: fix_request
rate_limited:
status: 429
retry: after_reset
internal:
status: 500
retry: bounded
evidence_unavailable:
status: 503
retry: bounded
payment_provider_unavailable:
status: 503
retry: bounded
payment_provider_retired:
status: 410
retry: fix_request
checkout_unavailable:
status: 503
retry: bounded
invoicing_unavailable:
status: 409
retry: never
provider_access_pending:
status: 409
retry: never
connection_revoked:
status: 409
retry: never
owner_required:
status: 403
retry: never
provider_quota_exhausted:
status: 429
retry: after_reset
workspace_closed:
status: 409
retry: never
workspace_exists:
status: 409
retry: never
unavailable:
status: 503
retry: bounded