# Resource Synchronization

PortSIP PBX RESTful APIs allow a client to request only resources that have changed. The high-level process is as follows:

* Client requests a sync token from the server.
* Server reports token 001.
* Some time passes.
* Client makes a sync request on the resource and supplies token 001.
* Server returns resources that have been created, updated, or deleted and returns token 002. As you can see, after the initial sync, only items that have been created, updated, or deleted will be sent. This has several advantages. The transmitted HTTP response bodies can generally be much shorter, and it is easier on both the client and server in terms of memory and CPU usage because only a limited set of items need to be compared.

Note that a server is free to "forget" any sync tokens that have been previously issued. In this case, a full sync may be needed again. If the supplied sync token is not recognized by the server, an HTTP status code 403 is returned.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.portsip.com/development-portsip/rest-apis/version-22.3/get-started/resource-synchronization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
