TokPortal Reference API
The Reference API from TokPortal — 2 operation(s) for reference.
The Reference API from TokPortal — 2 operation(s) for reference.
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/tokportal-com:tokportal-com-reference-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: TokPortal Public Reference API
version: '2026-05-25'
description: 'Non-breaking public API contract for TokPortal developer integrations. This spec is the first generated surface for SDKs, CLI, MCP, and docs.
AI: /ai uses a separate USD wallet and quoted, permission-checked operations. Discover models and their schemas, obtain a quote, then execute with the approved maximum USD cost and an Idempotency-Key. An unavailable capability fails closed. AI endpoints do not advertise the legacy dry-run contract.
SANDBOX (non-AI endpoints): every non-GET operation accepts the `X-TokPortal-Dry-Run: true` header. A dry run runs the full validation and pricing path and stops before the first write; nothing is created, no credits are debited, no webhook fires, and no operator sees it. The response keeps the same shape and status as the real call and adds `dry_run: true`, `dry_run_notice`, and `credits_would_charge` with the real price. Errors are byte-identical to the real call: explore an operation, read its real errors, and see what it would cost BEFORE spending anything, because management credits are debited at creation and there is no refund path for those credits. Rate limits are consumed normally, a supplied Idempotency-Key is ignored rather than burned, and identifiers returned by a dry run are synthetic; reuse one in a real call and you get DRY_RUN_ID_IN_LIVE_REQUEST rather than a confusing not-found.'
servers:
- url: https://app.tokportal.com/api/ext
description: Production
security:
- ApiKeyAuth: []
tags:
- name: Reference
paths:
/countries:
get:
operationId: listCountries
summary: List the countries accounts can be created in
description: 'Lists the valid `country` values for bundle creation. Most are ISO-3166-1 alpha-2 (FR, DE, BR), but TokPortal''s own codes are the authority and two of them are not alpha-2: the United States is `USA` and the United Kingdom is `UK`. Their ISO aliases `US` and `GB` are accepted and resolved to those two, so send a code from this list verbatim and never assume alpha-2. Call before createBundle or createBundlesBulk: `country` is validated against this list, and a full country name such as "United States" is rejected. `videos_only_countries` applies only to video orders on an existing account and is never valid for /bundles/bulk.'
tags:
- Reference
security: []
responses:
'200':
description: Country availability by order type. data contains countries available for new account creation; videos_only_countries contains countries available for video orders on an existing account. Fully disabled countries are excluded from both lists.
content:
application/json:
schema:
$ref: '#/components/schemas/CountriesResponse'
headers:
X-TokPortal-API-Version:
description: Current TokPortal public API contract version.
schema:
type: string
example: '2026-05-25'
X-TokPortal-API-Stability:
description: Stability channel for the public API contract.
schema:
type: string
example: stable
X-TokPortal-Request-ID:
description: Request correlation ID. Echoes a valid X-Request-ID request header or uses a generated req_ identifier.
schema:
type: string
example: req_0123456789abcdef0123456789abcdef
x-codeSamples:
- lang: curl
label: curl
source: curl -X GET "https://app.tokportal.com/api/ext/countries"
- lang: JavaScript
label: Node
source: "const response = await fetch('https://app.tokportal.com/api/ext/countries', {\n method: 'GET',\n headers: {\n \n \n }\n});\nconst data = await response.json();"
- lang: Python
label: Python
source: "import json\nimport os\nimport requests\n\nresponse = requests.request(\n 'GET',\n 'https://app.tokportal.com/api/ext/countries',\n headers={}\n)\nprint(response.json())"
- lang: Go
label: Go
source: 'req, _ := http.NewRequest("GET", "https://app.tokportal.com/api/ext/countries", nil)
resp, err := http.DefaultClient.Do(req)'
/platforms:
get:
operationId: listPlatforms
summary: List available platforms
description: 'Lists the orderable platforms and, per video type, the exact required and optional fields. Call before configuring any slot: TikTok carousels require `tiktok_sound_url`, Instagram posts and reels require `instagram_content_type`, and a story takes exactly one of `video_url` or `story_image_url` and no description. Only TikTok and Instagram can be ordered; YouTube fields exist on the video schema but YouTube bundles are rejected with YOUTUBE_DELAYED.'
tags:
- Reference
security: []
responses:
'200':
description: Supported social platforms.
content:
application/json:
schema:
type: object
headers:
X-TokPortal-API-Version:
description: Current TokPortal public API contract version.
schema:
type: string
example: '2026-05-25'
X-TokPortal-API-Stability:
description: Stability channel for the public API contract.
schema:
type: string
example: stable
X-TokPortal-Request-ID:
description: Request correlation ID. Echoes a valid X-Request-ID request header or uses a generated req_ identifier.
schema:
type: string
example: req_0123456789abcdef0123456789abcdef
x-codeSamples:
- lang: curl
label: curl
source: curl -X GET "https://app.tokportal.com/api/ext/platforms"
- lang: JavaScript
label: Node
source: "const response = await fetch('https://app.tokportal.com/api/ext/platforms', {\n method: 'GET',\n headers: {\n \n \n }\n});\nconst data = await response.json();"
- lang: Python
label: Python
source: "import json\nimport os\nimport requests\n\nresponse = requests.request(\n 'GET',\n 'https://app.tokportal.com/api/ext/platforms',\n headers={}\n)\nprint(response.json())"
- lang: Go
label: Go
source: 'req, _ := http.NewRequest("GET", "https://app.tokportal.com/api/ext/platforms", nil)
resp, err := http.DefaultClient.Do(req)'
components:
schemas:
CountriesResponse:
type: object
required:
- data
- videos_only_countries
properties:
data:
type: array
description: Countries where TokPortal can provision a new account.
items:
$ref: '#/components/schemas/CountryOption'
videos_only_countries:
type: array
description: Countries where videos can be ordered for an existing TokPortal account. This can include countries absent from data.
items:
$ref: '#/components/schemas/CountryOption'
CountryOption:
type: object
required:
- code
- name
properties:
code:
type: string
example: DE
name:
type: string
example: Germany
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: TokPortal API key. New keys use the format sk_ followed by 64 lowercase hex characters, are stored as SHA-256 hashes, are shown once at creation, and should never be sent in query parameters.
x-tokportal:
schemaStatus: partial-foundation
canonicalBaseUrl: https://app.tokportal.com/api/ext
intendedConsumers:
- docs
- typescript-sdk
- python-sdk
- go-sdk
- cli
- mcp