---
title: "Create a teams ownership mapping"
method: POST
path: "/api/v2/rum/config/teams-ownership/mappings"
tags: ["Rum Teams Ownership"]
---

# Create a teams ownership mapping

`POST /api/v2/rum/config/teams-ownership/mappings`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/rum/config/teams-ownership/mappings`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/rum/config/teams-ownership/mappings/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a teams ownership mapping for your organization.
Returns the teams ownership mapping object from the request body when the request is successful.

## Request body

- TeamsOwnershipMappingCreateRequest: The request body for creating a teams ownership mapping.
  - `data` TeamsOwnershipMappingCreateData, required: The JSON:API data envelope for a teams ownership mapping create request.
    - `attributes` TeamsOwnershipMappingCreateDataAttributes, required: The attributes of the teams ownership mapping to create.
      - `application_id` string, uuid: The ID of the RUM application this mapping applies to. For browser applications, provide the real application UUID — the team is applied to the view regardless of service. For mobile applications, omit this field (or set it to the nil UUID `00000000-0000-0000-0000-000000000000`) — the team is applied to the view and service combination across all applications.
      - `match_type` 'exact' | 'prefix': How the `view_name` is matched against RUM view names.
      - `service` string: The RUM application's service name. For browser applications, this is optional. For mobile applications, this is required and scopes the ownership to a specific service.
      - `team_handle` string, required: The handle of the team that owns the matched RUM views.
      - `view_name` string, required: The RUM view name to match, or its prefix when `match_type` is `prefix`.
    - `type` 'teams_ownership_mappings', required: The type of the resource. The value should always be teams_ownership_mappings.

## Response `201`

Created

- TeamsOwnershipMappingResponse: The response body for a single teams ownership mapping.
  - `data` TeamsOwnershipMappingResponseData, required: The JSON:API data envelope for a teams ownership mapping.
    - `attributes` TeamsOwnershipMappingResponseAttributes, required: The attributes of a teams ownership mapping.
      - `application_id` string, required: The ID of the RUM application this mapping applies to. For browser applications, this is the real application UUID. For mobile applications, this is the nil UUID `00000000-0000-0000-0000-000000000000` (wildcard), meaning the ownership applies across all applications.
      - `created_at` string, date-time, required: Timestamp when the mapping was created.
      - `created_by` string, required: The UUID of the user who created the mapping.
      - `match_type` 'exact' | 'prefix', required: How the `view_name` is matched against RUM view names.
      - `org_id` integer, required: The ID of the organization that owns this mapping.
      - `service` string, required: The RUM application's service name. For browser applications, may be empty. For mobile applications, this is the service that scopes the ownership.
      - `team_handle` string, required: The handle of the team that owns the matched RUM views.
      - `view_name` string, required: The RUM view name to match, or its prefix when `match_type` is `prefix`.
    - `id` string, required: The unique identifier of the teams ownership mapping.
    - `type` 'teams_ownership_mappings', required: The type of the resource. The value should always be teams_ownership_mappings.

## Other responses

- `400`: Bad Request
- `403`: Not Authorized
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
