---
title: "Link resource to team"
method: POST
path: "/teams/{team_id}/linkResource"
---

# Link resource to team

`POST /teams/{team_id}/linkResource`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/teams/{team_id}/linkResource`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `teams:write`

Link resource to team

## Path parameters

- `team_id` integer, required

## Request body

- object: One of these fields is required: repo_id, cloud_id, image_id, zen_app_id
  - `repo_id` integer: The id of a repo to link.
  - `cloud_id` integer: The id of a cloud to link.
  - `image_id` integer: The id of an image to link.
  - `domain_id` integer: The id of a domain to link.
  - `zen_app_id` integer: The id of a zen app to link.
  - `repo_path_limitation` object: Optional object to define the path limitations for the repo
    - `limitation_type` 'include' | 'exclude', required: Whether the paths are included or excluded
    - `paths` string[], required: The paths to include or exclude

## Response `200`

The resource has successfully been linked to the team

- object
  - `success` integer: The integer 1 indicating success

## Other responses

- `400`: One or more of the provided fields are invalid.

---

[API](https://skmtc.dev/aikido/apis/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
