Core: Register API service
metrecept_register_api_serviceRegisters or updates a third-party API service's non-secret shape so receipted GET calls can reach it. Credentials are supplied per call, not stored.
Instructions
Register or update a third-party API service so metrecept_call_api can make receipted GET calls to it. Use it once per vendor before metrecept_call_api; confirm with metrecept_list_api_services, remove with metrecept_unregister_api_service. Stores only the non-secret shape (base URL, path prefix, auth header name, purpose); the credential travels per call as metrecept_call_api's service_key and is never stored. Re-using a name overwrites that service. Private/internal base URLs are rejected. Not billed. Requires a Metrecept API key (METRECEPT_API_KEY env on stdio, or Authorization: Bearer on remote HTTP); results are scoped to that key's tenant only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Service id matching [a-z0-9_-]{1,64}, e.g. "vehicle_data". Re-using a name overwrites it. | |
| purpose | No | Compliance purpose label (default business_api_audit). | business_api_audit |
| base_url | Yes | Absolute public http(s) base URL of the vendor API, e.g. "https://api.vendor.example". Private/internal hosts are rejected. | |
| auth_header_name | No | Header the vendor expects the credential in, e.g. "Authorization" or "X-Api-Key" (default "Authorization"). | Authorization |
| allowed_path_prefix | No | Path prefix every call must stay under (default "/"). | / |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |