| title | Create timeOffRequest |
|---|---|
| description | Create a timeoffrequest object. |
| ms.localizationpriority | medium |
| author | lemikeshifts |
| ms.subservice | teams |
| doc_type | apiPageType |
| ms.date | 05/26/2025 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Create instance of a timeoffrequest object.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
POST /teams/{teamId}/schedule/timeOffRequestsThis method doesn't support OData query parameters to customize the response.
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-type | application/json. Required. |
| MS-APP-ACTS-AS (deprecated) | A user ID (GUID). Required only if the authorization token is an application token; otherwise, optional. The MS-APP-ACTS-AS header is deprecated and no longer required with application tokens. |
In the request body, provide a JSON representation of a new timeoffrequest object.
If successful, this method returns a 200 OK response code and the created timeoffrequest object in the response body.
The following example shows a request.
POST https://graph.microsoft.com/beta/teams/{teamId}/schedule/timeOffRequests
{
"senderMessage": "Need a break",
"timeOffReasonId": "TOR_08c42f26-9b83-492c-bf52-f3609eb083e3",
"senderUserId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"startDateTime": "2025-05-26T07:00:00Z",
"endDateTime": "2025-05-27T07:00:00Z"
}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"id": "SREQ_54f7ae3c-dc28-4773-8135-811dd8db2121",
"createdDateTime": "2025-05-22T20:50:26.796Z",
"lastModifiedDateTime": "2025-05-22T20:50:26.796Z",
"assignedTo": "manager",
"state": "pending",
"senderDateTime": "2025-05-22T20:50:26.796Z",
"senderMessage": "Need a break",
"senderUserId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"managerActionDateTime": null,
"managerActionMessage": null,
"managerUserId": null,
"startDateTime": "2025-05-26T07:00:00Z",
"endDateTime": "2025-05-27T07:00:00Z",
"timeOffReasonId": "TOR_08c42f26-9b83-492c-bf52-f3609eb083e3",
"lastModifiedBy": {
"user": {
"id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
"displayName": "Ava Mitchell",
"userIdentityType": "aadUser",
}
}
}