Update PhishLabs integration to use Case Creation API #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the PhishLabs integration to use the official Case Creation API endpoint (
https://caseapi.phishlabs.com/v1/create) as documented at https://caseapi.phishlabs.com/v1/create/docs/.Changes Made
API Models
Updated the internal API request/response models to align with the Case Creation API specification:
Request Model (
PhishLabsApiRequest):CaseTypefield (defaults to "Phishing")Titlefield to provide a summary of the caseDescriptionfield to include both the reported URL and user-provided detailsUrlandTimestampfieldsResponse Model (
PhishLabsApiResponse):IncidentIdtoCaseIdto match the Case Creation API response formatService Implementation
Updated
PhishLabsServiceto construct requests according to the Case Creation API format:"Suspicious URL: {url}"for easy identificationConfiguration
Updated default configuration to use the Case Creation API:
ApiBaseUrlfromhttps://api.phishlabs.comtohttps://caseapi.phishlabs.comServicePathfrom/incidents/your-serviceto/v1/createTesting
Documentation
Updated
PhishLabsIncidentReporter.mdwith the new API endpoint configuration.Benefits
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.