Replace the on-call roster
PUT
/organizations/{org_id}/on-call/members
const url = 'https://api.perstat.io/organizations/example/on-call/members';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"members":[{"position":1,"user_id":"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://api.perstat.io/organizations/example/on-call/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "members": [ { "position": 1, "user_id": "example" } ] }'Replaces the ordered on-call rotation roster of the organization. Ids that are not current members are skipped; an empty list clears the roster, while a non-empty list in which no id resolves returns 400 to protect against accidental wipes. Requires organization admin rights and an on-call capable plan (402 otherwise).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org_id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
members
required
Array<object>
object
position
required
integer format: int32
user_id
required
Interner User-UUID.
string
Examplegenerated
{ "members": [ { "position": 1, "user_id": "example" } ]}Responses
Section titled “Responses”Media typeapplication/json
object
members
required
Array<object>
object
position
required
integer format: int32
user_id
required
Interner User-UUID.
string
Examplegenerated
{ "members": [ { "position": 1, "user_id": "example" } ]}