---
title: "Record that somebody is away"
method: POST
path: "/api/{org_id}/oncall/unavailability"
tags: ["OnCall"]
---

# Record that somebody is away

`POST /api/{org_id}/oncall/unavailability`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/oncall/unavailability`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/oncall/unavailability/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `org_id` string, required

## Request body

- CreateUnavailabilityRequest: "I am away 20 Aug – 3 Sep."
  - `end_at` integer, required: Micros, exclusive — somebody back on the 3rd is on call on the 3rd.
  - `reason` string, nullable
  - `start_at` integer, required: Micros, inclusive.
  - `user_email` string, nullable: Omitted means the caller's own, which is the case that must not need an administrator.

## Response `200`

Success

- Unavailability: One stretch during which a person is not to be given a shift. Org-wide, not per team: being on holiday is a fact about a person, and somebody on two teams is away from both. Per team, the window has to be written twice, and forgetting the second is the exact failure this prevents — a page landing on somebody who is on a beach. Absolute micros, like an override. Recurrence is a calendar feature, and a schedule that guesses which Fridays somebody meant guesses wrong at 3am.
  - `created_at` integer, required
  - `created_by` string, required
  - `end_at` integer, required: Exclusive, matching every other boundary here: the end instant already belongs to the shift they are back for.
  - `id` string, required
  - `org_id` string, required
  - `reason` string, nullable
  - `start_at` integer, required: Inclusive.
  - `user_email` string, required: Whose absence. Email, because email is the login.

## Other responses

- `400`: Invalid

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
