Benji Pays Whoami API

Authentication verification and testing endpoints

Operations 2

GET /v2/whoami Get current actor information #
POST /v2/whoami/echo Echo request body #

Specifications

Schemas & Data

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/benjipays-com:benjipays-com-whoami-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

benjipays-com-whoami-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Benjipays Com Whoami API
  version: 2.0.0
  contact:
    name: Benji Pays API Support
    email: benji@benjipays.com
  description: 'Operations tagged Whoami across 2 of this provider''s published API definitions: benjipays-com-benji-pays-merchant-api-openapi.yml, benjipays-com-benji-pays-partner-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.benjipays.com
  description: Development server
tags:
- name: Whoami
  description: Authentication verification and testing endpoints
paths:
  /v2/whoami:
    get:
      summary: Get current actor information
      description: '**Access:** Requires any authenticated actor (Auth0 JWT or organization API key)


        Returns authenticated actor details and permissions. Accepts either an Auth0 Bearer token or an organization-scoped `x-api-key`.'
      tags:
      - Whoami
      security:
      - ApiKeyAuth: []
      parameters:
      - $ref: '#/components/parameters/RequestIdHeader'
      - $ref: '#/components/parameters/CorrelationIdHeader'
      - in: query
        name: includeDetails
        schema:
          description: When "true", includes additional diagnostic information
          example: 'false'
          type: string
          enum:
          - 'true'
          - 'false'
        description: When "true", includes additional diagnostic information
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhoamiResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication credentials
          content:
            application/problem+json:
              schema:
                example:
                  type: https://api.benjipays.com/problems/unauthorized
                  title: Unauthorized
                  status: 401
                  detail: Invalid or missing authentication token
                  instance: /v2/whoami
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/problem+json:
              schema:
                example:
                  type: https://api.benjipays.com/problems/rate-limit-exceeded
                  title: Too Many Requests
                  status: 429
                  detail: Rate limit exceeded. Please retry after the specified time.
                  instance: /v2/whoami
                  retryAfterSeconds: 1
                  limit: 5
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getV2Whoami
      x-operation-id-source: derived
    servers:
    - url: https://api.benjipays.com
      description: Development server
  /v2/whoami/echo:
    post:
      summary: Echo request body
      description: '**Access:** Requires any authenticated actor (DISTRIBUTOR, PARTNER, or ORGANIZATION)


        Validates and echoes back the request body. Requires JWT authentication.'
      tags:
      - Whoami
      security:
      - BearerAuth: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  minLength: 1
                  maxLength: 500
                  description: Message to echo back
                  example: Hello, API!
                metadata:
                  description: Optional metadata
                  type: object
                  properties:
                    source:
                      description: Source of the message
                      example: test-client
                      type: string
                      maxLength: 100
                    timestamp:
                      description: ISO 8601 timestamp
                      example: '2024-01-01T00:00:00.000Z'
                      type: string
                      format: date-time
                      pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              required:
              - message
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EchoResponse'
        '400':
          description: Bad Request - Validation error
          content:
            application/problem+json:
              schema:
                example:
                  type: https://api.benjipays.com/problems/forbidden
                  title: Bad Request
                  status: 400
                  detail: Bad request. Validation error
                  instance: /v2/whoami
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/problem+json:
              schema:
                example:
                  type: https://api.benjipays.com/problems/unauthorized
                  title: Unauthorized
                  status: 401
                  detail: Invalid or missing authentication token
                  instance: /v2/whoami
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/problem+json:
              schema:
                example:
                  type: https://api.benjipays.com/problems/rate-limit-exceeded
                  title: Too Many Requests
                  status: 429
                  detail: Rate limit exceeded. Please retry after the specified time.
                  instance: /v2/whoami
                  retryAfterSeconds: 1
                  limit: 5
                $ref: '#/components/schemas/ErrorResponse'
      parameters:
      - $ref: '#/components/parameters/RequestIdHeader'
      - $ref: '#/components/parameters/CorrelationIdHeader'
      - $ref: '#/components/parameters/IdempotencyKeyHeader'
      operationId: postV2WhoamiEcho
      x-operation-id-source: derived
    servers:
    - url: https://api.benjipays.com
      description: Development server
components:
  parameters:
    RequestIdHeader:
      name: X-Request-ID
      in: header
      required: false
      description: Optional client-supplied unique ID for one request. The server generates a UUID v4 if omitted and always echoes the value in the response.
      schema:
        type: string
        format: uuid
    CorrelationIdHeader:
      name: X-Correlation-ID
      in: header
      required: false
      description: Optional ID that flows across service boundaries for distributed tracing. The server generates a UUID v4 if omitted and always echoes the value in the response.
      schema:
        type: string
        format: uuid
    IdempotencyKeyHeader:
      name: Idempotency-Key
      in: header
      required: false
      description: 'Optional client-supplied key that makes retries safe for POST/PATCH/PUT. Scoped per actor; cached for 24 hours. Replays return the cached response with `X-Idempotency-Replayed: true`. Same key with a different body returns 409. In-flight duplicates return 429 with `Retry-After`. See the Idempotency section in the API overview.'
      schema:
        type: string
        pattern: ^[a-zA-Z0-9]+$
        minLength: 1
        maxLength: 255
      example: a1b2c3d4e5f6
  schemas:
    WhoamiResponse:
      type: object
      properties:
        actor:
          $ref: '#/components/schemas/Actor'
        permissions:
          type: array
          items:
            type: string
          description: List of permissions granted to the actor
          example:
          - partners:accounts:read
          - partners:subscriptions:read
        message:
          type: string
          description: Response message
          example: hello from api /v2/whoami
        jsIntegrationDemo:
          type: string
          description: JavaScript integration demo value
          example: demo-value
        formattedAmount:
          type: string
          description: Formatted currency amount
          example: $123.46
        requestTimestamp:
          description: Request timestamp (included when includeDetails=true)
          example: '2024-01-01T00:00:00.000Z'
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        apiVersion:
          description: API version (included when includeDetails=true)
          example: v2
          type: string
      required:
      - actor
      - permissions
      - message
      - jsIntegrationDemo
      - formattedAmount
      additionalProperties: false
      description: Whoami response
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          description: Problem type URI
          example: https://api.benjipays.com/problems/unauthorized
        title:
          type: string
          description: Error title
          example: Unauthorized
        status:
          type: number
          description: HTTP status code
          example: 401
        detail:
          type: string
          description: Error detail message
          example: Invalid or missing authentication token
        instance:
          description: Instance URI
          example: /v2/whoami
          type: string
      required:
      - type
      - title
      - status
      - detail
      additionalProperties: false
      description: Error response (RFC 7807 Problem Details)
    Actor:
      type: object
      properties:
        type:
          type: string
          enum:
          - distributor
          - partner
          - internal
          - organization
          description: Type of actor
          example: partner
        actorId:
          description: Actor identifier
          example: bp-actor-123
          type: string
      required:
      - type
      additionalProperties: false
      description: Actor information for the authenticated caller
    EchoResponse:
      type: object
      properties:
        message:
          type: string
          description: Response message
          example: Echo response
        echo:
          type: object
          properties:
            message:
              type: string
              minLength: 1
              maxLength: 500
              description: Message to echo back
              example: Hello, API!
            metadata:
              description: Optional metadata
              type: object
              properties:
                source:
                  description: Source of the message
                  example: test-client
                  type: string
                  maxLength: 100
                timestamp:
                  description: ISO 8601 timestamp
                  example: '2024-01-01T00:00:00.000Z'
                  type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              additionalProperties: false
          required:
          - message
          additionalProperties: false
          description: Echoed request body
        receivedAt:
          type: string
          format: date-time
          pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
          description: ISO 8601 timestamp when request was received
          example: '2024-01-01T00:00:00.000Z'
      required:
      - message
      - echo
      - receivedAt
      additionalProperties: false
      description: Echo response
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Organization-scoped API key. Send it in the x-api-key header. Available on organization endpoints only.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Auth0 JWT token obtained via OAuth2 client credentials flow. Include the token in the Authorization header as: Bearer <token>'
x-refined-from:
- benjipays-com-benji-pays-merchant-api-openapi.yml
- benjipays-com-benji-pays-partner-api-openapi.yml
x-speakeasy-retries:
  strategy: backoff
  backoff:
    initialInterval: 500
    maxInterval: 60000
    maxElapsedTime: 3600000
    exponent: 1.5
  statusCodes:
  - 5XX
  retryConnectionErrors: true
x-provenance:
  method: searched
  source: https://developer.benjipays.com/reference
  harvested: '2026-11-02'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://developer.benjipays.com/reference/delete_v2-customers-customerid-alert.md
  - https://developer.benjipays.com/reference/delete_v2-customers-customerid-notes-noteid.md
  - https://developer.benjipays.com/reference/get_v2-accounting-accounts.md
  - https://developer.benjipays.com/reference/get_v2-autoprocessing-forecast.md
  - https://developer.benjipays.com/reference/get_v2-customers-customerid-notes-noteid.md
  - https://developer.benjipays.com/reference/get_v2-customers-customerid-notes.md
  - https://developer.benjipays.com/reference/get_v2-customers-customerid.md
  - https://developer.benjipays.com/reference/get_v2-customers.md
  - https://developer.benjipays.com/reference/get_v2-emails-emailid.md
  - https://developer.benjipays.com/reference/get_v2-emails.md
  - https://developer.benjipays.com/reference/get_v2-gateways-capabilities.md
  - https://developer.benjipays.com/reference/get_v2-gateways.md
  - https://developer.benjipays.com/reference/get_v2-invoices-invoiceid-pdf.md
  - https://developer.benjipays.com/reference/get_v2-invoices-invoiceid.md
  - https://developer.benjipays.com/reference/get_v2-invoices.md
  - https://developer.benjipays.com/reference/get_v2-notes-categories.md
  - https://developer.benjipays.com/reference/get_v2-notes-statuses.md
  - https://developer.benjipays.com/reference/get_v2-organization.md
  - https://developer.benjipays.com/reference/get_v2-payment-method-requests-paymentmethodrequestid.md
  - https://developer.benjipays.com/reference/get_v2-payment-method-requests.md
  - https://developer.benjipays.com/reference/get_v2-payment-methods-id.md
  - https://developer.benjipays.com/reference/get_v2-payment-methods.md
  - https://developer.benjipays.com/reference/get_v2-settings.md
  - https://developer.benjipays.com/reference/get_v2-transactions-transactionid-receipt.md
  - https://developer.benjipays.com/reference/get_v2-transactions.md
  - https://developer.benjipays.com/reference/get_v2-users.md
  - https://developer.benjipays.com/reference/get_v2-whoami-1.md
  - https://developer.benjipays.com/reference/patch_v2-customers-customerid-notes-noteid.md
  - https://developer.benjipays.com/reference/patch_v2-customers-customerid.md
  - https://developer.benjipays.com/reference/post_v2-customers-customerid-alert.md
  - https://developer.benjipays.com/reference/post_v2-customers-customerid-notes-noteid-replies.md
  - https://developer.benjipays.com/reference/post_v2-customers-customerid-notes-noteid-status.md
  - https://developer.benjipays.com/reference/post_v2-customers-customerid-notes.md
  - https://developer.benjipays.com/reference/post_v2-payment-links-applied-invoiceid.md
  - https://developer.benjipays.com/reference/post_v2-payment-links-unapplied.md
  - https://developer.benjipays.com/reference/post_v2-payment-method-requests.md
  - https://developer.benjipays.com/reference/post_v2-transactions-prepayments.md
  - https://developer.benjipays.com/reference/post_v2-transactions-transactionid-resend-receipt.md
  - https://developer.benjipays.com/reference/post_v2-transactions-transactionid-retry-accounting.md
  - https://developer.benjipays.com/reference/post_v2-transactions.md
  merge:
    pages: 40
    deduped: 167
    conflicts_kept_first: 0