Check-in changes to a DriveItem resource
Check-in a checked out DriveItem resource, which makes the version of the document available to others.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All |
Delegated (personal Microsoft account) | Files.ReadWrite, Files.ReadWrite.All |
Application | Files.ReadWrite.All, Sites.ReadWrite.All |
HTTP request
POST /drives/{driveId}/items/{itemId}/checkin
POST /groups/{groupId}/drive/items/{itemId}/checkin
POST /me/drive/items/{item-id}/checkin
POST /sites/{siteId}/drive/items/{itemId}/checkin
POST /users/{userId}/drive/items/{itemId}/checkin
Request body
In the request body, provide a JSON object with the following parameters.
Name | Value | Description |
---|---|---|
checkInAs | string | Optional. The desired status of the document after the check-in operation is complete. Can be published or unspecified. |
comment | string | A check-in comment that is associated with the version. |
Example
This example checks in a file identified by {item-id}
.
POST /drives/{drive-id}/items/{item-id}/checkin
Content-Type: application/json
{
"comment": "Updating the latest guidelines"
}
Response
If successful, the API call returns a 204 No Content
.
HTTP/1.1 204 No Content
Remarks
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for