# payload_too_large

- HTTP status: 413
- Retry: No
- Execution: not started
- Admin needed: no

**Payload too large.** Request bodies are limited to 1 MB. Bulk operations also have per-request item limits documented on each operation.

## What it means

The API returns HTTP 413 with `error.code` set to `payload_too_large`. The default message is: "The request body is too large."

## Common causes

- Too many recipients in one request.
- Very large `metadata` or `variables` values.

## How to identify it

Check the response status (`413`) and `error.code` (`payload_too_large`). Branch on `error.code`, not on the message text: messages can be reworded, codes do not change within v1. Log `error.request_id` (also sent as the `X-Request-Id` header) so support can find the request.

## How to fix it

- Split the request into smaller batches.

## Retry guidance

Sending the request unchanged fails the same way. Fix the cause first (see How to fix it), then send it again.

## Did anything happen?

This request was refused before any call was placed and before anything was charged.

## Idempotency

Nothing was done. Fix the request and send it again; if you sent an Idempotency-Key you may reuse it, because a refused request is not stored.

## Who can fix it

The developer who sends the request can fix it; no administrator action is normally needed.

## When to contact support

If the error persists after the steps above, contact [support@relationsai.com](mailto:support@relationsai.com). See [Support](/resources/support) for what to include (the `request_id`, the time in UTC, the operation, and whether you used a test or live key) and what never to send (API keys, Authorization headers, webhook signing secrets, recording links, transcripts or customer data).

## Example error response

```json
{
  "error": {
    "code": "payload_too_large",
    "message": "The request body is too large.",
    "details": {
      "limit_bytes": 1048576
    },
    "request_id": "req_wmes2bqgtznwtj5ku4ts42tl",
    "retry": "no",
    "doc_url": "https://docs.relationsai.com/errors/payload_too_large"
  }
}
```

## Operations that can return this error

- [`POST /calls`](/api/calls#place-a-call): Place a call
- [`POST /campaigns`](/api/campaigns#create-a-campaign): Create a campaign
- [`PATCH /campaigns/{campaign_id}`](/api/campaigns#update-a-campaign): Update a campaign
- [`POST /campaigns/{campaign_id}/recipients`](/api/campaigns#add-recipients): Add recipients
- [`POST /contacts`](/api/contacts#create-a-contact): Create a contact
- [`POST /contacts/upsert`](/api/contacts#create-or-update-a-contact-by-phone-number): Create or update a contact by phone number
- [`PATCH /contacts/{contact_id}`](/api/contacts#update-a-contact): Update a contact
- [`POST /dnc-entries`](/api/do-not-call-list#add-a-number-to-the-do-not-call-list): Add a number to the do-not-call list
- [`POST /webhook-endpoints`](/api/webhook-endpoints#create-a-webhook-endpoint): Create a webhook endpoint
- [`PATCH /webhook-endpoints/{webhook_endpoint_id}`](/api/webhook-endpoints#update-a-webhook-endpoint): Update a webhook endpoint
- [`POST /webhook-endpoints/{webhook_endpoint_id}/rotate-secret`](/api/webhook-endpoints#rotate-a-webhook-signing-secret): Rotate a webhook signing secret

See all codes in the [error-code reference](/fundamentals/error-codes).
