Set user's out of office state
PUT
/domains/{domainID}/users/{userID}/oof
const url = 'https://example.com/api/v1/domains/1/users/1/oof';const options = { method: 'PUT', headers: { cookie: 'grommunioAuthJwt=<grommunioAuthJwt>', 'Content-Type': 'application/json' }, body: '{"state":0,"externalAudience":0,"startTime":"example","endTime":"example","internalSubject":"Out of Office","internalReply":"example","externalSubject":"Out of Office","externalReply":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/domains/1/users/1/oof \ --header 'Content-Type: application/json' \ --cookie grommunioAuthJwt=<grommunioAuthJwt> \ --data '{ "state": 0, "externalAudience": 0, "startTime": "example", "endTime": "example", "internalSubject": "Out of Office", "internalReply": "example", "externalSubject": "Out of Office", "externalReply": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”domainID
required
integer
ID of the domain
userID
required
integer
ID of the user
Header Parameters
Section titled “Header Parameters”X-Csrf-Token
string
CSRF Token
Request Body
Section titled “Request Body”Media typeapplication/json
object
state
Out-of-office state (0=Disabled, 1=Enabled, 2=Scheduled)
integer
externalAudience
External audience setting (0=None, 1=Known, 2=All)
integer
startTime
Date string with time
string
endTime
Date string with time
string
internalSubject
Subject for internal out-of-office reply
string
internalReply
Internal out-of-office reply body
string
externalSubject
Subject for external out-of-office reply
string
externalReply
External out-of-office reply body
string
Responses
Section titled “ Responses ”Out-of-office state updated
Validation of input parameters failed
Media typeapplication/json
object
message
string
errors
List of errors encountered during validation
Array<string>
Examplegenerated
{ "message": "example", "errors": [ "example" ]}The requested resource could not be found
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}An error occurred while processing the request
Media typeapplication/json
object
message
String representation of the exception
string
Examplegenerated
{ "message": "example"}One of the required external services is unavailable
Media typeapplication/json
object
message
Description of the error
string
Examplegenerated
{ "message": "example"}