Prosp Credits API
Check your current credit balance and the per-discovery cost.
Check your current credit balance and the per-discovery cost.
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/prosp-cc:prosp-cc-credits-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: Prosp Cc Credits API
version: 0.4.0
contact:
name: Prosp API support
url: https://prosp.cc/
license:
name: Proprietary
url: https://prosp.cc/
description: 'Operations tagged credits across 2 of this provider''s published API definitions: openapi.yaml, prosp-cc-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.prosp.cc
description: Production
security:
- cognitoClientCredentials:
- mcp/execute
tags:
- name: Credits
description: Check your current credit balance and the per-discovery cost.
paths:
/mcp/credits:
get:
tags:
- Credits
operationId: getCredits
summary: Get the caller's current credit balance
description: 'Returns the authenticated customer''s credit balance and the per-job cost. Check this
before `execute` (which debits `job_cost` and returns 402 when the balance is short).'
responses:
'200':
description: The caller's balance.
content:
application/json:
schema:
type: object
properties:
customer_id:
type: string
balance:
type: integer
description: Current credit balance.
job_cost:
type: integer
description: Credits debited per discovery job.
required:
- customer_id
- balance
- job_cost
'401':
$ref: '#/components/responses/Unauthorized'
'405':
$ref: '#/components/responses/MethodNotAllowed'
'429':
$ref: '#/components/responses/RateLimited'
'503':
description: Credit service unavailable.
servers:
- url: https://api.prosp.cc
description: Production
/mcp/credits/ledger:
get:
tags:
- Credits
operationId: getCreditLedger
summary: Get the caller's credit-transaction history
description: 'Returns the authenticated customer''s credit transactions — debits (discovery-job charges),
refunds, and manual adjustments — newest first, reconstructed from durable job and refund
markers. EVERY row carries a signed `amount` in credits, so a client can `sum(amount)` to
reconcile the ledger against `balance`. `limit` bounds the number of TRANSACTIONS returned
(a single job can contribute up to two rows — a debit and its refund) and `offset` selects a
stable page; `total` + `has_more` let a client walk the full reconstructable history. The
ledger is a BOUNDED WINDOW: markers older than `window_start` (≈7 days) have expired and can
no longer be reconstructed — `history_incomplete=true` signals such older history exists
(`truncated` is a separate this-page hard-cap signal, always false here).'
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 500
default: 50
description: Maximum number of transactions to return (newest first). Rejected with 400 if 0/negative or above 500.
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
description: Number of transactions to skip from the newest, for paging. Rejected with 400 if negative.
responses:
'200':
description: The caller's credit-transaction history.
content:
application/json:
schema:
$ref: '#/components/schemas/CreditLedger'
'401':
$ref: '#/components/responses/Unauthorized'
'405':
$ref: '#/components/responses/MethodNotAllowed'
'429':
$ref: '#/components/responses/RateLimited'
servers:
- url: https://api.prosp.cc
description: Production
components:
schemas:
LedgerTransaction:
type: object
description: 'One credit-ledger row. EVERY row carries a signed `amount` (credits) — negative for a debit, positive for a refund/grant — so a client can sum the column to reconcile against `balance`. Carries NO internal provenance flags: this is a customer-facing billing surface.'
required:
- type
- amount
- reason
- timestamp
additionalProperties: false
properties:
type:
type: string
enum:
- debit
- refund
- adjustment
description: '`debit` = a discovery-job charge; `refund` = credits returned for a terminated/refunded job; `adjustment` = a manual balance change.'
job_id:
type: string
description: The discovery job this row belongs to. Absent on manual adjustments.
icp_id:
type: string
description: 'The saved ICP this charge is attributable to — the `icpId` the run was started with via `POST /api/v1/discoveries {"icpId": ...}`. Lets a customer running several saved ICPs reconcile a charge back to the ICP that caused it. Carried on both the `debit` row and its paired `refund` row, so an attribution survives the two landing on different pages. ABSENT (field omitted, never an empty string) for an ad-hoc run started from inline criteria, and on `adjustment` rows, which have no job. Ids are scoped to the calling customer — the same namespace `GET /api/v1/icps` returns.'
amount:
type: integer
description: Signed credit movement — negative for a debit, positive for a refund/grant.
reason:
type: string
description: Bounded reason for the movement (e.g. `discovery_job`, `candidates_exhausted`, `time_limit_reached`, `manual_reconciliation`).
balance_after:
type:
- integer
- 'null'
description: 'Best-effort: the TRUE balance immediately after this event, present ONLY when a durable post-event snapshot was recorded at the source (`jobs:charged-balance:{jobId}`, written by the gateway debit script). OMITTED (field absent) on rows with no snapshot — historical debits that predate the snapshot feature, and reconstructed/inferred refunds — because a running balance is NOT reliably reconstructable after the fact (concurrent jobs and top-ups make back-derivation unsound). Never fabricated: a null/absent value means "unknown", not zero. Reconcile via the signed `amount` column, which every row carries.'
timestamp:
type: string
format: date-time
description: RFC-3339 UTC timestamp (…Z) of the transaction.
adjustment_id:
type: string
description: Audit id of a manual adjustment (adjustment rows only).
actor:
type: string
description: Who performed a manual adjustment (adjustment rows only).
Error:
type: object
description: The single error shape for the whole surface.
required:
- error
- message
properties:
error:
type: string
description: 'Stable machine-readable code. Common values include: `invalid_token`, `insufficient_credits`, `method_not_allowed`, `rate_limit_exceeded`, `concurrent_limit`, `missing_idempotency_key` (the required `X-Idempotency-Key` header was absent on `execute`), `schema_validation_failed` (request body failed the OpenAPI schema — rejected before any credit debit), `validation_failed` / `icp_not_found` (the discovery criteria were malformed / matched no ideal-customer profile — no job created, any debit refunded), `invalid_query` (an unknown or malformed search/list query param), `invalid_job_id`, `not_owner`, and `response_too_large` (the result exceeded the gateway''s 16 MB response cap and was refused rather than truncated — narrow the request, e.g. a smaller `limit`; the HTTP status may still be 200 when the body had already begun streaming).'
examples:
- missing_idempotency_key
- schema_validation_failed
- validation_failed
- insufficient_credits
- rate_limit_exceeded
message:
type: string
description: Human-readable detail.
request_id:
type:
- string
- 'null'
description: Correlation id — quote this in support tickets.
CreditLedger:
type: object
description: A customer's credit-transaction history (`GET /mcp/credits/ledger`). Every transaction row carries a signed `amount`, so `sum(transactions[].amount)` reconciles the credit movement against `balance`.
required:
- customer_id
- balance
- transactions
- count
- total
- offset
- has_more
- window_start
- truncated
- history_incomplete
properties:
customer_id:
type: string
description: The authenticated customer these transactions belong to.
balance:
type: integer
description: Current credit balance.
count:
type: integer
minimum: 0
description: Number of transactions in THIS page (never exceeds the requested `limit`).
total:
type: integer
minimum: 0
description: Total reconstructable transactions in the window (across all pages). When `history_incomplete` is true this is a lower bound — older, marker-expired history is not counted.
offset:
type: integer
minimum: 0
description: The starting index this page was served from (echoes the request `offset`, clamped to `total`).
has_more:
type: boolean
description: True when this page left transactions unreturned — fetch the next page with `offset += count`.
window_start:
type: string
format: date-time
description: RFC-3339 UTC start of the reconstructable window (`now − marker TTL`, ≈7 days). Transactions older than this have expired markers and cannot be reconstructed.
truncated:
type: boolean
description: 'PURE this-page hard-cap signal: true only when an item/byte cap dropped rows from THIS page. The ledger paginates on `offset`/`limit` with no per-page item/byte cap (`has_more` covers the tail), so `truncated` is always `false` here. Retained for a uniform pagination envelope across list surfaces. The "older history exists" signal is the DISTINCT `history_incomplete` field below — do NOT read `truncated` for data completeness.'
history_incomplete:
type: boolean
description: 'Data-COMPLETENESS signal (distinct from `truncated`): true when older account history exists that the bounded markers can no longer reconstruct — set in exactly two cases: (1) the customer has more jobs than a single read enumerates (only the newest are scanned), or (2) a job''s paired debit/refund fell outside the reconstructable window so one half-pair row was suppressed. When true, the visible rows are still internally consistent but do NOT span the customer''s whole account history. A COMPLETE page (`has_more=false`, `count == total`) can still be `history_incomplete=true` — the two flags are orthogonal.'
transactions:
type: array
description: Credit transactions, newest first.
items:
$ref: '#/components/schemas/LedgerTransaction'
responses:
RateLimited:
description: Rate limit exceeded (100 requests / 60s per customer).
headers:
Retry-After:
description: Seconds until the window resets.
schema:
type: integer
examples:
- 60
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Missing/invalid/expired Bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
MethodNotAllowed:
description: HTTP method not allowed on this endpoint (rejected before any credit debit).
headers:
Allow:
description: Methods this endpoint accepts.
schema:
type: string
examples:
- GET
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
cognitoClientCredentials:
type: oauth2
description: 'OAuth 2.0 machine-to-machine using the `client_credentials` grant (the
OpenAPI `flows.clientCredentials` object below). This is the ONLY supported grant — do
NOT use the interactive `authorization_code` flow that the identity provider''s discovery
document may advertise; it is for a different (user-facing) client and rejects M2M.
Your `client_id`/`client_secret` are issued per customer (via the Telegram
`/credentials` flow). POST them to the `tokenUrl` below to obtain an access token, then
send it as `Authorization: Bearer <token>` on every request.
'
flows:
clientCredentials:
tokenUrl: https://prosp-mcp-641053169627.auth.eu-central-1.amazoncognito.com/oauth2/token
scopes:
mcp/execute: Start and manage discoveries and read prospects.
x-refined-from:
- openapi.yaml
- prosp-cc-openapi.yaml