cURL
curl --request POST \ --url https://mailcare.io/api/teams/{teamId}/automations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/vnd.mailcare.v1+json' \ --data '{ "title": "Save pdf invoices", "sender": "shop@example.com", "inbox": "claire@example.com", "subject": "New invoice", "has_attachments": true, "action_url": "https://example.com/webhooks/save-pdf-invoices", "action_secret_token": "SECRET12345$", "action_delete_email": true, "payload_format": "json" }'
Creates a new automation that triggers an action when an email matching the specified criteria is received.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Automation successfully created.