TokPortal Profile API

The Profile API from TokPortal — 1 operation(s) for profile.

GitHub OpenAPI

Operations 2

GET /me Start here: your TokPortal workspace, credit balance and access #
PATCH /me Update safe workspace settings #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/tokportal-com:tokportal-com-profile-api"
All apis
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.

Get an API 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 Specification

tokportal-com-profile-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TokPortal Public Profile 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: Profile
paths:
  /me:
    get:
      operationId: getCurrentUser
      summary: 'Start here: your TokPortal workspace, credit balance and access'
      description: 'Returns the authenticated workspace: profile, role, analytics access tier and live credit balance. Call once at the start of a session to learn what this key can do.'
      tags:
      - Profile
      security:
      - ApiKeyAuth: []
      responses:
        '200':
          description: Authenticated user profile and credit balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeResponse'
          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-RateLimit-Limit:
              description: Maximum token bucket capacity for the authenticated API key.
              schema:
                type: integer
                example: 120
            X-RateLimit-Remaining:
              description: Approximate requests remaining for the authenticated API key after this request.
              schema:
                type: integer
                example: 119
            X-RateLimit-Reset:
              description: Unix timestamp at which the current one-minute budget window rolls over.
              schema:
                type: integer
                example: 1779724800
            Retry-After:
              description: Seconds to wait before retrying after a `rate_limited` response. Present on 429 responses only.
              schema:
                type: integer
                example: 12
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          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-RateLimit-Limit:
              description: Maximum token bucket capacity for the authenticated API key.
              schema:
                type: integer
                example: 120
            X-RateLimit-Remaining:
              description: Approximate requests remaining for the authenticated API key after this request.
              schema:
                type: integer
                example: 119
            X-RateLimit-Reset:
              description: Unix timestamp at which the current one-minute budget window rolls over.
              schema:
                type: integer
                example: 1779724800
            Retry-After:
              description: Seconds to wait before retrying after a `rate_limited` response. Present on 429 responses only.
              schema:
                type: integer
                example: 12
      x-codeSamples:
      - lang: curl
        label: curl
        source: "curl -X GET \"https://app.tokportal.com/api/ext/me\" \\\n  -H \"X-API-Key: sk_your_key_here\""
      - lang: JavaScript
        label: Node
        source: "const response = await fetch('https://app.tokportal.com/api/ext/me', {\n  method: 'GET',\n  headers: {\n    'X-API-Key': process.env.TOKPORTAL_API_KEY!,\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/me',\n    headers={\"X-API-Key\": os.environ[\"TOKPORTAL_API_KEY\"]}\n)\nprint(response.json())"
      - lang: Go
        label: Go
        source: 'req, _ := http.NewRequest("GET", "https://app.tokportal.com/api/ext/me", nil)

          req.Header.Set("X-API-Key", os.Getenv("TOKPORTAL_API_KEY"))

          resp, err := http.DefaultClient.Do(req)'
    patch:
      operationId: updateCurrentUserSettings
      summary: Update safe workspace settings
      description: Updates client-owned workspace profile fields used by Operator context. Does not expose auth, role, credit, staff, or manager settings.
      tags:
      - Profile
      security:
      - ApiKeyAuth: []
      parameters:
      - name: X-TokPortal-Dry-Run
        in: header
        required: false
        description: 'Send `true` (or `1`/`yes`) to SIMULATE this call instead of executing it. A dry run performs the full validation and pricing path of the real operation and stops before the first write: no credits are debited, no rows are created, no webhooks fire, and no operator ever sees it. The response has the same shape and status as the real call and adds `dry_run: true`, `dry_run_notice`, and — on credit-spending operations — `credits_would_charge` carrying the real price. Errors are identical to the real call, which is the point: this is how you learn what an operation will do before paying for it. Rate limits are consumed normally, a supplied Idempotency-Key is ignored rather than burned, and identifiers returned by a dry run are synthetic (see DRY_RUN_ID_IN_LIVE_REQUEST).'
        schema:
          type: string
          enum:
          - 'true'
          - '1'
          - 'yes'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCurrentUserSettingsRequest'
      responses:
        '200':
          description: Updated safe workspace settings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCurrentUserSettingsResponse'
          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-RateLimit-Limit:
              description: Maximum token bucket capacity for the authenticated API key.
              schema:
                type: integer
                example: 120
            X-RateLimit-Remaining:
              description: Approximate requests remaining for the authenticated API key after this request.
              schema:
                type: integer
                example: 119
            X-RateLimit-Reset:
              description: Unix timestamp at which the current one-minute budget window rolls over.
              schema:
                type: integer
                example: 1779724800
            Retry-After:
              description: Seconds to wait before retrying after a `rate_limited` response. Present on 429 responses only.
              schema:
                type: integer
                example: 12
            Idempotent-Replayed:
              description: Present with value true when a mutating request is replayed from a completed Idempotency-Key.
              schema:
                type: string
                enum:
                - 'true'
            X-TokPortal-Dry-Run:
              description: Present and set to `true` when the request was simulated. This is the only dry-run marker on error responses, so a client can confirm it spent nothing without parsing the body.
              schema:
                type: string
                enum:
                - 'true'
        '400':
          description: Invalid workspace setting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          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-RateLimit-Limit:
              description: Maximum token bucket capacity for the authenticated API key.
              schema:
                type: integer
                example: 120
            X-RateLimit-Remaining:
              description: Approximate requests remaining for the authenticated API key after this request.
              schema:
                type: integer
                example: 119
            X-RateLimit-Reset:
              description: Unix timestamp at which the current one-minute budget window rolls over.
              schema:
                type: integer
                example: 1779724800
            Retry-After:
              description: Seconds to wait before retrying after a `rate_limited` response. Present on 429 responses only.
              schema:
                type: integer
                example: 12
            Idempotent-Replayed:
              description: Present with value true when a mutating request is replayed from a completed Idempotency-Key.
              schema:
                type: string
                enum:
                - 'true'
            X-TokPortal-Dry-Run:
              description: Present and set to `true` when the request was simulated. This is the only dry-run marker on error responses, so a client can confirm it spent nothing without parsing the body.
              schema:
                type: string
                enum:
                - 'true'
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          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-RateLimit-Limit:
              description: Maximum token bucket capacity for the authenticated API key.
              schema:
                type: integer
                example: 120
            X-RateLimit-Remaining:
              description: Approximate requests remaining for the authenticated API key after this request.
              schema:
                type: integer
                example: 119
            X-RateLimit-Reset:
              description: Unix timestamp at which the current one-minute budget window rolls over.
              schema:
                type: integer
                example: 1779724800
            Retry-After:
              description: Seconds to wait before retrying after a `rate_limited` response. Present on 429 responses only.
              schema:
                type: integer
                example: 12
            Idempotent-Replayed:
              description: Present with value true when a mutating request is replayed from a completed Idempotency-Key.
              schema:
                type: string
                enum:
                - 'true'
            X-TokPortal-Dry-Run:
              description: Present and set to `true` when the request was simulated. This is the only dry-run marker on error responses, so a client can confirm it spent nothing without parsing the body.
              schema:
                type: string
                enum:
                - 'true'
      x-codeSamples:
      - lang: curl
        label: curl
        source: "curl -X PATCH \"https://app.tokportal.com/api/ext/me\" \\\n  -H \"X-API-Key: sk_your_key_here\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"company_name\": \"company_name\",\n  \"website\": \"website\",\n  \"company_niche\": \"company_niche\",\n  \"organic_strategy\": \"organic_strategy\"\n}'"
      - lang: JavaScript
        label: Node
        source: "const response = await fetch('https://app.tokportal.com/api/ext/me', {\n  method: 'PATCH',\n  headers: {\n    'X-API-Key': process.env.TOKPORTAL_API_KEY!,\n    'Content-Type': 'application/json',\n    \n  },\n  body: JSON.stringify({\n  \"company_name\": \"company_name\",\n  \"website\": \"website\",\n  \"company_niche\": \"company_niche\",\n  \"organic_strategy\": \"organic_strategy\"\n})\n});\nconst data = await response.json();"
      - lang: Python
        label: Python
        source: "import json\nimport os\nimport requests\n\nresponse = requests.request(\n    'PATCH',\n    'https://app.tokportal.com/api/ext/me',\n    headers={\"X-API-Key\": os.environ[\"TOKPORTAL_API_KEY\"]},\n    json=json.loads(\"{\\n  \\\"company_name\\\": \\\"company_name\\\",\\n  \\\"website\\\": \\\"website\\\",\\n  \\\"company_niche\\\": \\\"company_niche\\\",\\n  \\\"organic_strategy\\\": \\\"organic_strategy\\\"\\n}\")\n)\nprint(response.json())"
      - lang: Go
        label: Go
        source: 'req, _ := http.NewRequest("PATCH", "https://app.tokportal.com/api/ext/me", strings.NewReader("{\n  \"company_name\": \"company_name\",\n  \"website\": \"website\",\n  \"company_niche\": \"company_niche\",\n  \"organic_strategy\": \"organic_strategy\"\n}"))

          req.Header.Set("X-API-Key", os.Getenv("TOKPORTAL_API_KEY"))

          req.Header.Set("Content-Type", "application/json")

          resp, err := http.DefaultClient.Do(req)'
components:
  schemas:
    MeResponse:
      type: object
      required:
      - data
      properties:
        data:
          type: object
          required:
          - id
          - email
          - credits
          - api_key
          properties:
            id:
              type: string
              format: uuid
            email:
              type: string
              format: email
            full_name:
              type:
              - string
              - 'null'
            company_name:
              type:
              - string
              - 'null'
            website:
              type:
              - string
              - 'null'
            company_niche:
              type:
              - string
              - 'null'
            organic_strategy:
              type:
              - string
              - 'null'
            role:
              type:
              - string
              - 'null'
            country:
              type:
              - string
              - 'null'
            credits:
              type: object
              required:
              - balance
              properties:
                balance:
                  type: number
            subscription:
              type:
              - object
              - 'null'
              additionalProperties: true
            api_key:
              type: object
              required:
              - id
              - name
              properties:
                id:
                  type: string
                  format: uuid
                name:
                  type: string
    UpdateCurrentUserSettingsRequest:
      type: object
      properties:
        company_name:
          type:
          - string
          - 'null'
          maxLength: 120
        website:
          type:
          - string
          - 'null'
          maxLength: 300
        company_niche:
          type:
          - string
          - 'null'
          maxLength: 300
        organic_strategy:
          type:
          - string
          - 'null'
          maxLength: 500
      minProperties: 1
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: 'Stable machine-readable error code. Branch on this, never on the message. One code can be returned by any operation that takes an identifier: DRY_RUN_ID_IN_LIVE_REQUEST (400) means you passed an identifier produced by a dry run to a real call — re-run the creation without the X-TokPortal-Dry-Run header to obtain a real one. Error responses are identical in dry-run and real mode; the X-TokPortal-Dry-Run response header is what tells them apart.'
            message:
              type: string
            details:
              type: object
              additionalProperties: true
    UpdateCurrentUserSettingsResponse:
      type: object
      required:
      - data
      properties:
        data:
          type: object
          required:
          - id
          properties:
            id:
              type: string
              format: uuid
            company_name:
              type:
              - string
              - 'null'
            website:
              type:
              - string
              - 'null'
            company_niche:
              type:
              - string
              - 'null'
            organic_strategy:
              type:
              - string
              - 'null'
  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