List swap requests
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.roundrobinbot.eu/v1/rotations/example/swap-requests?from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.roundrobinbot.eu/v1/rotations/example/swap-requests?from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.roundrobinbot.eu/v1/rotations/example/swap-requests?from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z") .get() .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.roundrobinbot.eu/v1/rotations/example/swap-requests', params: {from: '2026-04-15T12:00:00Z', to: '2026-04-15T12:00:00Z'}, headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.roundrobinbot.eu/v1/rotations/example/swap-requests?from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.roundrobinbot.eu/v1/rotations/example/swap-requests?from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z' \ --header 'Authorization: Bearer <token>'Requires read:oncall and a key whose workspace and rotation selector permit this rotation. Returns requests overlapping the half-open UTC range [from, to), action capabilities and the rotation ETag. API keys have no participant identity, so all participant action capabilities are false. Returns at most 100 matching requests. If complete is false, narrow the range. Participant actions use these routes with a Slack member access token. API keys cannot perform them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”OK
Requests overlapping the queried range. When complete is false, narrow the range.
object
A swap request, its rotation name and the actions available to this caller.
object
The request.
object
The request identifier.
The rotation identifier.
The user who made the request.
The user asked to swap.
The offered intervals.
An offered duty interval and its accepted assignment identifier, when present. phase is upcoming, running or ended for this leg at the time the response is built.
object
The key of this leg within the request.
The rotation identifier.
The identifier of the lane in a window.
The user who holds the interval.
The inclusive interval start.
The exclusive interval end.
The accepted assignment identifier. Absent until the request is accepted.
upcoming, running or ended for this leg at the instant the response is built.
The reason given with the request.
The revision of the request.
The lifecycle state of the request.
upcoming before the earliest leg starts, ended once the latest leg has ended, running between, at the instant the response is built.
The actions available to the caller.
object
Whether the caller may accept the request.
Whether the caller may decline the request.
Whether the caller may cancel the request.
The reason the actions are unavailable. Absent when they are available.
The same word as reason, or null when the actions are available.
The name of the rotation.
The instant the state, phase and capabilities were evaluated.
True while the request is pending or accepted.
True when the caller may accept, decline or cancel the request.
The earliest later instant at which the state, a phase, active or actionable changes by the clock alone. Null when none will.
Examplegenerated
{ "items": [ { "request": { "id": "example", "rotationId": "example", "requesterUserId": "example", "recipientUserId": "example", "legs": [ { "key": "example", "rotationId": "example", "cellId": "example", "holderUserId": "example", "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "arrangementId": "example", "phase": "example" } ], "reason": "example", "revision": 1, "state": "example", "phase": "example" }, "capability": { "canAccept": true, "canDecline": true, "canCancel": true, "reason": "example", "reasonCode": "example" }, "rotationName": "example", "asOfUtc": "2026-04-15T12:00:00Z", "active": true, "actionable": true, "changesAtUtc": "2026-04-15T12:00:00Z" } ], "from": "2026-04-15T12:00:00Z", "to": "2026-04-15T12:00:00Z", "complete": true, "nextCursor": "example"}