{"openapi":"3.0.3","info":{"title":"OrgaNice API","version":"1.0.0","description":"Connect your workspace to your reporting tools. Export time offs and time off types with a workspace API key. API usage requires an active subscription.\n\n## Quickstart\n\n1. Open [Settings → API](/settings/api) in your workspace. You must be an active workspace admin to manage keys.\n2. Create a key, give it a name, and choose an expiration. Copy the full key — it is shown only once.\n3. Make your first request. Replace `YOUR_API_KEY` below with your key:\n\n```sh\nexport ORGANICE_API_KEY=\"YOUR_API_KEY\"\n\ncurl --get \"https://dashboard.organice.app/api/v1/time-offs\" \\\n  --header \"Authorization: Bearer $ORGANICE_API_KEY\" \\\n  --data-urlencode \"from=2026-09-01\" \\\n  --data-urlencode \"to=2026-09-30\"\n```\n\nThe response contains a `data` array and `pagination.nextCursor`. A `null` cursor means you have reached the last page. You can also use **Test Request** on an endpoint below to try it with your key.\n\n## Authentication\n\nSend `Authorization: Bearer YOUR_API_KEY` on every request, including the key's `orn_` prefix. Each key grants read access to all time offs and time off types in its workspace. The key determines the workspace; you do not need to send a workspace ID.\n\nKeep keys on your server or in a secret store. Cookies and keys in query parameters are not accepted. Keys can be revoked in [Settings → API](/settings/api) and stop working immediately. For rotation, create a new key, update your integration, then revoke the old key.\n\nSubscription access is checked on every request. If your subscription becomes inactive, valid keys return HTTP 403 with `subscription_required`. Restore the subscription to resume access with the same unexpired, unrevoked keys. You can still view and revoke keys while your subscription is inactive.\n\n## Exporting time offs\n\nUse `from` and `to` in `YYYY-MM-DD` format. Both dates are inclusive and interpreted in UTC, with a maximum range of 366 days. The API returns absences that overlap this range, even if they start before it or end after it.\n\nAll statuses are included by default. Set `status=APPROVED` for approved absences, or filter by `memberId` or `typeId`. Get the available type IDs from **List time off types** below.\n\nResponses include member names and email addresses, absence dates, types, and statuses. Historical requests from disabled or removed members are included; deleted requests are omitted. Private notes, comments, attachments, balances, and working-day durations are not included. Use `isAllDay` to distinguish all-day absences from timed absences.\n\n## Pagination\n\nA page contains up to 100 requests by default. Set `limit` to a value from 1 to 200 to change the page size.\n\nTo export the full range, repeat the request with `cursor` set to the previous response's `pagination.nextCursor`. Keep the same dates and filters and stop when the cursor is `null`. Pass the cursor as-is; do not construct or edit it.\n\nResults are ordered by creation time, then ID, ascending. Pagination is not a snapshot or a change feed: re-fetch the full date range to reconcile edits and deletions. The `updatedAt` field is not an incremental sync cursor.\n\n## Limits and errors\n\nThe limit is **60 requests per minute per workspace**, shared across all keys and endpoints. On HTTP 429, wait for the number of seconds in the `Retry-After` response header before trying again.\n\nErrors use the same JSON structure:\n\n```json\n{ \"error\": { \"code\": \"unauthorized\", \"message\": \"Provide a valid, active API key in the Authorization: Bearer header.\" } }\n```\n\n| Status | Code | What to do |\n| --- | --- | --- |\n| 400 | `invalid_request` | Check dates, filters, and cursor. Unknown or repeated query parameters are rejected. |\n| 401 | `unauthorized` | Check the bearer key. It may be invalid, expired, or revoked. |\n| 403 | `subscription_required` | Restore your workspace's subscription to use the API. |\n| 405 | `method_not_allowed` | Use GET. The API currently supports reading data only. |\n| 429 | `rate_limited` | Wait for the delay in `Retry-After`. |\n| 500 | `internal_error` | Retry after a short delay. |"},"tags":[{"name":"Time offs","description":"Read your workspace's absences and time off types."}],"security":[{"workspaceApiKey":[]}],"servers":[{"url":"/api/v1"}],"components":{"securitySchemes":{"workspaceApiKey":{"type":"http","scheme":"bearer","description":"Create a key in Settings → API. Paste the complete key, including orn_. Keys grant read access to all time offs in their workspace."}},"schemas":{"TimeOffsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeOff"}},"pagination":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true}},"required":["nextCursor"]}},"required":["data","pagination"]},"TimeOff":{"type":"object","properties":{"id":{"type":"string"},"member":{"type":"object","properties":{"id":{"type":"string"},"fullName":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["id","fullName","email"]},"type":{"$ref":"#/components/schemas/TimeOffType"},"startDate":{"type":"string","format":"date-time","description":"Stored start timestamp in UTC."},"endDate":{"type":"string","format":"date-time","description":"Stored end timestamp in UTC (inclusive)."},"isAllDay":{"type":"boolean"},"timezone":{"type":"string","nullable":true,"description":"Original timezone label for a timed absence, e.g. GMT +03:00. May be null; this is not an IANA timezone identifier."},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","description":"Record timestamp; not a reliable change feed. Re-fetch the date range to pick up changes and deletions."}},"required":["id","member","type","startDate","endDate","isAllDay","timezone","status","createdAt","updatedAt"]},"TimeOffType":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"]},"ApiError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"TimeOffTypesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeOffType"}}},"required":["data"]}},"parameters":{}},"paths":{"/time-offs":{"get":{"tags":["Time offs"],"operationId":"listTimeOffs","summary":"List time offs","description":"Returns non-deleted requests overlapping the inclusive UTC date range (from/to), including historical requests of disabled or removed members. All statuses are included unless filtered. Results are ordered by createdAt, then id, ascending. Follow pagination.nextCursor until null, keeping the same filters. Pagination is not a snapshot: re-fetch the range to reconcile changes or deletions. Dates are stored timestamps; use isAllDay to distinguish all-day absences. Working-day balances and durations are not included.","security":[{"workspaceApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"date","description":"First day of the absence range, inclusive (UTC).","example":"2026-09-01"},"required":true,"description":"First day of the absence range, inclusive (UTC).","name":"from","in":"query"},{"schema":{"type":"string","format":"date","description":"Last day of the absence range, inclusive (UTC). Maximum range: 366 days.","example":"2026-09-30"},"required":true,"description":"Last day of the absence range, inclusive (UTC). Maximum range: 366 days.","name":"to","in":"query"},{"schema":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"memberId","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"typeId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^[A-Za-z0-9_-]+$","description":"The nextCursor from the previous page. Keep the same filters."},"required":false,"description":"The nextCursor from the previous page. Keep the same filters.","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of time offs.","content":{"application/json":{"example":{"data":[{"id":"time-off-123","member":{"id":"member-456","fullName":"Alex Morgan","email":"alex@example.com"},"type":{"id":"type-789","label":"Vacation"},"startDate":"2026-09-14T00:00:00.000Z","endDate":"2026-09-18T23:59:59.999Z","isAllDay":true,"timezone":null,"status":"APPROVED","createdAt":"2026-09-01T09:00:00.000Z","updatedAt":"2026-09-02T10:30:00.000Z"}],"pagination":{"nextCursor":null}},"schema":{"$ref":"#/components/schemas/TimeOffsResponse"}}}},"400":{"description":"Invalid query parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing, invalid, expired or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The workspace subscription is inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Only GET is supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"More than 60 requests per minute for this workspace (shared across all keys and endpoints).","headers":{"Retry-After":{"description":"Seconds until the current minute ends.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Temporary server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/time-off-types":{"get":{"tags":["Time offs"],"operationId":"listTimeOffTypes","summary":"List time off types","description":"Returns all time off types in the key's workspace, in the configured order. Use the id as the typeId filter on /time-offs. No query parameters are accepted.","security":[{"workspaceApiKey":[]}],"responses":{"200":{"description":"Time off types.","content":{"application/json":{"example":{"data":[{"id":"type-789","label":"Vacation"},{"id":"type-987","label":"Sick leave"}]},"schema":{"$ref":"#/components/schemas/TimeOffTypesResponse"}}}},"400":{"description":"Invalid query parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing, invalid, expired or revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The workspace subscription is inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Only GET is supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"More than 60 requests per minute for this workspace (shared across all keys and endpoints).","headers":{"Retry-After":{"description":"Seconds until the current minute ends.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Temporary server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}