API penetration testing

Different clients can use the same API without ever touching the web interface. If you serve a mobile app, a partner, or another internal service, list the operations and permissions that matter to each. That sets the boundary for a REST or GraphQL assessment.

Discuss a test

For the first conversation

  • API type and a rough count of endpoints or GraphQL operations.
  • Which apps, partners, or internal services use it.
  • The roles involved and whether an OpenAPI spec or Postman collection exists.

Leave passwords, tokens, source files, and customer data out of the contact form.

What to put in an API test

Area What is examined
Record-level permissions Whether a caller can read or change only the records that belong to them or their organization.
Identity and operation permissions How the API identifies each caller and decides which operations they may use.
Input and data exposure What the server accepts and which fields it returns to each client.
GraphQL operations The agreed queries and mutations, including access to their individual fields.

The system owner must authorize the work. The written scope sets out what can be assessed.

Testing reference: OWASP API Security Top 10.

What a finding looks like

Sample report · all data is fictional

WS-CONTOH-04

A customer account can call admin functions through the API

Broken Function Level Authorization

Risk rating
High CVSS 3.1: 8.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Affected
POST /api/v1/admin/users/{id}/role

Note: For management: privilege escalation reachable with an ordinary account.

Summary

A token issued to an ordinary customer account is accepted by an administrative endpoint. Authorisation checks the token, but not the role behind it.

Evidence

POST /api/v1/admin/users/8841/role HTTP/1.1
Host: api.contoh.test
Authorization: Bearer <token akun pelanggan>

{"role":"admin"}

HTTP/1.1 200 OK

The account was created with the customer role only.

Note: For developers: the exact request and the token used.

Impact

Any customer can grant themselves administrative rights.

Recommendation

Enforce the required role on the server for every administrative route, and deny by default. Audit neighbouring endpoints that share the same authorisation middleware.

Note: For your team: the missing role check, and where else it is missing.

Status

Open

Note: Re-tested once the role check is enforced server-side.

This sample is fictional. The system, organisation and data were invented for illustration and do not come from client work. Download the full sample report (PDF) ↗

The API test report

Report section Contents
Impact summary The data or operations affected and why the issue matters.
Findings by endpoint or operation The affected API surface and role, with evidence that shows what went wrong.
Recommendations for the API owner The server-side permission check or data-handling rule that needs changing.

Download the sample report (PDF) ↗ A fictional scenario, not a client report.

Questions before booking

What drives the cost of an API pentest?

Endpoint count is a starting point. The quote also reflects how many roles and integrations are in scope and whether customer organizations share the same API. A small API can still have complex permission boundaries.

Do we need complete API documentation?

For the first discussion, describe the main workflows and give an approximate operation count. Tell us what is documented. If the engagement needs to include filling in the endpoint inventory, agree on those limits in writing.

When is a separate API test useful?

Consider one if partners or mobile apps call the API, or if it exposes operations your website never uses. A workflow covered through the web UI does not establish coverage of every API operation.

Can we scope REST and GraphQL together?

Yes. List both, along with the relevant versions and roles, so the quote can state which endpoints and GraphQL operations it covers.

Plan coverage for your API

Send the system you want tested, roughly how big it is, and your target date.