View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
readwriteapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
typeenum<MetricType>Optionalaggregation_typeenum<string | null>Requiredaggregation_fieldstringOptionalvaluesarray<string>Requiredapplication/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/metrics" \ -H "Content-Type: application/json" \ -d '{ "name": "API Requests", "code": "api_requests", "type": "METERED", "description": "Measures the total number of API requests made", "aggregation_type": "COUNT", "field_filters": [ { "key": "region", "values": [ "us-east-1", "us-west-1", "eu-west-1" ] } ] }'{ "id": "bm_01H2XT1G7N8E2JHJKBVPDS0TQD", "name": "API Requests", "code": "api_requests", "type": "METERED", "description": "Measures the total number of API requests made", "aggregation_type": "COUNT", "field_filters": [ { "key": "region", "values": [ "us-east-1", "us-west-1", "eu-west-1" ] } ], "created_at": "2023-05-10T14:32:18Z"}