{"files":{"SKILL.md":"---\nname: postmark-api\ndescription: \"Postmark API skill. Use when working with Postmark for email, deliverystats, bounces. Covers 43 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Postmark API\nAPI version: 1.0.0\n\n## Auth\nNo authentication required.\n\n## Base URL\nhttps://api.postmarkapp.com/\n\n## Setup\n1. No auth setup needed\n2. GET /deliverystats -- verify access\n3. POST /email -- create first email\n\n## Endpoints\n\n43 endpoints across 8 groups. See references/api-spec.lap for full details.\n\n### email\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /email | Send a single email |\n| POST | /email/batch | Send a batch of emails |\n| POST | /email/withTemplate | Send an email using a Template |\n| POST | /email/batchWithTemplates | Send a batch of email using templates. |\n\n### deliverystats\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /deliverystats | Get delivery stats |\n\n### bounces\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /bounces | Get bounces |\n| GET | /bounces/{bounceid} | Get a single bounce |\n| GET | /bounces/{bounceid}/dump | Get bounce dump |\n| PUT | /bounces/{bounceid}/activate | Activate a bounce |\n\n### messages\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /messages/outbound | Outbound message search |\n| GET | /messages/outbound/{messageid}/details | Outbound message details |\n| GET | /messages/outbound/{messageid}/dump | Outbound message dump |\n| GET | /messages/inbound | Inbound message search |\n| GET | /messages/inbound/{messageid}/details | Inbound message details |\n| PUT | /messages/inbound/{messageid}/bypass | Bypass rules for a blocked inbound message |\n| PUT | /messages/inbound/{messageid}/retry | Retry a failed inbound message for processing |\n| GET | /messages/outbound/opens | Opens for all messages |\n| GET | /messages/outbound/opens/{messageid} | Retrieve Message Opens |\n| GET | /messages/outbound/clicks | Clicks for a all messages |\n| GET | /messages/outbound/clicks/{messageid} | Retrieve Message Clicks |\n\n### templates\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /templates | Get the Templates associated with this Server |\n| POST | /templates | Create a Template |\n| GET | /templates/{templateIdOrAlias} | Get a Template |\n| PUT | /templates/{templateIdOrAlias} | Update a Template |\n| DELETE | /templates/{templateIdOrAlias} | Delete a Template |\n| POST | /templates/validate | Test Template Content |\n\n### stats\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /stats/outbound | Get outbound overview |\n| GET | /stats/outbound/sends | Get sent counts |\n| GET | /stats/outbound/bounces | Get bounce counts |\n| GET | /stats/outbound/spam | Get spam complaints |\n| GET | /stats/outbound/tracked | Get tracked email counts |\n| GET | /stats/outbound/opens | Get email open counts |\n| GET | /stats/outbound/opens/platforms | Get email platform usage |\n| GET | /stats/outbound/opens/emailclients | Get email client usage |\n| GET | /stats/outbound/clicks | Get click counts |\n| GET | /stats/outbound/clicks/browserfamilies | Get browser usage by family |\n| GET | /stats/outbound/clicks/platforms | Get browser plaform usage |\n| GET | /stats/outbound/clicks/location | Get clicks by body location |\n\n### triggers\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /triggers/inboundrules | Create an inbound rule trigger |\n| GET | /triggers/inboundrules | List inbound rule triggers |\n| DELETE | /triggers/inboundrules/{triggerid} | Delete a single trigger |\n\n### server\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /server | Get Server Configuration |\n| PUT | /server | Edit Server Configuration |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a email?\" -> POST /email\n- \"Create a batch?\" -> POST /email/batch\n- \"List all deliverystats?\" -> GET /deliverystats\n- \"List all bounces?\" -> GET /bounces\n- \"Get bounce details?\" -> GET /bounces/{bounceid}\n- \"List all dump?\" -> GET /bounces/{bounceid}/dump\n- \"List all outbound?\" -> GET /messages/outbound\n- \"List all details?\" -> GET /messages/outbound/{messageid}/details\n- \"List all dump?\" -> GET /messages/outbound/{messageid}/dump\n- \"List all inbound?\" -> GET /messages/inbound\n- \"List all details?\" -> GET /messages/inbound/{messageid}/details\n- \"List all opens?\" -> GET /messages/outbound/opens\n- \"Get open details?\" -> GET /messages/outbound/opens/{messageid}\n- \"List all clicks?\" -> GET /messages/outbound/clicks\n- \"Get click details?\" -> GET /messages/outbound/clicks/{messageid}\n- \"Create a withTemplate?\" -> POST /email/withTemplate\n- \"Create a batchWithTemplate?\" -> POST /email/batchWithTemplates\n- \"List all templates?\" -> GET /templates\n- \"Create a template?\" -> POST /templates\n- \"Get template details?\" -> GET /templates/{templateIdOrAlias}\n- \"Update a template?\" -> PUT /templates/{templateIdOrAlias}\n- \"Delete a template?\" -> DELETE /templates/{templateIdOrAlias}\n- \"Create a validate?\" -> POST /templates/validate\n- \"List all outbound?\" -> GET /stats/outbound\n- \"List all sends?\" -> GET /stats/outbound/sends\n- \"List all bounces?\" -> GET /stats/outbound/bounces\n- \"List all spam?\" -> GET /stats/outbound/spam\n- \"List all tracked?\" -> GET /stats/outbound/tracked\n- \"List all opens?\" -> GET /stats/outbound/opens\n- \"List all platforms?\" -> GET /stats/outbound/opens/platforms\n- \"List all emailclients?\" -> GET /stats/outbound/opens/emailclients\n- \"List all clicks?\" -> GET /stats/outbound/clicks\n- \"List all browserfamilies?\" -> GET /stats/outbound/clicks/browserfamilies\n- \"List all platforms?\" -> GET /stats/outbound/clicks/platforms\n- \"List all location?\" -> GET /stats/outbound/clicks/location\n- \"Create a inboundrule?\" -> POST /triggers/inboundrules\n- \"List all inboundrules?\" -> GET /triggers/inboundrules\n- \"Delete a inboundrule?\" -> DELETE /triggers/inboundrules/{triggerid}\n- \"List all server?\" -> GET /server\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- List endpoints may support pagination; check for limit, offset, or cursor params\n- Create/update endpoints typically return the created/updated object\n\n## CLI\n\n```bash\n# Update this spec to the latest version\nnpx @lap-platform/lapsh get postmark-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search postmark-api\n```\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Postmark API\n@base https://api.postmarkapp.com/\n@version 1.0.0\n@common_fields {X-Postmark-Server-Token: any # The token associated with the Server on which this request will operate.}\n@endpoints 43\n@hint download_for_search\n@toc email(4), deliverystats(1), bounces(4), messages(11), templates(6), stats(12), triggers(3), server(2)\n\n@group email\n@endpoint POST /email\n@desc Send a single email\n@optional {body: any}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint POST /email/batch\n@desc Send a batch of emails\n@optional {body: [any]}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group deliverystats\n@endpoint GET /deliverystats\n@desc Get delivery stats\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group bounces\n@endpoint GET /bounces\n@desc Get bounces\n@required {count: any # Number of bounces to return per request. Max 500., offset: any # Number of bounces to skip.}\n@optional {type: any # Filter by type of bounce, inactive: any # Filter by emails that were deactivated by Postmark due to the bounce. Set to true or false. If this isn't specified it will return both active and inactive., emailFilter: any # Filter by email address, messageID: any # Filter by messageID, tag: any # Filter by tag, todate: any # Filter messages up to the date specified. e.g. `2014-02-01`, fromdate: any # Filter messages starting from the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /bounces/{bounceid}\n@desc Get a single bounce\n@required {bounceid: any # The ID of the bounce to retrieve.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /bounces/{bounceid}/dump\n@desc Get bounce dump\n@required {bounceid: any # The ID for the bounce dump to retrieve.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint PUT /bounces/{bounceid}/activate\n@desc Activate a bounce\n@required {bounceid: any # The ID of the Bounce to activate.}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group messages\n@endpoint GET /messages/outbound\n@desc Outbound message search\n@required {count: any # Number of messages to return per request. Max 500., offset: any # Number of messages to skip}\n@optional {recipient: any # Filter by the user who was receiving the email, fromemail: any # Filter by the sender email address, tag: any # Filter by tag, status: any # Filter by status (`queued` or `sent`), todate: any # Filter messages up to the date specified. e.g. `2014-02-01`, fromdate: any # Filter messages starting from the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/outbound/{messageid}/details\n@desc Outbound message details\n@required {messageid: any # The ID of the message for which to retrieve details.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/outbound/{messageid}/dump\n@desc Outbound message dump\n@required {messageid: any # The ID of the message for which to retrieve a dump.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/inbound\n@desc Inbound message search\n@required {count: any # Number of messages to return per request. Max 500., offset: any # Number of messages to skip}\n@optional {recipient: any # Filter by the user who was receiving the email, fromemail: any # Filter by the sender email address, subject: any # Filter by email subject, mailboxhash: any # Filter by mailboxhash, tag: any # Filter by tag, status: any # Filter by status (`blocked`, `processed`, `queued`, `failed`, `scheduled`), todate: any # Filter messages up to the date specified. e.g. `2014-02-01`, fromdate: any # Filter messages starting from the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/inbound/{messageid}/details\n@desc Inbound message details\n@required {messageid: any # The ID of the message for which to details will be retrieved.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint PUT /messages/inbound/{messageid}/bypass\n@desc Bypass rules for a blocked inbound message\n@required {messageid: any # The ID of the message which should bypass inbound rules.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint PUT /messages/inbound/{messageid}/retry\n@desc Retry a failed inbound message for processing\n@required {messageid: any # The ID of the inbound message on which we should retry processing.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/outbound/opens\n@desc Opens for all messages\n@required {count: any # Number of message opens to return per request. Max 500., offset: any # Number of messages to skip}\n@optional {recipient: any # Filter by To, Cc, Bcc, tag: any # Filter by tag, client_name: any # Filter by client name, i.e. Outlook, Gmail, client_company: any # Filter by company, i.e. Microsoft, Apple, Google, client_family: any # Filter by client family, i.e. OS X, Chrome, os_name: any # Filter by full OS name and specific version, i.e. OS X 10.9 Mavericks, Windows 7, os_family: any # Filter by kind of OS used without specific version, i.e. OS X, Windows, os_company: any # Filter by company which produced the OS, i.e. Apple Computer, Inc., Microsoft Corporation, platform: any # Filter by platform, i.e. webmail, desktop, mobile, country: any # Filter by country messages were opened in, i.e. Denmark, Russia, region: any # Filter by full name of region messages were opened in, i.e. Moscow, New York, city: any # Filter by full name of region messages were opened in, i.e. Moscow, New York}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/outbound/opens/{messageid}\n@desc Retrieve Message Opens\n@required {messageid: any # The ID of the Outbound Message for which open statistics should be retrieved., count: any # Number of message opens to return per request. Max 500., offset: any # Number of messages to skip.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/outbound/clicks\n@desc Clicks for a all messages\n@required {count: any # Number of message clicks to return per request. Max 500., offset: any # Number of messages to skip}\n@optional {recipient: any # Filter by To, Cc, Bcc, tag: any # Filter by tag, client_name: any # Filter by client name, i.e. Outlook, Gmail, client_company: any # Filter by company, i.e. Microsoft, Apple, Google, client_family: any # Filter by client family, i.e. OS X, Chrome, os_name: any # Filter by full OS name and specific version, i.e. OS X 10.9 Mavericks, Windows 7, os_family: any # Filter by kind of OS used without specific version, i.e. OS X, Windows, os_company: any # Filter by company which produced the OS, i.e. Apple Computer, Inc., Microsoft Corporation, platform: any # Filter by platform, i.e. webmail, desktop, mobile, country: any # Filter by country messages were opened in, i.e. Denmark, Russia, region: any # Filter by full name of region messages were opened in, i.e. Moscow, New York, city: any # Filter by full name of region messages were opened in, i.e. Moscow, New York}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /messages/outbound/clicks/{messageid}\n@desc Retrieve Message Clicks\n@required {messageid: any # The ID of the Outbound Message for which click statistics should be retrieved., count: any # Number of message clicks to return per request. Max 500., offset: any # Number of messages to skip.}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group email\n@endpoint POST /email/withTemplate\n@desc Send an email using a Template\n@required {body: any}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint POST /email/batchWithTemplates\n@desc Send a batch of email using templates.\n@required {body: any}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group templates\n@endpoint GET /templates\n@desc Get the Templates associated with this Server\n@required {Count: any # The number of Templates to return, Offset: any # The number of Templates to \"skip\" before returning results.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint POST /templates\n@desc Create a Template\n@required {body: any}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /templates/{templateIdOrAlias}\n@desc Get a Template\n@required {templateIdOrAlias: any # The 'TemplateID' or 'Alias' value for the Template you wish to retrieve.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint PUT /templates/{templateIdOrAlias}\n@desc Update a Template\n@required {templateIdOrAlias: any # The 'TemplateID' or 'Alias' value for the Template you wish to update., body: any}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint DELETE /templates/{templateIdOrAlias}\n@desc Delete a Template\n@required {templateIdOrAlias: any # The 'TemplateID' or 'Alias' value for the Template you wish to delete.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint POST /templates/validate\n@desc Test Template Content\n@optional {body: any}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group stats\n@endpoint GET /stats/outbound\n@desc Get outbound overview\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/sends\n@desc Get sent counts\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/bounces\n@desc Get bounce counts\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/spam\n@desc Get spam complaints\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/tracked\n@desc Get tracked email counts\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats starting from the date specified. e.g. `2014-01-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/opens\n@desc Get email open counts\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/opens/platforms\n@desc Get email platform usage\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/opens/emailclients\n@desc Get email client usage\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/clicks\n@desc Get click counts\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/clicks/browserfamilies\n@desc Get browser usage by family\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/clicks/platforms\n@desc Get browser plaform usage\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /stats/outbound/clicks/location\n@desc Get clicks by body location\n@optional {tag: any # Filter by tag, fromdate: any # Filter stats starting from the date specified. e.g. `2014-01-01`, todate: any # Filter stats up to the date specified. e.g. `2014-02-01`}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group triggers\n@endpoint POST /triggers/inboundrules\n@desc Create an inbound rule trigger\n@optional {body: any}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint GET /triggers/inboundrules\n@desc List inbound rule triggers\n@required {count: any # Number of records to return per request., offset: any # Number of records to skip.}\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint DELETE /triggers/inboundrules/{triggerid}\n@desc Delete a single trigger\n@required {triggerid: any # The ID of the Inbound Rule that should be deleted.}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@group server\n@endpoint GET /server\n@desc Get Server Configuration\n@returns(200) OK\n@errors {422, 500}\n\n@endpoint PUT /server\n@desc Edit Server Configuration\n@optional {body: any # The settings that should be modified for the current server.}\n@returns(200) OK\n@errors {422, 500}\n\n@endgroup\n\n@end\n"}}