Developer Docs

REST API

REST API

Use the base URL for the current API. Service paths are appended directly to it.

Base URL

https://api.pinglymcp.com

Existing /v1/* routes remain compatibility aliases. If a future API version changes behavior, the root can move to the new current version while /v1 remains available for the older contract.

Authentication

The REST API accepts either a personal pmcp_ key or a short-lived OAuth access token issued by https://auth.pinglymcp.com for this API resource with the api:access scope.

Authorization: Bearer pmcp_...
Authorization: Bearer <OAuth access token>

See Authentication for the personal-key and OAuth authorization-code flows.

Account and discovery

GET/account

Returns the account associated with the API key.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

This endpoint takes no parameters.

Request JSON
{}
Live REST request
curl https://api.pinglymcp.com/account \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY"
GET/services

Returns the same shared service definitions used to build the MCP tool schemas and the documentation below.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

This endpoint takes no parameters.

Request JSON
{}
Live REST request

Services

Explore each endpoint, customize its parameters, and send a live request.

Ping

POST/pingRead-only · free

Check public IPv4 addresses, IPv6 addresses, and domain names for network reachability. Costs 0 credits.

Response: Success returns ok, data.request, data.ping, and meta. Errors use stable product codes, retry guidance, and a request ID.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

Public IPv4 address, IPv6 address, or domain name to check.

Request JSON
{
  "target": "example.com"
}
Live REST request
targetstring

Required

Public IPv4 address, IPv6 address, or domain name to check.

curl -X POST https://api.pinglymcp.com/ping \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"target":"example.com"}'

Describe Website

POST/website/describeRead-only · uses credits

Render a public website, capture its viewport before AI analysis, and return a description, screenshot URL, and visible navigation links. Costs 1 credits.

Response: Success returns ok, data.request, data.page (requested/resolved URLs, title, screenshot), data.analysis, data.content, data.navigation, and meta. The screenshot URL is public to anyone with the link and expires after seven days. data.page.screenshot is null if capture or storage fails. data.navigation.links contains up to 12 visible links; data.navigation is null if the scan fails. Links are reported, not visited. Errors return ok: false, error (code, message, retryable, optional details), and meta.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

Public HTTP(S) website URL to render and describe.

Optional parameters

Optional focus for the visual description.

Request JSON
{
  "url": "https://example.com"
}
Live REST request
urlstring

Required

Public HTTP(S) website URL to render and describe.

instructionstring

Optional

Optional focus for the visual description.

curl -X POST https://api.pinglymcp.com/website/describe \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","instruction":"Focus on the navigation and primary call to action."}'

Contact Website

POST/contacts/sendExternal action · confirm first

Contact a website owner from a public URL by email or contact form, with optional AI-assistance for difficult form workflows. Costs 1 credits when completed without AI, or 10 credits when AI assistance is used.

Response: Success returns ok, data.request (effective contact values), data.page (requested/target URLs and optional screenshot), data.contact (method, status, submission, verification, confirmation), and meta (billing and safe debug summary). Email results additionally include data.contact.email with from (effective From address), replyTo (effective Reply-To address, or null when no header was sent), and status: accepted. Accepted confirms submission to the sending service, not inbox delivery. This optional object is absent for contact forms and may be absent in older results. Errors use stable product codes and retryable flags. An unconfirmed submission is never safe to retry automatically.

Email delivery behavior

Include the required email parameter in every request. Set it to an empty string to use the selected API key’s email account. Manage accounts in Dashboard → Emails and assign them in API Keys.

email is an empty string (or whitespace)

Use the email account assigned to the API key. Send through its SMTP server with that account’s From address and no Reply-To header.

email matches the assigned account address (case-insensitive)

Send through the assigned SMTP server with the saved From address and no Reply-To header.

email is a different nonempty address, or nonempty with no assigned account

Send from hello@pinglymcp.com with the supplied email as Reply-To. The assigned SMTP credentials are not used.

email is blank and the key has no assigned account

Reject the request before execution or charging credits. Supply an email or assign an account to the key.

SMTP is selected but the account has not passed authentication

Reject the request; do not switch senders or resend through another transport.

Delivery uses a contact form

Use the supplied email in form fields, or the assigned address when blank. No SMTP message is sent.

OAuth requests have no personal-key email assignment, so provide a nonempty email for Reply-To. Saving an SMTP account checks authentication without sending a message; it does not guarantee inbox delivery.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

Public HTTP(S) website URL to contact. A direct contact-page URL is allowed and its path/query are preserved.

Sender name used for email Reply-To and contact-form fields. Tabs become spaces; other control characters are not allowed.

Required parameter; supply a plain ASCII email address without quoted mailbox syntax, or an empty string to select the SMTP email assigned to your API key. A matching address also sends through SMTP without Reply-To. A different address sends from hello@pinglymcp.com with this address as Reply-To. Contact forms use this address or the assigned account address. A nonempty address is required when no email account is assigned.

Email or contact-form subject. Tabs become spaces; other control characters are not allowed.

Message to send to the website owner.

Optional parameters

Delivery method. auto prefers contact via email. Choose your preferred contact method. Default: auto.

Enable AI-assistance for automated contact-form discovery and submission. Default: false.

Optional phonetic spelling for contact forms that request it.

Optional phone country/area extension for contact forms.

Optional phone number for contact forms.

Optional state/region for contact forms.

Optional city for contact forms.

Request JSON
{
  "url": "https://example.com/contact-us",
  "name": "Your Name",
  "email": "you@example.com",
  "subject": "Hello",
  "message": "I would like to get in touch.",
  "method": "auto",
  "use_ai": false
}
Live REST request
urlstring

Required

Public HTTP(S) website URL to contact. A direct contact-page URL is allowed and its path/query are preserved.

namestring

Required

Sender name used for email Reply-To and contact-form fields. Tabs become spaces; other control characters are not allowed.

emailstring

Required · may be blank

Required parameter; supply a plain ASCII email address without quoted mailbox syntax, or an empty string to select the SMTP email assigned to your API key. A matching address also sends through SMTP without Reply-To. A different address sends from hello@pinglymcp.com with this address as Reply-To. Contact forms use this address or the assigned account address. A nonempty address is required when no email account is assigned.

subjectstring

Required

Email or contact-form subject. Tabs become spaces; other control characters are not allowed.

messagestring

Required

Message to send to the website owner.

methodauto | email | contact_form

Optional · Default: auto

Delivery method. auto prefers contact via email. Choose your preferred contact method.

use_aiboolean

Optional · Default: false

Enable AI-assistance for automated contact-form discovery and submission.

phonetic_namestring

Optional

Optional phonetic spelling for contact forms that request it.

phone_number_extstring

Optional

Optional phone country/area extension for contact forms.

phone_numberstring

Optional

Optional phone number for contact forms.

statestring

Optional

Optional state/region for contact forms.

citystring

Optional

Optional city for contact forms.

Interactive example

Build a contact request

Fill in the four steps. The cURL request updates as you build it, using the same fields accepted by contact_website.

  1. 01

    Find the site

    A public website or direct contact-page URL.

  2. 02

    Identify yourself

    Leave email blank to use the address assigned to the API key.

  3. 03

    Write the message

  4. 04

    Choose the path

Generated cURL

Uses $PINGLYMCP_API_KEY so the secret stays out of the example.

curl -X POST https://api.pinglymcp.com/contacts/send \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/contact-us","name":"Your Name","email":"you@example.com","subject":"Hello","message":"I would like to get in touch.","method":"auto","use_ai":false}'
Request JSON
{
  "url": "https://example.com/contact-us",
  "name": "Your Name",
  "email": "you@example.com",
  "subject": "Hello",
  "message": "I would like to get in touch.",
  "method": "auto",
  "use_ai": false
}

This builds an example only. Contact requests send a real email or submit a real form, so review the message and confirm the action before running it.

curl -X POST https://api.pinglymcp.com/contacts/send \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/contact-us","name":"Your Name","email":"you@example.com","subject":"Hello","message":"I would like to get in touch.","method":"auto","use_ai":false}'

Billing

Billing permissions on a personal key apply to both REST billing endpoints and MCP billing tools. Choose Read for billing reads or Manage for reads and changes; OAuth clients request billing:read or billing:manage alongside api:access. Billing calls cost zero credits. Reuse operationKey when retrying a mutation. Complete hosted Checkout before expecting purchased credits; preview subscription changes before confirming them. See Billing and credits for the payment workflow, operation states and sandbox guide.

Get billing account

GET/billingRead-only · uses credits

Read your subscription and credits. Requires billing:read. Costs 0 credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Request JSON
{}
Live REST request
curl 'https://api.pinglymcp.com/billing' \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY"

Get billing history

GET/billing/historyRead-only · uses credits

Read purchases, invoices and refunds. Requires billing:read. Costs 0 credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Optional parameters

Maximum number of records.

Pagination cursor returned by the previous response.

Request JSON
{}
Live REST request
limitnumber

Optional

Maximum number of records.

cursorstring

Optional

Pagination cursor returned by the previous response.

curl 'https://api.pinglymcp.com/billing/history?limit=20' \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY"

Create credit top-up

POST/billing/top-upsExternal action · confirm first

Create a hosted payment link to buy credits. Payment must complete before credits are granted. Requires billing:manage. Costs 0 service credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

USD cents to spend, from 500 ($5) to 100000 ($1,000). Each cent buys one credit.

A unique key for this operation. Reuse the same key and arguments when retrying.

Request JSON
{
  "topUpCents": 500,
  "operationKey": "purchase-2026-09-27-001"
}
Live REST request
topUpCentsnumber

Required

USD cents to spend, from 500 ($5) to 100000 ($1,000). Each cent buys one credit.

operationKeystring

Required

A unique key for this operation. Reuse the same key and arguments when retrying.

curl -X POST https://api.pinglymcp.com/billing/top-ups \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topUpCents":500,"operationKey":"purchase-2026-09-27-001"}'

Get billing operation

GET/billing/operations/:idRead-only · uses credits

Check whether a billing operation requires payment, is pending, or has completed. Requires billing:read. Costs 0 credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

The operation ID returned when the operation was created.

Request JSON
{
  "operationId": "billing_operation_id"
}
Live REST request
operationIdstring

Required

The operation ID returned when the operation was created.

curl 'https://api.pinglymcp.com/billing/operations/billing_operation_id' \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY"

Create subscription checkout

POST/billing/subscriptions/checkoutExternal action · confirm first

Create a hosted payment link for a new subscription. Requires billing:manage. Costs 0 service credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

The paid subscription plan.

A unique key for this operation. Reuse the same key and arguments when retrying.

Request JSON
{
  "plan": "developer",
  "operationKey": "purchase-2026-09-27-001"
}
Live REST request
plandeveloper | startup

Required

The paid subscription plan.

operationKeystring

Required

A unique key for this operation. Reuse the same key and arguments when retrying.

curl -X POST https://api.pinglymcp.com/billing/subscriptions/checkout \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan":"developer","operationKey":"purchase-2026-09-27-001"}'

Preview subscription change

POST/billing/subscriptions/previewRead-only · uses credits

Preview an upgrade, downgrade, cancellation at renewal, reversal of cancellation, or removal of a scheduled downgrade while keeping the current plan. Upgrades require successful payment; downgrades apply at renewal. Requires billing:manage. Costs 0 credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

The proposed subscription change.

Optional parameters

Required for an upgrade or downgrade; omit for cancel, resume, or keep_current.

Request JSON
{
  "action": "upgrade"
}
Live REST request
actionupgrade | downgrade | cancel | resume | keep_current

Required

The proposed subscription change.

plandeveloper | startup

Optional

Required for an upgrade or downgrade; omit for cancel, resume, or keep_current.

curl -X POST https://api.pinglymcp.com/billing/subscriptions/preview \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"upgrade","plan":"developer"}'

Change subscription

POST/billing/subscriptions/changeExternal action · confirm first

Confirm an unexpired preview. May charge the saved payment method for an upgrade. Review the preview before calling. Requires billing:manage. Costs 0 service credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

The unexpired preview ID to confirm.

A unique key for this operation. Reuse the same key and arguments when retrying.

Request JSON
{
  "previewId": "billing_preview_id",
  "operationKey": "purchase-2026-09-27-001"
}
Live REST request
previewIdstring

Required

The unexpired preview ID to confirm.

operationKeystring

Required

A unique key for this operation. Reuse the same key and arguments when retrying.

curl -X POST https://api.pinglymcp.com/billing/subscriptions/change \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"previewId":"billing_preview_id","operationKey":"purchase-2026-09-27-001"}'

Create billing portal session

POST/billing/portalRead-only · uses credits

Create a private hosted link for payment methods and invoices. Share it only with the account owner. Requires billing:manage. Costs 0 credits.

Try it live

Sign in to select an account key. Creating a key will take you through sign in.

Required parameters

A unique key for this operation. Reuse the same key and arguments when retrying.

Request JSON
{
  "operationKey": "purchase-2026-09-27-001"
}
Live REST request
operationKeystring

Required

A unique key for this operation. Reuse the same key and arguments when retrying.

curl -X POST https://api.pinglymcp.com/billing/portal \
  -H "Authorization: Bearer $PINGLYMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operationKey":"purchase-2026-09-27-001"}'
contact_website email delivery
Include email in every contact_website request. Blank or matching assigned addresses use SMTP without Reply-To. A different address sends from hello@pinglymcp.com with that address as Reply-To. See the delivery table below. use_ai defaults to false; method=email never needs AI.