---
title: "Refresh an on-call binding from its upstream provider"
method: POST
path: "/oncall/bindings/{bindingId}/refresh"
tags: ["On-Call"]
---

# Refresh an on-call binding from its upstream provider

`POST /oncall/bindings/{bindingId}/refresh`

## Request

- Base URL: `https://api.marboba.com/v1`
- URL: `https://api.marboba.com/v1/oncall/bindings/{bindingId}/refresh`
- Auth: HTTP bearer

Forces a fresh fetch from PagerDuty/Opsgenie and updates the cached on-call user and shift fields. Manual bindings return immediately with cached fields. Returns `502 upstream_unavailable` if the provider call fails — the binding's `lastFetchError` field is updated even on failure so admins can see what broke.

## Response `200`

Refreshed binding

- object
  - `binding` OnCallBinding: A binding from a team or component to an on-call provider. Provider credentials live in `_config/oncallIntegration` and are never exposed by /v1.
    - `id` string, required
    - `scope` 'team' | 'component' | 'resource', required
    - `targetId` string, required: Team id when scope=team, app id when scope=component.
    - `provider` 'pagerduty' | 'opsgenie' | 'manual', required
    - `scheduleId` string, nullable: Provider-side schedule id; null for manual bindings.
    - `label` string, nullable
    - `currentlyOnCallUserName` string, nullable
    - `currentlyOnCallUserEmail` string, nullable
    - `currentlyOnCallUserUid` string, nullable: Resolved org employee uid when the on-call email matches.
    - `currentShiftStartsAt` string, date-time, nullable
    - `currentShiftEndsAt` string, date-time, nullable
    - `lastFetchedAt` string, date-time, nullable
    - `lastFetchError` string, nullable
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable

## Other responses

- `404` (unresolved $ref)
- `502`: The upstream provider call failed

---

[API](https://skmtc.dev/marboba/apis/marboba-public-rest-api.md) · [All operations](https://skmtc.dev/marboba/apis/marboba-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/marboba/apis/marboba-public-rest-api/revisions/5b96d525d88d?raw)
