---
title: "Trigger instant source sync."
method: PUT
path: "/api/v1/projects/{projectId}/sources/{sourceId}/instant-sync"
tags: ["Sources"]
---

# Trigger instant source sync.

`PUT /api/v1/projects/{projectId}/sources/{sourceId}/instant-sync`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/projects/{projectId}/sources/{sourceId}/instant-sync`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/projects/:projectId/sources/:sourceId/instant-sync/put.ts> (a function with typed inputs; its response is checked against the schema)

Triggers an immediate re-sync of a data source, refreshing all its documents with the latest content. Use this when you know the source has been updated and don't want to wait for the scheduled sync.

Notes: Only available for sources that support syncing (sitemaps, integrations). Not available for file uploads.

## Path parameters

- `projectId` integer, required
- `sourceId` integer, required

## Response `201`

Agent source sync started.

- object
  - `status` 'error' | 'success': The status of the response
  - `data` ProjectSource
    - `id` integer: The agent source ID
    - `created_at` string, date-time: The agent source creation date
    - `updated_at` string, date-time: The agent source update date
    - `type` 'sitemap' | 'web-images' | 'upload': The source type.
    - `sub_type` 'readme' | 'gitbook' | 'document360' | 'knowledgeowl' | 'wordpress' | 'wix' | 'webflow' | 'framer' | 'squarespace' | 'weebly' | 'ghost' | 'shopify' | 'magento' | 'bigcommerce' | 'woocommerce' | 'hubspot' | 'url-list' | 'rss' | 'podcast' | 'web-search' | 'extra_timeout' | 'low_performance' | 'archive' | 'images-sitemap' | 'images-opengraph' | 'zendesk_articles' | 'zendesk_tickets' | 'freshdesk_tickets', nullable: The source subtype. Generic web image sources use `images-sitemap` or `images-opengraph`; e-commerce sources keep their platform subtype.
    - `settings` object: The agent source settings
      - `executive_js` boolean: Whether the agent source should execute JavaScript
      - `data_refresh_frequency` 'never' | 'daily' | 'weekly' | 'monthly' | 'advanced': How often the source content is automatically refreshed.
      - `create_new_pages` boolean: Add new pages to agent automatically during refresh agent source
      - `remove_unexist_pages` boolean: Remove pages from agent automatically during refresh agent source
      - `refresh_existing_pages` 'never' | 'always' | 'if_updated': Whether existing pages are re-crawled during a refresh.
      - `sitemap_path` string: The agent source sitemap path
      - `image_extraction_type` 'none' | 'sync_from_sitemap' | 'extract_opengraph_images': The method used to extract images from web sources.
      - `update_existing_images` boolean: Whether to update existing images during refresh.
      - `sync_all_images` boolean: When extracting images from a sitemap, sync every image on a page instead of only the first one. Each synced image consumes one vision credit.
    - `pages` Page[], nullable: The agent source pages
      - `id` integer: Page ID
      - `page_url` string: URL of the document
      - `page_url_hash` string, md5: Hash of the URL of the document
      - `project_id` integer: Agent ID
      - `s3_path` string, nullable: This is the path where the document is stored in S3.\nNote: This is omitted in the response if the document is not a file
      - `crawl_status` 'ok' | 'queued' | 'failed' | 'n/a' | 'limited': The fetch step status — whether the page URL was successfully reached and its content fetched. Values: - `ok`: fetched successfully. - `queued`: waiting to be fetched. - `failed`: fetch attempt failed. - `limited`: fetched but content was truncated. - `n/a`: not applicable for this source type.
      - `index_status` 'ok' | 'queued' | 'failed' | 'n/a' | 'limited': The indexing step status — whether the fetched content has been processed and added to the agent's knowledge base. Values: - `ok`: indexed successfully. - `queued`: waiting to be indexed. - `failed`: indexing failed. - `limited`: partially indexed. - `n/a`: not applicable for this source type. Note: `crawl_status` can be `ok` while `index_status` is `queued` — fetch succeeded but ingestion is still pending.
      - `is_file` boolean: Whether the document is a file or not
      - `is_refreshable` boolean: Whether the document can be refreshed or not
      - `is_file_kept` boolean: Whether the file is kept after processing or not.\nNote: This is omitted in the response if the document is not a file
      - `filename` string, nullable: Filename of the document.\nNote: This is omitted in the response if the document is not a file
      - `filesize` integer, nullable: Filesize of the document.\nNote: This is omitted in the response if the document is not a file
      - `created_at` string, date-time: Date and time when the document was created
      - `updated_at` string, date-time: Date and time when the document was updated
      - `deleted_at` string, date-time: Date and time when the document was deleted

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `403`: Source sync failed
- `404`: Agent source not found
- `429`: Too many requests. You have exceeded your API rate limit.
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 14 warning, 7 info
  - added the new `422.00` enum value to the `data/code` response property for the response status `400`
  - added the new `422.00` enum value to the `data/code` response property for the response status `401`
  - added the new `422.00` enum value to the `data/code` response property for the response status `403`
  - added the new `422.00` enum value to the `data/code` response property for the response status `404`
  - …17 more
- **2026-07-17** `b80e6dfcf78d`: 1 info
  - endpoint added
- **2023-06-02** `1842d7fd0430`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/projects/:projectId/sources/:sourceId/instant-sync/put.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
