Method: users.drafts.create
יצירת טיוטה חדשה עם התווית DRAFT
.
בקשת HTTP
- יש להעלות URI, עבור בקשות להעלאת מדיה:
POST https://gmail.googleapis.com/upload/gmail/v1/users/{userId}/drafts
- URI של מטא-נתונים, לבקשות למטא-נתונים בלבד:
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/drafts
בכתובת ה-URL נעשה שימוש בתחביר המרת gRPC.
פרמטרים של נתיב
פרמטרים |
userId |
string
זוהי כתובת האימייל של המשתמש. ניתן להשתמש בערך המיוחד me כדי לציין את המשתמש המאומת.
|
גוף הבקשה
גוף הבקשה מכיל מופע של Draft
.
גוף התגובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכלול מופע של Draft
.
היקפי הרשאות
כדי להשתמש בתכונה הזו יש צורך באחד מההיקפים הבאים של OAuth:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.compose
למידע נוסף, ניתן לעיין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-05 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-05 (שעון UTC)."],[[["Creates a new draft with the `DRAFT` label, allowing for both media upload and metadata-only requests."],["Requires providing the user's email address (`userId`) as a path parameter, with `me` indicating the authenticated user."],["The request and response bodies utilize the `Draft` object for data exchange."],["Needs authorization with specific OAuth scopes, including `https://mail.google.com/`, `https://www.googleapis.com/auth/gmail.modify`, or `https://www.googleapis.com/auth/gmail.compose`."]]],[]]