InfraNest Cost API
The Cost API from InfraNest — 2 operation(s) for cost.
The Cost API from InfraNest — 2 operation(s) for 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/infranest:infranest-cost-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. 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: InfraNest Cost API
description: Domains, DNS, cloud servers, certificates and uptime monitoring in one API, across the registrars, DNS hosts and clouds you already use, such as Cloudflare, Route 53, Hetzner and GoDaddy. Start in a free sandbox with sample data, use scoped tokens, try DNS changes as a dry run first, and retry safely with idempotency keys.
version: 1.0.0
x-logo:
url: https://developers.infranest.io/logo.svg
altText: InfraNest
contact:
name: InfraNest
url: https://developers.infranest.io
termsOfService: https://infranest.io/terms
servers:
- url: https://api.infranest.io
security:
- default: []
tags:
- name: Cost
description: ''
paths:
/api/organizations/{organization_id}/cost-items:
get:
summary: List cost items
operationId: getApiOrganizationsOrganization_idCostItems
description: The recurring costs you recorded on one resource. `entity_type` is required, and `entity_id` too unless `entity_type` is `organization`, which lists costs that belong to the whole organization.
parameters:
- in: path
name: organization_id
required: true
description: Your organization's ID.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
example: []
'401':
$ref: '#/components/responses/Error401'
'403':
$ref: '#/components/responses/Error403'
'404':
$ref: '#/components/responses/Error404'
'429':
$ref: '#/components/responses/Error429'
tags:
- Cost
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
entity_type:
type: string
description: ''
example: architecto
entity_id:
type: integer
description: ''
example: 16
required:
- entity_type
x-infranest-scope: monitoring.read
x-infranest-token-writable: false
x-infranest-module: costs
x-infranest-errors:
- unauthenticated
- scope_missing
- wrong_organization
- test_token_required
- test_token_sandbox_only
- permission_denied
- not_found
- rate_limited
post:
summary: Create a cost item
operationId: postApiOrganizationsOrganization_idCostItems
description: Records a recurring cost with a `label`, `amount`, `currency` and optional `period` (default monthly) on a resource (`entity_type`, `entity_id`), or on the whole organization with `entity_type` `organization`.
parameters:
- in: path
name: organization_id
required: true
description: Your organization's ID.
schema:
type: integer
responses:
'201':
description: Created
content:
application/json:
example:
organization_id: 1
label: Uptime SMS credits
amount: '9.00'
currency: EUR
period: monthly
updated_at: '2026-01-15T12:00:00.000000Z'
created_at: '2026-01-15T12:00:00.000000Z'
id: 2
'401':
$ref: '#/components/responses/Error401'
'403':
$ref: '#/components/responses/Error403'
'404':
$ref: '#/components/responses/Error404'
'409':
$ref: '#/components/responses/Error409'
'422':
$ref: '#/components/responses/Error422'
'429':
$ref: '#/components/responses/Error429'
tags:
- Cost
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
entity_type:
type: string
description: ''
example: architecto
entity_id:
type: integer
description: Absent for an org-level cost, which belongs to no object.
example: 16
required:
- entity_type
example:
entity_type: organization
label: Uptime SMS credits
amount: 9
currency: EUR
x-infranest-scope: monitoring.write
x-infranest-token-writable: true
x-infranest-module: costs
x-infranest-errors:
- unauthenticated
- scope_missing
- wrong_organization
- test_token_required
- test_token_sandbox_only
- permission_denied
- write_disabled
- organization_suspended
- not_found
- idempotency_in_progress
- validation_failed
- idempotency_key_reused
- rate_limited
/api/organizations/{organization_id}/cost-items/{costItem_id}:
patch:
summary: Update a cost item
operationId: patchApiOrganizationsOrganization_idCostItemsCostItem_id
description: Changes the cost’s `label`, `amount`, `currency` and `period`. `label`, `amount` and `currency` are required on every update; an omitted `period` resets to monthly.
parameters:
- in: path
name: organization_id
required: true
description: Your organization's ID.
schema:
type: integer
- in: path
name: costItem_id
required: true
description: The costItem's ID.
schema:
type: integer
responses:
'200':
description: OK
content:
application/json:
example:
id: 1
organization_id: 1
cost_itemable_type: null
cost_itemable_id: null
label: Status page SMS credits
amount: '15.00'
currency: EUR
period: monthly
created_at: '2026-01-15T12:00:00.000000Z'
updated_at: '2026-01-15T12:00:00.000000Z'
'401':
$ref: '#/components/responses/Error401'
'403':
$ref: '#/components/responses/Error403'
'404':
$ref: '#/components/responses/Error404'
'422':
$ref: '#/components/responses/Error422'
'429':
$ref: '#/components/responses/Error429'
tags:
- Cost
x-infranest-scope: monitoring.write
x-infranest-token-writable: true
x-infranest-module: costs
requestBody:
required: true
content:
application/json:
example:
label: Status page SMS credits
amount: 15
currency: EUR
x-infranest-errors:
- unauthenticated
- scope_missing
- wrong_organization
- test_token_required
- test_token_sandbox_only
- permission_denied
- write_disabled
- organization_suspended
- not_found
- validation_failed
- rate_limited
delete:
summary: Delete a cost item
operationId: deleteApiOrganizationsOrganization_idCostItemsCostItem_id
description: Deletes the recorded cost.
parameters:
- in: path
name: organization_id
required: true
description: Your organization's ID.
schema:
type: integer
- in: path
name: costItem_id
required: true
description: The costItem's ID.
schema:
type: integer
responses:
'204':
description: No content
'401':
$ref: '#/components/responses/Error401'
'403':
$ref: '#/components/responses/Error403'
'404':
$ref: '#/components/responses/Error404'
'429':
$ref: '#/components/responses/Error429'
tags:
- Cost
x-infranest-scope: monitoring.write
x-infranest-token-writable: true
x-infranest-module: costs
x-infranest-errors:
- unauthenticated
- scope_missing
- wrong_organization
- test_token_required
- test_token_sandbox_only
- permission_denied
- write_disabled
- organization_suspended
- not_found
- rate_limited
components:
responses:
Error409:
description: 'A conflict: the same request is still being handled, or the current state does not allow it. The body is an Error; its `code` says which.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error401:
description: The token is missing, wrong, expired or revoked. The body is an Error; its `code` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error422:
description: The request was understood but cannot be done as sent. The body is an Error; its `code` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error404:
description: Nothing exists at this address, or you cannot see it. The body is an Error; its `code` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error429:
description: 'Too many requests: wait the seconds in Retry-After. The body is an Error; its `code` says which.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Error403:
description: The token or your role may not do this here. The body is an Error; its `code` says which.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
required:
- code
- message
- hint
- retryable
properties:
code:
type: string
enum:
- unauthenticated
- scope_missing
- session_only
- not_token_writable
- write_disabled
- wrong_organization
- token_ip_not_allowed
- test_token_required
- test_token_sandbox_only
- api_token_required
- sandbox_personal
- sandbox_needs_organization
- organization_offline
- permission_denied
- forbidden
- organization_suspended
- read_only_session
- sso_required
- two_factor_setup_required
- password_reset_required
- email_verification_required
- plan_limit
- not_found
- method_not_allowed
- conflict
- validation_failed
- unprocessable
- range_too_large
- rate_limited
- idempotency_key_reused
- idempotency_in_progress
- provider_refused
- provider_rate_limited
- provider_unavailable
- maintenance
- server_error
description: 'What kind of error this is. Stable: codes are added, never renamed or removed.'
message:
type: string
description: A sentence for people. May be reworded.
hint:
type: string
description: What to do about it.
retryable:
type: boolean
description: Whether the same request can succeed later unchanged.
docs_url:
type: string
format: uri
reference:
type: string
description: The request ID; also the X-Request-Id header.
retry_after:
type: integer
description: Seconds to wait before retrying.
required:
type: string
description: The missing token scope (scope_missing).
required_permission:
type: string
description: The missing role permission (permission_denied).
errors:
type: object
additionalProperties:
type: array
items:
type: string
securitySchemes:
default:
type: http
scheme: bearer
description: Create a token in the app under My account → Developer. Tokens are managed in the app only, never through the API.
externalDocs:
description: 'InfraNest: domains, DNS, cloud servers, certificates and uptime monitoring in one place'
url: https://infranest.io