# Why was my session refused?

> Why Esign Comply refused your session: the error codes POST /v1/sessions returns for domain, plan, plan limit and document checks, and how to fix each.

Source: https://esigncomply.com/docs/kb/why-was-my-session-refused

Last updated November 25, 2026

Your session was refused because `POST /v1/sessions` failed a check on the domain, the plan, the plan limit, or the documents and signer you sent. Esign Comply names the failed check in the error `code` and states the fix in `message`. No session is created, so correct the cause and send the request again.

## Which error codes refuse a session?

| Code | Cause | Fix |
|---|---|---|
| [`domain_not_verified`](https://esigncomply.com/docs/api/errors.md#domain_not_verified) `403` | A live key on a domain that is not verified, or whose verification lapsed more than 14 days ago. | Publish the verification record, or use a test key. |
| [`domain_mismatch`](https://esigncomply.com/docs/api/errors.md#domain_mismatch) `403` | `context.url` is outside the registered domain (live) or the test allowlist (test). | Use a URL on the registered domain. With a test key, list the preview host. |
| [`plan_feature_unavailable`](https://esigncomply.com/docs/api/errors.md#plan_feature_unavailable) `403` | The profile is at L2 or L3 on Free or Starter. Live only: a canceled subscription, or a region the plan does not include. | Set the profile to L1, or upgrade. |
| [`quota_exhausted`](https://esigncomply.com/docs/api/errors.md#quota_exhausted) `402` | Live mode on Free or Starter: the request came past the plan limit. | Pay at the `upgrade_url` in the error. |
| [`test_quota_exceeded`](https://esigncomply.com/docs/api/errors.md#test_quota_exceeded) `429` | The month's test-event allowance is used up. | Wait for the next calendar month, or move to a larger plan. |
| [`document_type_excluded`](https://esigncomply.com/docs/api/errors.md#document_type_excluded) `422` | `context.facts.document_category` names a blocked category. | Do not run that document through the API. |
| [`version_not_published`](https://esigncomply.com/docs/api/errors.md#version_not_published) `422` | A document has no published version in effect. | Publish a version, or name a version ID. |
| [`not_found`](https://esigncomply.com/docs/api/errors.md#not_found) `404` | The profile, document or version does not exist in this key's domain and environment. | Create it with a key of the same environment. |

A malformed body returns `400` [`invalid_request`](https://esigncomply.com/docs/api/errors.md#invalid_request).

## How do I read a refused session's error?

Every refusal has the same envelope: `type`, `code`, `message`, `doc_url` and `request_id`. `param` names the request field that caused it, for example `context.url` or `profile`. Branch on `code`, never on the text of `message`.

## Does the plan limit refuse a session that already exists?

No. The plan limit is checked when the session is created, never at completion. A session that was created still completes and seals its record.

## Can I send the same Idempotency-Key again after a refusal?

Yes. A request that ends in an error is not remembered, so the same key works again once the cause is fixed.

## Related

- [Create a session](https://esigncomply.com/docs/api/sessions/create-a-session.md): every field and error of the call.
- [Errors](https://esigncomply.com/docs/api/errors.md)
- [What happens when I reach my plan limit?](https://esigncomply.com/docs/kb/what-happens-when-i-reach-my-plan-limit.md)
- [Which document types does the API block?](https://esigncomply.com/docs/kb/which-document-types-does-the-api-block.md)
