---
title: "Errors & limits"
description: "Errors & limits - MailPirate Docs"
---

# Errors & limits

## HTTP status codes

| Status | Meaning | What to do |
|--------|---------|------------|
| `401` | Missing or invalid token | Check Authorization header / rotated token |
| `403` | Token does not match the workspace | Remove mismatched `team_public_id`, or use the correct token |
| `404` | Unknown resource | Form disabled/missing, or bad public id |
| `422` | Invalid request | Fix validation errors (`store_slug`, email, …) |
| `429` | Too many requests | Back off and retry with jitter |

## Rate limits

| Surface | Limit |
|---------|-------|
| Authenticated Marketing API | **120 requests / minute** |
| Embed form subscribe | **30 requests / minute** |

When you hit `429`, slow down. Batch where you can, and use `idempotency_key` on events so retries are safe.

## Validation error shape

```json
{
  "message": "The store slug field is required.",
  "errors": {
    "store_slug": ["The store slug field is required."]
  }
}
```

`errors` is a map of field → list of messages. Surface those to your logs or admin UI.

## Common mistakes

- Calling `/profiles` upsert when you meant consent-aware `/subscribe`
- Putting the Marketing API token in browser JavaScript (use embed forms instead)
- Forgetting `store_slug`
- Using a store slug from a different workspace than the token
- Retrying `/events` without `idempotency_key` and double-counting behavior

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://mailpirate.com/#organization","name":"MailPirate","legalName":"Jure Rožman s.p.","url":"https://mailpirate.com/","logo":{"@type":"ImageObject","@id":"https://mailpirate.com/#logo","url":"https://mailpirate.com/img/logo/mailpirate-logo.svg","contentUrl":"https://mailpirate.com/img/logo/mailpirate-logo.svg"},"image":{"@id":"https://mailpirate.com/#logo"},"description":"MailPirate is email marketing built for ecommerce stores: campaigns, automated journeys, living audiences, store sync, and deliverability control without managing mail servers yourself.","slogan":"Email that sells more for your store.","foundingDate":"2019-01-29","founder":{"@id":"https://mailpirate.com/#person-jure-rozman"},"address":{"@type":"PostalAddress","streetAddress":"Šinkov Turn 24A","addressLocality":"Vodice","postalCode":"1217","addressCountry":"SI"},"email":"info@mailpirate.com","telephone":"+38640504630","vatID":"SI72369213","identifier":[{"@type":"PropertyValue","propertyID":"AJPES registration number","value":"6881475000"}],"contactPoint":{"@type":"ContactPoint","contactType":"customer support","email":"info@mailpirate.com","telephone":"+38640504630","availableLanguage":["English"]},"knowsAbout":[{"@type":"Thing","name":"Email marketing"},{"@type":"Thing","name":"Ecommerce automation"},{"@type":"Thing","name":"Email deliverability"}],"areaServed":["SI","EU","GB","US"],"sameAs":["https://www.linkedin.com/company/mailpirate"]},{"@type":"Person","@id":"https://mailpirate.com/#person-jure-rozman","name":"Jure Rožman","jobTitle":"Founder","worksFor":{"@id":"https://mailpirate.com/#organization"},"description":"Founder of MailPirate. Builds ecommerce email tooling focused on fair billing, automation, and deliverability.","url":"https://mailpirate.com/about-us","sameAs":["https://www.linkedin.com/in/jurerozman/"]},{"@type":"WebSite","@id":"https://mailpirate.com/#website","url":"https://mailpirate.com/","name":"MailPirate","inLanguage":"en","publisher":{"@id":"https://mailpirate.com/#organization"},"about":{"@id":"https://mailpirate.com/#software"}},{"@type":"SoftwareApplication","@id":"https://mailpirate.com/#software","name":"MailPirate","applicationCategory":"BusinessApplication","applicationSubCategory":"Email marketing","operatingSystem":"Web","url":"https://mailpirate.com/","description":"Ecommerce email platform for Shopify and WooCommerce stores: campaigns, flows, segments, intelligence, and dedicated sending with deliverability controls.","publisher":{"@id":"https://mailpirate.com/#organization"},"featureList":["Campaigns and reporting","Automated flows (welcome, cart recovery, win-back)","Segments and lists","Store connectors (Shopify, WooCommerce)","Intelligence (RFM, affinity, send-time, replenishment)","Deliverability scorecard and dedicated sending","Marketing API and embed forms"]}]}
```
