> For the complete documentation index, see [llms.txt](https://developerdocs.instructure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developerdocs.instructure.com/services/canvas/resources/temporary_enrollment_pairings.md).

# Temporary Enrollment Pairings

#### A TemporaryEnrollmentPairing object looks like: <a href="#temporaryenrollmentpairing" id="temporaryenrollmentpairing"></a>

```js
// A pairing unique to that enrollment period given to a recipient of that
// temporary enrollment.
{
  // the ID of the temporary enrollment pairing
  "id": 1,
  // The current status of the temporary enrollment pairing
  "workflow_state": "active"
}
```

## [List temporary enrollment pairings](#method.temporary_enrollment_pairings_api.index) <a href="#method.temporary_enrollment_pairings_api.index" id="method.temporary_enrollment_pairings_api.index"></a>

[TemporaryEnrollmentPairingsApiController#index](https://github.com/instructure/canvas-lms/blob/master/app/controllers/temporary_enrollment_pairings_api_controller.rb)

#### `GET /api/v1/accounts/:account_id/temporary_enrollment_pairings`

**Scope:** `url:GET|/api/v1/accounts/:account_id/temporary_enrollment_pairings`

Returns the list of temporary enrollment pairings for a root account, ordered by creation time.

This endpoint is paginated. Use the +per\_page+ parameter to control the page size, and follow the URLs in the Link response header (current, next, prev, first) to navigate between pages. See the Pagination documentation for details.

#### Request Parameters:

| Parameter         | Type      | Description                                                                |
| ----------------- | --------- | -------------------------------------------------------------------------- |
| `include_deleted` | `boolean` | If true, include deleted pairings in the response. Defaults to false.      |
| `per_page`        | `integer` | The number of pairings to return per page. Defaults to 50. Maximum of 100. |

Returns a list of [TemporaryEnrollmentPairing](#temporaryenrollmentpairing) objects.

## [Get a single temporary enrollment pairing](#method.temporary_enrollment_pairings_api.show) <a href="#method.temporary_enrollment_pairings_api.show" id="method.temporary_enrollment_pairings_api.show"></a>

[TemporaryEnrollmentPairingsApiController#show](https://github.com/instructure/canvas-lms/blob/master/app/controllers/temporary_enrollment_pairings_api_controller.rb)

#### `GET /api/v1/accounts/:account_id/temporary_enrollment_pairings/:id`

**Scope:** `url:GET|/api/v1/accounts/:account_id/temporary_enrollment_pairings/:id`

Returns the temporary enrollment pairing with the given id.

Returns a [TemporaryEnrollmentPairing](#temporaryenrollmentpairing) object.

## [New TemporaryEnrollmentPairing](#method.temporary_enrollment_pairings_api.new) <a href="#method.temporary_enrollment_pairings_api.new" id="method.temporary_enrollment_pairings_api.new"></a>

[TemporaryEnrollmentPairingsApiController#new](https://github.com/instructure/canvas-lms/blob/master/app/controllers/temporary_enrollment_pairings_api_controller.rb)

#### `GET /api/v1/accounts/:account_id/temporary_enrollment_pairings/new`

**Scope:** `url:GET|/api/v1/accounts/:account_id/temporary_enrollment_pairings/new`

Initialize an unsaved Temporary Enrollment Pairing.

Returns a [TemporaryEnrollmentPairing](#temporaryenrollmentpairing) object.

## [Create Temporary Enrollment Pairing](#method.temporary_enrollment_pairings_api.create) <a href="#method.temporary_enrollment_pairings_api.create" id="method.temporary_enrollment_pairings_api.create"></a>

[TemporaryEnrollmentPairingsApiController#create](https://github.com/instructure/canvas-lms/blob/master/app/controllers/temporary_enrollment_pairings_api_controller.rb)

#### `POST /api/v1/accounts/:account_id/temporary_enrollment_pairings`

**Scope:** `url:POST|/api/v1/accounts/:account_id/temporary_enrollment_pairings`

Create a Temporary Enrollment Pairing.

#### Request Parameters:

| Parameter                 | Type     | Description                                                                                                                                                                                                                                                                                                                 |
| ------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflow_state`          | `string` | The workflow state of the temporary enrollment pairing.                                                                                                                                                                                                                                                                     |
| `ending_enrollment_state` | `string` | <p>The ending enrollment state to be given to each associated enrollment<br>when the enrollment period has been reached. Defaults to "deleted" if no value is given.<br>Accepted values are "deleted", "completed", and "inactive". Allowed values: <code>deleted</code>, <code>completed</code>, <code>inactive</code></p> |

Returns a [TemporaryEnrollmentPairing](#temporaryenrollmentpairing) object.

## [Delete Temporary Enrollment Pairing](#method.temporary_enrollment_pairings_api.destroy) <a href="#method.temporary_enrollment_pairings_api.destroy" id="method.temporary_enrollment_pairings_api.destroy"></a>

[TemporaryEnrollmentPairingsApiController#destroy](https://github.com/instructure/canvas-lms/blob/master/app/controllers/temporary_enrollment_pairings_api_controller.rb)

#### `DELETE /api/v1/accounts/:account_id/temporary_enrollment_pairings/:id`

**Scope:** `url:DELETE|/api/v1/accounts/:account_id/temporary_enrollment_pairings/:id`

Delete a temporary enrollment pairing

Returns a [TemporaryEnrollmentPairing](#temporaryenrollmentpairing) object.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developerdocs.instructure.com/services/canvas/resources/temporary_enrollment_pairings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
