---
title: "Replace a Plan in an Opportunity"
method: PATCH
path: "/api/v2/opportunities/{opportunityId}/relationships/suggested-plans"
tags: ["Opportunity"]
---

# Replace a Plan in an Opportunity

`PATCH /api/v2/opportunities/{opportunityId}/relationships/suggested-plans`

## Request

- Base URL: `https://api.betatest.degreed.com`
- URL: `https://api.betatest.degreed.com/api/v2/opportunities/{opportunityId}/relationships/suggested-plans`
- Auth: HTTP bearer

This endpoint replaces all suggested plans in an existing opportunity with the newly supplied suggested plans. <h3>Required Scope</h3>`opportunity:write`

## Path parameters

- `opportunityId` string, required

## Request body

- OpportunityRelationshipPlanBody
  - `data` OpportunityRelationshipPlanBodyData[]
    - `type` string, nullable: The type of relationship.
    - `id` string, nullable: The unique id of the plan.

## Response `201`

Success

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/degreed/apis/degreed-api-web.md) - [All operations](https://skmtc.dev/degreed/apis/degreed-api-web/llms.txt) - [OpenAPI document](https://skmtc.dev/degreed/apis/degreed-api-web/revisions/9fa024eaf414?raw)
