Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Respecting Access Control with Local API Operations

Local API operations that support overrideAccess now default it to false — they respect Access Control by default. A few operations do not expose this option, and resetPassword requires it explicitly.

  • overrideAccess: false (default where optional) — respect Access Control. Pass the authenticated user when the operation acts on their behalf; without one, Payload evaluates access as an anonymous request.
  • overrideAccess: true — skip Access Control. The operation runs with full permissions.

Respecting Access Control

Use overrideAccess: false whenever the operation acts for a person — server functions, API routes, custom endpoints, and anything reached from the front end. Pass the authenticated user so Payload knows whose permissions to check.

1
const authedCreate = await payload.create({
2
collection: 'users',
3
overrideAccess: false, // access control is enforced
4
user, // whose permissions to check
5
data: {
6
email: 'test@test.com',
7
password: 'test',
8
},
9
})

This creates the document only if user has permission to do so. Without the user, Payload treats the request as unauthenticated and applies the access rules for an anonymous visitor.

Skipping Access Control

Use overrideAccess: true for trusted server-side work with no user behind it — seed scripts, migrations, cron jobs, and independently authenticated system integrations that are intended to run with full permissions.

Treat webhooks according to the authority they represent. A webhook acting for a Payload user should pass that user with overrideAccess: false. After independently authenticating and authorizing a system webhook, use overrideAccess: true only when it is intentionally allowed to bypass Payload Access Control.

1
const seeded = await payload.create({
2
collection: 'users',
3
overrideAccess: true, // access control is skipped
4
data: {
5
email: 'test@test.com',
6
password: 'test',
7
},
8
})

Choosing a value

Ask who the operation is for. If a person triggered it, pass their user — you can set overrideAccess: false explicitly, or simply omit the property, since that's now the default. If your server triggered it on its own schedule, set overrideAccess: true explicitly.

When you are unsure, leave the default in place so that Payload enforces the configured Access Control instead of bypassing it.

Was this page helpful?

Next

REST API