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

# Upserting accounts

> Create or update an account, keyed on the external ID it has in your own product.

When upserting an account you need to specify an `externalId` which matches the id of the account in your own backend.

<Snippet file="graphql/sdk-note.mdx" />

For example if your product is structured in teams, then when creating an account for a team you'd use the team's id as the `externalId`.

To upsert an account you need the following permissions:

* `tenant:create`
* `tenant:edit`

<Snippet file="graphql/upsert-account.mdx" />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.