blob: 9d75f9b604030fd17e9fa2541f26b154dbde9697 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="gmail_v1.html">Gmail API</a> . <a href="gmail_v1.users.html">users</a> . <a href="gmail_v1.users.labels.html">labels</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#create">create(userId, body=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070079<p class="firstline">Creates a new label.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#delete">delete(userId, id)</a></code></p>
82<p class="firstline">Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.</p>
Craig Citro065b5302014-08-14 00:47:23 -070083<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#get">get(userId, id)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070085<p class="firstline">Gets the specified label.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#list">list(userId)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070088<p class="firstline">Lists all labels in the user's mailbox.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#patch">patch(userId, id, body=None)</a></code></p>
91<p class="firstline">Updates the specified label. This method supports patch semantics.</p>
Craig Citro065b5302014-08-14 00:47:23 -070092<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#update">update(userId, id, body=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070094<p class="firstline">Updates the specified label.</p>
95<h3>Method Details</h3>
96<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -070097 <code class="details" id="create">create(userId, body=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -070098 <pre>Creates a new label.
99
100Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700101 userId: string, The user&#x27;s email address. The special value me can be used to indicate the authenticated user. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700103 The object takes the form of:
104
Bu Sun Kim65020912020-05-20 12:08:20 -0700105{ # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
106 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
107 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
108 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
109 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
110 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
111 },
112 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
113 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
114 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
115 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
116 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
117 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
118 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
119 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
120 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
121 }
Craig Citro065b5302014-08-14 00:47:23 -0700122
123
124Returns:
125 An object of the form:
126
Bu Sun Kim65020912020-05-20 12:08:20 -0700127 { # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
128 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
129 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
130 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
131 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
132 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
133 },
134 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
135 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
136 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
137 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
138 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
139 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
140 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
141 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
142 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
143 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700144</div>
145
146<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 <code class="details" id="delete">delete(userId, id)</code>
148 <pre>Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to.
Craig Citro065b5302014-08-14 00:47:23 -0700149
150Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 userId: string, The user&#x27;s email address. The special value me can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700152 id: string, The ID of the label to delete. (required)
153</pre>
154</div>
155
156<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700157 <code class="details" id="get">get(userId, id)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700158 <pre>Gets the specified label.
159
160Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 userId: string, The user&#x27;s email address. The special value me can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700162 id: string, The ID of the label to retrieve. (required)
163
164Returns:
165 An object of the form:
166
Bu Sun Kim65020912020-05-20 12:08:20 -0700167 { # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
168 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
169 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
170 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
171 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
172 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
173 },
174 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
175 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
176 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
177 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
178 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
179 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
180 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
181 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
182 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
183 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700184</div>
185
186<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700187 <code class="details" id="list">list(userId)</code>
188 <pre>Lists all labels in the user&#x27;s mailbox.
Craig Citro065b5302014-08-14 00:47:23 -0700189
190Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700191 userId: string, The user&#x27;s email address. The special value me can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700192
193Returns:
194 An object of the form:
195
196 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700197 &quot;labels&quot;: [ # List of labels. Note that each label resource only contains an id, name, messageListVisibility, labelListVisibility, and type. The labels.get method can fetch additional label details.
198 { # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
199 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
200 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
201 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
202 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
203 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
204 },
205 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
206 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
207 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
208 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
209 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
210 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
211 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
212 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
213 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214 },
Craig Citro065b5302014-08-14 00:47:23 -0700215 ],
216 }</pre>
217</div>
218
219<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 <code class="details" id="patch">patch(userId, id, body=None)</code>
221 <pre>Updates the specified label. This method supports patch semantics.
Craig Citro065b5302014-08-14 00:47:23 -0700222
223Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 userId: string, The user&#x27;s email address. The special value me can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700225 id: string, The ID of the label to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700226 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700227 The object takes the form of:
228
Bu Sun Kim65020912020-05-20 12:08:20 -0700229{ # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
230 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
231 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
232 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
233 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
234 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
235 },
236 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
237 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
238 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
239 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
240 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
241 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
242 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
243 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
244 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
245 }
Craig Citro065b5302014-08-14 00:47:23 -0700246
247
248Returns:
249 An object of the form:
250
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 { # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
252 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
253 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
254 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
255 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
256 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
257 },
258 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
259 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
260 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
261 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
262 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
263 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
264 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
265 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
266 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
267 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700268</div>
269
270<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 <code class="details" id="update">update(userId, id, body=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700272 <pre>Updates the specified label.
273
274Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700275 userId: string, The user&#x27;s email address. The special value me can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700276 id: string, The ID of the label to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700278 The object takes the form of:
279
Bu Sun Kim65020912020-05-20 12:08:20 -0700280{ # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
281 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
282 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
283 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
284 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
285 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
286 },
287 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
288 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
289 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
290 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
291 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
292 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
293 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
294 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
295 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
296 }
Craig Citro065b5302014-08-14 00:47:23 -0700297
298
299Returns:
300 An object of the form:
301
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 { # Labels are used to categorize messages and threads within the user&#x27;s mailbox.
303 &quot;color&quot;: { # The color to assign to the label. Color is only available for labels that have their type set to user.
304 &quot;backgroundColor&quot;: &quot;A String&quot;, # The background color represented as hex string #RRGGBB (ex #000000). This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
305 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
306 &quot;textColor&quot;: &quot;A String&quot;, # The text color of the label, represented as hex string. This field is required in order to set the color of a label. Only the following predefined set of color values are allowed:
307 # #000000, #434343, #666666, #999999, #cccccc, #efefef, #f3f3f3, #ffffff, #fb4c2f, #ffad47, #fad165, #16a766, #43d692, #4a86e8, #a479e2, #f691b3, #f6c5be, #ffe6c7, #fef1d1, #b9e4d0, #c6f3de, #c9daf8, #e4d7f5, #fcdee8, #efa093, #ffd6a2, #fce8b3, #89d3b2, #a0eac9, #a4c2f4, #d0bcf1, #fbc8d9, #e66550, #ffbc6b, #fcda83, #44b984, #68dfa9, #6d9eeb, #b694e8, #f7a7c0, #cc3a21, #eaa041, #f2c960, #149e60, #3dc789, #3c78d8, #8e63ce, #e07798, #ac2b16, #cf8933, #d5ae49, #0b804b, #2a9c68, #285bac, #653e9b, #b65775, #822111, #a46a21, #aa8831, #076239, #1a764d, #1c4587, #41236d, #83334c #464646, #e7e7e7, #0d3472, #b6cff5, #0d3b44, #98d7e4, #3d188e, #e3d7ff, #711a36, #fbd3e0, #8a1c0a, #f2b2a8, #7a2e0b, #ffc8af, #7a4706, #ffdeb5, #594c05, #fbe983, #684e07, #fdedc1, #0b4f30, #b3efd3, #04502e, #a2dcc1, #c2c2c2, #4986e7, #2da2bb, #b99aff, #994a64, #f691b2, #ff7537, #ffad46, #662e37, #ebdbde, #cca6ac, #094228, #42d692, #16a765
308 },
309 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the label.
310 &quot;labelListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the label list in the Gmail web interface.
311 &quot;messageListVisibility&quot;: &quot;A String&quot;, # The visibility of the label in the message list in the Gmail web interface.
312 &quot;messagesTotal&quot;: 42, # The total number of messages with the label.
313 &quot;messagesUnread&quot;: 42, # The number of unread messages with the label.
314 &quot;name&quot;: &quot;A String&quot;, # The display name of the label.
315 &quot;threadsTotal&quot;: 42, # The total number of threads with the label.
316 &quot;threadsUnread&quot;: 42, # The number of unread threads with the label.
317 &quot;type&quot;: &quot;A String&quot;, # The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
318 }</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700319</div>
320
321</body></html>