0

Get Reverse ETL Sync Status

by
Published Oct 17, 2025

Get the sync status for a Reverse ETL sync. The sync status includes all detailed information about the sync - sync status, duration, details about the extract and load phase if applicable, etc. The rate limit for this endpoint is 250 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.

Script segment Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
type Segment = {
3
  token: string;
4
  baseUrl: string;
5
};
6
/**
7
 * Get Reverse ETL Sync Status
8
 * Get the sync status for a Reverse ETL sync. 
9
The sync status includes all detailed information about the sync - sync status, duration, details about the extract and load phase if applicable, etc.
10

11

12
The rate limit for this endpoint is 250 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See Rate Limiting for more information.
13
 */
14
export async function main(auth: Segment, modelId: string, syncId: string) {
15
  const url = new URL(
16
    `${auth.baseUrl}/reverse-etl-models/${modelId}/syncs/${syncId}`,
17
  );
18

19
  const response = await fetch(url, {
20
    method: "GET",
21
    headers: {
22
      Authorization: "Bearer " + auth.token,
23
    },
24
    body: undefined,
25
  });
26
  if (!response.ok) {
27
    const text = await response.text();
28
    throw new Error(`${response.status} ${text}`);
29
  }
30
  return await response.text();
31
}
32