Skip to content

REST API Endpoints Documentation

Use the REST API to manage out of office rules programmatically. Create, update, and delete rules through custom integrations, Jira Automations, or third-party tools.

What you can do

The REST API lets you manage out of office rules outside the app interface. You can create rules for users or yourself, update existing rules (dates, coverers, messages), retrieve active rules, and delete rules when no longer needed.

Use cases include bulk rule creation, integration with HR systems, or automated rule management through Jira Automations.

Base URL

All API requests use this base URL:

  1. https://out-of-office-connect.herokuapp.com/rest/1.0/

Authentication

Every request needs a token in the Authorization header.

There are 2 token scopes available.

  • Admin Scope: Manage rules for all users in your Jira instance. Only available to Jira admins.

  • Read/Write/Delete Scope: Manage only your own rules. Available to all users when enabled in General Settings.

Create a token (Jira Admin)

Jira admins can create tokens with either scope depending on their needs.

Navigate to Out of Office Assistant in Jira. Click User Administration and go to the REST API Permissions tab. Click Create Token and select yourself as the user.

Out of Office REST API Permissions.webp

Choose your scope:

  • Admin: Manage rules for all users (for automations, bulk operations, or integrations)

  • Read/Write/Delete: Manage only your own rules

Copy the token (shown only once) and click OK.

Create a token (Regular User)

Regular users can create tokens to manage their own rules via API. This must be enabled by an admin in the Global Settings under "Allow users to create their own REST API tokens".

Navigate to Out of Office Assistant and click the Integrations tab. Click Connect, copy the displayed token (shown only once), and click Close.

Out of Office REST API User.webp

This token uses the Read/Write/Delete scope and only works for your own rules.

Available endpoints

The API provides two sets of endpoints based on your token scope.

Admin endpoints

Use these with an admin token to manage rules for any user.

  • GET /outofoffice/rules retrieves all rules for one or multiple users.

  • POST /outofoffice/rules creates rules for any user.

  • PUT /outofoffice/rules updates existing rules.

  • DELETE /outofoffice/rules deletes rules.

User endpoints

Use these with a Read/Write/Delete scope token to manage your own rules.

  • GET /outofoffice/myrules retrieves your rules.

  • POST /outofoffice/myrules creates a new rule for yourself.

  • PUT /outofoffice/myrules updates your rules.

  • DELETE /outofoffice/myrules deletes your rules.

Request structure

GET - Retrieve rules (Admin)

Retrieve rules for one or multiple users.

Endpoint: GET /outofoffice/rules

Required query parameters:

  • accountIds: Comma-separated list of user account IDs

Request example (single user):

  1. curl -X 'GET' \
  2. '<https://out-of-office-connect.herokuapp.com/rest/1.0/outofoffice/rules?accountIds=<accountId>' \
  3. -H 'accept: application/json' \
  4. -H 'Authorization: <Bearer> '

Request example (multiple users):

  1. curl -X 'GET' \
  2. '<https://out-of-office-connect.herokuapp.com/rest/1.0/outofoffice/rules?accountIds=<accountId>,<accountId>' \
  3. -H 'accept: application/json' \
  4. -H 'Authorization: <Bearer> '

Response example:

  1. [
  2. {
  3. "accountId": "5f60906e7598de00xxxx",
  4. "timeZone": "Europe/Berlin",
  5. "active": true,
  6. "displayName": "Dan Niel",
  7. "rules": [
  8. {
  9. "startDate": "2025-10-26",
  10. "endDate": "2025-10-29",
  11. "timeZone": "Europe/Berlin",
  12. "project": {},
  13. "jqlSearchTerm": "",
  14. "coverers": [
  15. {
  16. "accountId": "712020:eccb3457-95ad-446a-xxxx"
  17. },
  18. {
  19. "accountId": "712020:7a4db16e-910e-44a7-xxxx"
  20. }
  21. ],
  22. "approverCoverers": [],
  23. "approverField": {
  24. "id": "",
  25. "name": "",
  26. "type": "multi"
  27. },
  28. "message": "I'm out of office ...",
  29. "shareWithCustomer": false,
  30. "oooMentions": {
  31. "type": 1,
  32. "label": 3
  33. },
  34. "id": "7f204a0a-6355-4970-aca1-xxxx",
  35. "isPaused": false,
  36. "type": "restapi",
  37. "triggerName": "Rest API",
  38. "weight": 9007199254740991
  39. }
  40. ]
  41. },
  42. {
  43. "accountId": "712020:eccb3457-95ad-446a-xxxx",
  44. "timeZone": "Europe/Berlin",
  45. "active": true,
  46. "displayName": "dan.niel",
  47. "rules": []
  48. }
  49. ]

The response returns an array of user objects. Each user object contains their account details and an array of active rules. If a user has no rules, the rules array is empty.

POST - Create rules (Admin)

Create one or multiple rules for users.

Endpoint: POST /outofoffice/rules

Required fields:

  • accountId: The user's Atlassian account ID

  • startDate: Start date in YYYY-MM-DD format

  • project.id: Jira project ID (numeric ID, not project key)

Optional fields (must be included but can be empty):

  • endDate: End date in YYYY-MM-DD format

  • jqlFilterName: JQL filter to restrict affected issues

  • coverers: Array of coverer account IDs

  • approverCoverers: Array with one approver coverer account ID

  • approverField: Custom field configuration for approvers

  • message: Out of office message posted as comment

  • doNotShareWithCustomer: Hide status from portal users (default: false)

  • paused: Create rule in paused state (default: false)

  • oooMentions: Mention tag configuration

To find the project ID, use the Jira API endpoint: <baseURL>/rest/api/3/project/<projectKey>

Request example:

  1. curl -X 'POST' \
  2. '<https://out-of-office-connect.herokuapp.com/rest/1.0/outofoffice/rules>' \
  3. -H 'accept: */*' \
  4. -H 'Authorization: <Bearer> ' \
  5. -H 'Content-Type: application/json' \
  6. -d '[
  7. {
  8. "accountId": "5f60906e7598de00xxxx",
  9. "rules": [
  10. {
  11. "startDate": "2025-10-27",
  12. "endDate": "2025-10-29",
  13. "project": {
  14. "id": "10001"
  15. },
  16. "jqlFilterName": "",
  17. "coverers": [
  18. {
  19. "accountId": "712020:eccb3457-95ad-446a-xxxx"
  20. },
  21. {
  22. "accountId": "712020:7a4db16e-910e-44a7-xxxx"
  23. }
  24. ],
  25. "approverCoverers": [],
  26. "approverField": {},
  27. "message": "I'\''m out of office ...",
  28. "doNotShareWithCustomer": false,
  29. "paused": false,
  30. "oooMentions": {
  31. "type": 1,
  32. "label": 3
  33. }
  34. }
  35. ]
  36. }
  37. ]'

Response example:

  1. {
  2. "success": true
  3. }

PUT - Update rules (Admin)

Update existing rules. Include the rule ID and only the fields you want to change.

Endpoint: PUT /outofoffice/rules

Required fields:

  • accountId: The user's Atlassian account ID

  • id: The rule ID (obtained from GET request)

Optional fields:
You only need to include the fields you want to update. All other fields from the original rule remain unchanged.

Request example:

  1. curl -X 'PUT' \
  2. '<https://out-of-office-connect.herokuapp.com/rest/1.0/outofoffice/rules>' \
  3. -H 'accept: */*' \
  4. -H 'Authorization: <Bearer> ' \
  5. -H 'Content-Type: application/json' \
  6. -d '[
  7. {
  8. "accountId": "5f60906e7598de00xxxx",
  9. "rules": [
  10. {
  11. "startDate": "2025-10-26",
  12. "project": null,
  13. "jqlFilterName": "Planned End",
  14. "id": "7f204a0a-6355-4970-aca1-914c33d4axxx"
  15. }
  16. ]
  17. }
  18. ]'

In this example, we update the start date and switch from a project filter to a JQL filter. Setting project to null removes the project restriction.

Response example:

  1. {
  2. "success": true
  3. }

DELETE - Delete rules (Admin)

Delete one or multiple rules by their IDs.

Endpoint: DELETE /outofoffice/rules

Required query parameters:

  • accountId: The user's Atlassian account ID

  • ruleIds: Comma-separated list of rule IDs to delete

Request example (single rule):

  1. curl -X 'DELETE' \
  2. '<https://out-of-office-connect.herokuapp.com/rest/1.0/outofoffice/rules?accountId=<accountId>&ruleIds=<ruleId>' \
  3. -H 'accept: */*' \
  4. -H 'Authorization: <Bearer> '

Request example (multiple rules):

  1. curl -X 'DELETE' \
  2. '<https://out-of-office-connect.herokuapp.com/rest/1.0/outofoffice/rules?accountId=<accountId>&ruleIds=<ruleId>,&ruleIds=<ruleId>' \
  3. -H 'accept: */*' \
  4. -H 'Authorization: Bearer '

Response example:

  1. {
  2. "success": true
  3. }

Error responses

400 Bad Request
Invalid parameters or malformed request body

401 Unauthorized
Missing or invalid token

403 Forbidden
Token has no permission for this operation

Testing with Swagger Hub

The API is documented on Swagger Hub. You can view request structures and response examples.

[Screenshot: Swagger Hub - Endpoints Übersicht mit admins und users Bereichen]

Visit the documentation: https://app.swaggerhub.com/apis/resolution-cloud/jira-outofoffice/1.0.2

The Swagger interface shows all endpoints, required fields, and example payloads. Use it as a reference when building your integration.

Need help?

If you encounter issues or have questions about the API, check the Swagger Hub documentation for request examples. Verify your token has the correct scope and ensure account IDs are valid and active in your Jira instance.

Contact support if you need assistance.