@@ -53,7 +53,7 @@ group. We'll start with :http:post:`/group`:
53
53
{
54
54
creator: {
55
55
address: EMAIL_ADDRESS ,
56
- group_name: STRING (optioal ),
56
+ group_name: STRING (optional ),
57
57
display_name: STRING (optional),
58
58
welcome_message: WELCOME_MESSAGE (optional)
59
59
} (optional),
@@ -73,11 +73,12 @@ group. We'll start with :http:post:`/group`:
73
73
(e.g. "
[email protected] "). This address must be owned by the
74
74
authenticated user.
75
75
76
- `group_name ` (optional) is the group name that will be used for
77
- the group's creator. If you're creating a list called
78
- "family\@ fiesta.cc", `roup_name ` should be "family". `Group_name `
79
- may be omitted if and only if a `default_group_name ` is specified
80
- in which case the `default_group_name ` will be used.
76
+ `group_name ` (optional) is the group name that will be used for
77
+ the group's creator. If you're creating a list called
78
+ "family\@ fiesta.cc", `group_name ` should be "family". `group_name `
79
+ may be omitted if and only if a `default_group_name ` is specified.
80
+ In that case the `default_group_name ` will be used. See
81
+ :ref: `group-names ` for more information.
81
82
82
83
`display_name ` (optional) is the name that will be displayed for
83
84
the group's creator throughout the Fiesta UI (e.g. "Mike
@@ -92,9 +93,10 @@ group. We'll start with :http:post:`/group`:
92
93
creator instead. If it's ``null `` or ``false `` no welcome message
93
94
will be sent.
94
95
95
- `default_group_name ` (optional) is the default group name members will
96
- get when added to this group unless a different one is specified when
97
- being added.
96
+ `default_group_name ` (optional) is the default group name members
97
+ will get when added to this group unless a different one is
98
+ specified when being added. See :ref: `group-names ` for more
99
+ information.
98
100
99
101
`domain ` (optional) is the domain to use for the list address. The
100
102
default is "fiesta.cc". To use a custom domain your client must
@@ -178,16 +180,18 @@ was returned above:
178
180
address: EMAIL_ADDRESS ,
179
181
group_name: STRING (optional),
180
182
display_name: STRING (optional),
181
- welcome_message: WELCOME_MESSAGE (optional)
183
+ welcome_message: WELCOME_MESSAGE (optional),
184
+ send_invite: BOOLEAN (optional)
182
185
}
183
186
184
187
`address ` is the email address of the new member.
185
188
186
- `group_name ` (optional) is the group name that will be used for the
187
- new member. If you're creating a list called "family\@ fiesta.cc",
188
- `group_name ` should be "family". `Group_name ` may be omitted if
189
- and only if a `default_group_name ` exists for the list in which
190
- case the `default_group_name ` will be used.
189
+ `group_name ` (optional) is the group name that will be used for
190
+ the new member. If you're creating a list called
191
+ "family\@ fiesta.cc", `group_name ` should be "family". `group_name `
192
+ may be omitted if and only if a `default_group_name ` exists for
193
+ the list. In that case the `default_group_name ` will be used. See
194
+ :ref: `group-names ` for more information.
191
195
192
196
`display_name ` (optional) is the name that will be displayed for
193
197
the new member throughout the Fiesta UI. If it's included and the
@@ -201,6 +205,14 @@ was returned above:
201
205
instead. If it's ``null `` or ``false `` no welcome message will be
202
206
sent.
203
207
208
+ If `send_invite ` is ``True `` (the default is ``False ``), the new
209
+ member will be invited to the list but not added. They'll receive
210
+ an email invitation with a link they can click to join the
211
+ list. If `send_invite ` is ``True `` and a custom `welcome_message `
212
+ is specified, the welcome message must contain the string
213
+ ``"$invite_url" ``, which will be replaced with the URL the user
214
+ can click to join the group.
215
+
204
216
Returns the following JSON data in the response body:
205
217
206
218
.. code-block :: js
@@ -244,6 +256,28 @@ was returned above:
244
256
245
257
`group_name ` is the name of the group as used by this user.
246
258
259
+ .. _group-names :
260
+
261
+ Notes on Group Names
262
+ --------------------
263
+
264
+ Group names may only contain letters, numbers, '-', '_', and '.'. The
265
+ maximum length of a group name is 30 characters. Names are not case
266
+ sensitive and '-', '_', and '.' are ignored for the purposes of
267
+ equality testing. So ``"test" ``, ``"t_e_s_t" `` and ``"Te.ST" `` are
268
+ considered equivalent.
269
+
270
+ When adding someone to a list with a specific group name, the name
271
+ they are actual added with may differ: Fiesta will automatically
272
+ ensure that the name is unique among all of their lists. If
273
+ [email protected] already has a list called "family" and your client
274
+ attempts to add them to another list using the name "family" the new
275
+ list will automatically be renamed to "family1" for that user.
276
+
277
+ The group namespace is shared across all domains. If you are using a
278
+ custom domain the same collision response will occur with groups of
279
+ the same name using a different domain.
280
+
247
281
Sending Messages
248
282
----------------
249
283
@@ -505,3 +539,56 @@ Getting Group/User Information
505
539
506
540
Responds with a status code 200 if the memberships were
507
541
successfully deleted.
542
+
543
+ Errors
544
+ ------
545
+
546
+ Any API error will result in a response with a 40x HTTP status
547
+ code. Error responses also contain a JSON body, e.g.:
548
+
549
+ .. code-block :: js
550
+
551
+ {
552
+ status: {code: 400 },
553
+ error: " invalid_request" ,
554
+ error_description: " Unsupported Authorization scheme"
555
+ }
556
+
557
+ `status ` will always be present, and contains a `code ` field whose value will always match the HTTP status code of the response.
558
+
559
+ `error ` will always be present, and is a short token categorizing the error (see below for a list of possible values).
560
+
561
+ `error_description ` will sometimes be present, and is a long-form description of the error that occurred.
562
+
563
+ List of possible `error ` values:
564
+
565
+ - ``"invalid_request" `` (400): The client sent a request that is
566
+ malformed or missing required values.
567
+
568
+ - ``"invalid_scope" `` (400): The client requested authorization for a
569
+ scope that isn't recognized by the API.
570
+
571
+ - ``"unsupported_grant_type" `` (400): The client is attempting to use
572
+ an unsupported OAuth grant type.
573
+
574
+ - ``"invalid_token" `` (401): The API call was made using an invalid or
575
+ expired token.
576
+
577
+ - ``"invalid_client" `` (401): The API call was made using invalid
578
+ client credentials.
579
+
580
+ - ``"access_denied" `` (401): The client does not have sufficient
581
+ permissions to make the attempted request.
582
+
583
+ - ``"no_such_resource" `` (404): The client is attempting to operate on
584
+ a resource (e.g. group, user, etc.) that does not exist.
585
+
586
+ - ``"unsupported_response_type" `` (406): The client requested a
587
+ response type (using the Accept header) that isn't supported by the
588
+ API.
589
+
590
+ .. note :: It's possible (though unlikely) that an attempt to use the
591
+ API could result in a 50x response. Any such response is
592
+ automatically reported so we can attempt to address the issue, but
593
+ following up with any helpful information about the error is
594
+ appreciated.
0 commit comments