> ## Documentation Index
> Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Access Rule, Table, or View Already Exists

> Resolve HTTP 409 naming conflicts when creating access rules, datasets, or views

This error occurs when you attempt to create or update a dataset, access rule, or view with a `unique_name` that conflicts with an existing resource. Datasets, access rules, and views all share a single namespace — NQL does not distinguish between them — so `unique_name` must be unique across all three resource types.

## Error response

```json theme={null}
{
  "type": "https://docs.narrative.io/reference/errors/access-rule-name-conflict",
  "title": "Access rule, table, or view already exists",
  "status": 409,
  "detail": "An access rule, table, or view with the name '<name>' already exists.",
  "instance": "/api/...",
  "logId": "unique-error-identifier"
}
```

## When this occurs

You receive this error when creating or renaming any of the following and the chosen `unique_name` is already in use:

* **Dataset** — A new or renamed dataset conflicts with an existing dataset, access rule, or view
* **Access rule** — A new or renamed access rule conflicts with an existing dataset, access rule, or view
* **View** — A new or renamed view conflicts with an existing dataset, access rule, or view

The conflict can occur across resource types. For example, creating an access rule named `customer_events` will fail if a dataset or view with that name already exists.

## How to resolve

1. **Check the `detail` field** — It identifies the conflicting name
2. **Choose a unique name** — Pick a `unique_name` that doesn't conflict with any existing dataset, access rule, or view
3. **Check for cross-type conflicts** — If the name looks unfamiliar, the conflict may be with a different resource type (e.g., a dataset blocking an access rule name)
4. **Update instead of create** — If you intended to modify an existing resource, use the update endpoint with the correct resource ID instead of creating a new one

<Tip>
  Because NQL uses `unique_name` to reference datasets, access rules, and views interchangeably, all three share a single namespace. A name used by any one of them cannot be reused by the others.
</Tip>

## Related content

<CardGroup cols={2}>
  <Card title="Access Rules" icon="key" href="/concepts/primitives/access-rules">
    Understand how access rules control data access
  </Card>

  <Card title="Datasets" icon="database" href="/concepts/primitives/datasets">
    Understand dataset schemas and structure
  </Card>

  <Card title="Error Reference" icon="triangle-exclamation" href="/reference/errors/index">
    Overview of common API errors
  </Card>
</CardGroup>
