---
title: "Create or Update Organization Code Mappings in Bulk"
url: https://docs.sentry.io/api/integrations/create-or-update-organization-code-mappings-in-bulk/
---

# Create or Update Organization Code Mappings in Bulk | Sentry Docs

POST /api/0/organizations/{organization\_id\_or\_slug}/code-mappings/bulk/

Create or update multiple repository path mappings for a project. Mappings with matching project, stack root, and source root are updated.

### Path Parameters

* `organization_id_or_slug` *(string)*

  REQUIRED

  The ID or slug of the organization the resource belongs to.

### Body Parameters

* `project`

  REQUIRED

  The ID or slug of the project to configure.

* `repository` *(string)*

  REQUIRED

  The repository name as it appears in Sentry.

* `mappings` *(array(object))*

  REQUIRED

  One or more stack-root and source-root mappings (maximum 300).

* `provider` *(string)*

  Optional repository provider used to disambiguate or find the repository. If no matching Sentry repository exists, the repository is created after the provider confirms it exists.

* `default_branch` *(string)*

  The repository branch to use; inferred from the integration when omitted.

### Scopes

You need to [authenticate via bearer auth token.](https://docs.sentry.io/api/auth.md)

`<auth_token>` requires one of the following scopes:

* `org:admin`
* `org:ci`
* `org:integrations`
* `org:read`
* `org:write`

```
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/code-mappings/bulk/ \
 -H 'Authorization: Bearer <auth_token>' \
 -H 'Content-Type: application/json' \
 -d '{}'
```

RESPONSESCHEMA

```
Copied
.
```

---

Find other pages: [Sitemap](https://docs.sentry.io/sitemap.md) lists every page with a one-line summary, and [llms.txt](https://docs.sentry.io/llms.txt) gives an overview with guidance for agents.
