@ -77,7 +77,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`referenceId` | string | A reference string to be able to identify the message again in a "get messages" request, should be a random sha256 (only available with `chat-reference-id` capability)
* Response:
- Header:
- Status code:
+ `201 Created`
+ `400 Bad Request` In case of any other error
+ `403 Forbidden` When the conversation is read-only
@ -99,7 +99,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`lastReadMessage` | int | The last read message ID
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the room could not be found for the participant,
+ `401 Unauthorized` when the user is not logged in
@ -61,7 +61,7 @@
`roomName` | string | conversation name (Not available for `roomType = 1`)
* Response:
- Header:
- Status code:
+ `200 OK` When the "one to one" conversation already exists
+ `201 Created` When the conversation was created
+ `400 Bad Request` When an invalid conversation type was given
@ -77,7 +77,7 @@
* Endpoint: `/room/{token}`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the conversation could not be found for the participant
@ -94,7 +94,7 @@
`roomName` | string | New name for the conversation (1-200 characters)
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the name is too long or empty
+ `400 Bad Request` When the conversation is a one to one conversation
@ -107,7 +107,7 @@
* Endpoint: `/room/{token}`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation is a one-to-one conversation (Use [Remove yourself from a conversation](participant.md#Remove-yourself-from-a-conversation) instead)
+ `403 Forbidden` When the current user is not a moderator/owner
@ -119,7 +119,7 @@
* Endpoint: `/room/{token}/public`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation is not a group conversation
+ `403 Forbidden` When the current user is not a moderator/owner
@ -131,7 +131,7 @@
* Endpoint: `/room/{token}/public`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation is not a public conversation
+ `403 Forbidden` When the current user is not a moderator/owner
@ -148,7 +148,7 @@
`state` | int | New state for the conversation
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the conversation type does not support read-only (only group and public conversation)
+ `403 Forbidden` When the current user is not a moderator/owner or the conversation is not a public conversation
@ -165,7 +165,7 @@
`password` | string | New password for the conversation
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the current user is not a moderator or owner
+ `403 Forbidden` When the conversation is not a public conversation
@ -182,7 +182,7 @@
`password` | string | Set a new password for the conversation
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the current user is not a moderator/owner
+ `403 Forbidden` When the conversation is not a public conversation
@ -194,7 +194,7 @@
* Endpoint: `/room/{token}/favorite`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `401 Unauthorized` When the participant is a guest
+ `404 Not Found` When the conversation could not be found for the participant
@ -205,7 +205,7 @@
* Endpoint: `/room/{token}/favorite`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `401 Unauthorized` When the participant is a guest
+ `404 Not Found` When the conversation could not be found for the participant
@ -221,7 +221,7 @@
`level` | int | The notification level (See [Participant notification levels](constants.md#Participant-notification-levels))
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the the given level is invalid
+ `401 Unauthorized` When the participant is a guest
@ -8,7 +8,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/room/{token}/participants`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the participant is a guest
+ `404 Not Found` When the conversation could not be found for the participant
@ -37,7 +37,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`source` | string | Source of the participant(s) as returned by the autocomplete suggestion endpoint (default is `users`)
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the source type is unknown, currently `users`, `groups`, `emails` are supported. `circles` are supported with `circles-support` capability
+ `400 Bad Request` When the conversation is a one-to-one conversation
@ -62,7 +62,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`participant` | string | User to remove
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant is a moderator or owner
+ `400 Bad Request` When there are no other moderators or owners left
@ -77,7 +77,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/room/{token}/participants/self`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant is a moderator or owner and there are no other moderators or owners left.
+ `404 Not Found` When the conversation could not be found for the participant
@ -93,7 +93,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`participant` | string | Session ID of the guest to remove
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the target participant is not a guest
+ `403 Forbidden` When the current user is not a moderator or owner
@ -111,7 +111,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`password` | string | Optional: Password is only required for users which are of type `4` or `5` and only when the conversation has `hasPassword` set to true.
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the password is required and didn't match
+ `404 Not Found` When the conversation could not be found for the participant
@ -128,7 +128,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
* Endpoint: `/room/{token}/participants/active`
* Response:
- Header:
- Status code:
+ `200 OK`
+ `404 Not Found` When the conversation could not be found for the participant
@ -144,7 +144,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`sessionId` | string or null | Guest session to promote
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant to promote is not a normal user (type `3`) or normal guest (type `4`)
+ `403 Forbidden` When the current user is not a moderator or owner
@ -164,7 +164,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`sessionId` | string or null | Guest session to demote
* Response:
- Header:
- Status code:
+ `200 OK`
+ `400 Bad Request` When the participant to demote is not a moderator (type `2`) or guest moderator (type `6`)
+ `403 Forbidden` When the current participant is not a moderator or owner
@ -183,7 +183,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1`
`displayName` | string | The new display name
* Response:
- Header:
- Status code:
+ `200 OK`
+ `403 Forbidden` When the current user is not a guest
+ `404 Not Found` When the conversation could not be found for the participant