Error codes and limits
All Leads API error and status codes, the 422 validation structure and the rate limits.
On this page
Purpose
An overview of all error and status codes of the Leads API (POST/PATCH /api/v1/leads), so your
integration can recognise errors and respond to them correctly.
Response format
Every error response has the same format:
{
"success": false,
"error": {
"code": "validation_error",
"message": "One or more fields are invalid.",
"fields": {
"email": { "code": "invalid_email", "message": "Invalid email address" }
}
}
}
fields gives additional information per field for a validation error (HTTP 422), and in API v1.1
can also appear for an invalid request (HTTP 400). It is an object: for each field with an error, a
code and a readable message (in English). In your code, match on code (such as invalid_email,
too_long, name_required, contact_required, unexpected_field, assignee_not_found): these codes
are a contract and do not change lightly. The message is only meant to be read.
A 422 validation error
curl -i -X POST https://app.plenno.nl/api/v1/leads \
-H "Authorization: Bearer pln_live_xxxxxxxx_REPLACE_WITH_YOUR_OWN_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Jan Voorbeeld", "email": "not-an-email-address" }'
HTTP/1.1 422 Unprocessable Entity
{
"success": false,
"error": {
"code": "validation_error",
"message": "One or more fields are invalid.",
"fields": {
"email": { "code": "invalid_email", "message": "Invalid email address" }
}
}
}
Treat this as an error in your own request: fix the problem for each field in error.fields and send
the request again with the same external_id. Retrying without changes will not help here.
A 401: invalid or missing key
HTTP/1.1 401 Unauthorized
{
"success": false,
"error": { "code": "unauthorized", "message": "Invalid or missing API key." }
}
The key is missing, was copied incorrectly or has been revoked. Plenno deliberately does not say which
of the three it is. Check the Authorization: Bearer <key> header and whether the key is still active
under Settings → Integrations.
A 422 for assignee_email
If the email address in assignee_email does not belong to an active team member of your
organisation, you get a 422 with assignee_not_found in error.fields. See
Assign a
team member through the API. Nothing has been created; you can use the same external_id again.
All codes
| HTTP | code |
What is wrong | What to do |
|---|---|---|---|
| 400 | invalid_json |
The body is not valid JSON. | Check your serialisation. |
| 400 | invalid_payload |
The body is not a JSON object. | Send a JSON object, not an array, string or number. |
| 400 | tenant_selection_not_allowed |
You are sending organization_id, tenant_id, organizationId or owner_user_id. |
Remove that field; the key determines the company. |
| 401 | unauthorized |
The key is missing, incorrect or revoked. | Check the Authorization header. |
| 404 | not_found |
Unknown ID, not visible with this key’s permissions, or a mode mismatch (live/test). | Check the lead_id and the key you are using. |
| 405 | method_not_allowed |
This method does not exist on this endpoint. | Use the documented GET, POST or PATCH; there are no DELETE endpoints. |
| 409 | duplicate_in_progress |
The same external_id is being processed right now. |
Try again in a few seconds. |
| 410 | lead_deleted |
This external_id was processed before, but the request was later deleted in Plenno. |
Do not send it again. A new request needs a new external_id. |
| 413 | payload_too_large |
The body is larger than 16 kB. | Shorten message or metadata. |
| 415 | unsupported_media_type |
Wrong Content-Type. |
Send application/json. |
| 422 | validation_error |
A field is missing, too long, invalid or unknown, or assignee_email is not an active team member. |
See error.fields. |
| 429 | rate_limited |
Too many requests. | Wait Retry-After seconds and try again. |
| 500 | internal_error |
Something went wrong on our side. This also covers, for example, a sales lead that could not get a deal because your company has no active sales process with an open stage. | Try again; if it keeps failing, check your sales processes or report it to Plenno. |
| 503 | service_unavailable |
Plenno cannot process the request right now. | Try again later. |
Success status codes
| HTTP | Meaning |
|---|---|
| 201 | The request has been created ("created": true). |
| 200 | A request with this external_id already existed ("created": false), or a PATCH succeeded. |
Limits
- 60 requests per minute per API key.
- 120 requests per minute per IP address.
These limits apply to POST and PATCH combined. A normal website form never gets anywhere near
them.
A 429 with Retry-After
curl -i -X POST https://app.plenno.nl/api/v1/leads \
-H "Authorization: Bearer pln_live_xxxxxxxx_REPLACE_WITH_YOUR_OWN_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Jan Voorbeeld", "email": "jan@example.com" }'
HTTP/1.1 429 Too Many Requests
Retry-After: 12
{
"success": false,
"error": { "code": "rate_limited", "message": "Too many requests for this API key." }
}
Retry-After is given in whole seconds. Wait at least that long before you try again, with the same
external_id, so the retry never creates a duplicate.
Recommended approach
- Treat 429 and 5xx (
500,503) as "try again later", with the sameexternal_id. - Treat 4xx (except 409
duplicate_in_progressand 429) as an error in your own request: sending it again unchanged will not help. - 410 is final: do not keep submitting that
external_id; use a new one.
Next steps
Read Set up and secure webhooks to receive status changes.
Additions in API v1.1
- 403
insufficient_scope: the key is missing a permission. Checkerror.required_scopes; if necessary, create a new key with the right permissions. - 409
conflictwithIf-Match: the data has changed in the meantime. Read it again and decide again what you want to change; do not blindly resend the same change. - 400
invalid_request: for example an unknown query parameter or an invalid cursor. Checkerror.fields. - Reading: 120 requests per minute per key. Writing through the new endpoints: 60 per minute
per key. These endpoints are also limited to 240 per minute per IP address. The 60/120 limits
above still apply to
POSTandPATCH /leads.
Updated November 19, 2026 · Checked against Plenno 9.5.5