Matheus Dantas
07/16/2025, 7:37 AMkapa.ai
07/16/2025, 7:37 AM/api/v1/state/create_or_update endpoint. This allows you to define the state object (either legacy or per-stream) and set it to your desired value. This is helpful for automation or advanced use cases [Forum: Connector state appears to be doubled up](https://discuss.airbyte.io/t/2024) [Forum: Starting the Airbyte API on a self-hosted instance](https://discuss.airbyte.io/t/2698). Direct Database Manipulation: For advanced scenarios (and with caution), you can update the state directly in the Airbyte database, for example by updating the state table in Postgres. This is not generally recommended unless you are comfortable with the risks, as it can break your connection if not done correctly [Forum: Manually defined cursor](https://discuss.airbyte.io/t/828). Summary: You can override the state of connections in Airbyte via the UI, API, or database. Once set, Airbyte will use your defined state as the basis for filtering and incremental syncs. Always proceed with care when manually editing state.Matheus Dantas
07/16/2025, 7:39 AMkapa.ai
07/16/2025, 7:39 AMkapa.ai
07/16/2025, 7:39 AM/api/v1/state/create_or_update. While the knowledge sources do not provide a step-by-step official documentation page, there are detailed examples and explanations in the Airbyte community forum. How to use the endpoint: - Endpoint: POST /api/v1/state/create_or_update - Headers: - Content-Type: application/json - Accept: application/json - Payload Example: json { "connectionId": "your-connection-id", "connectionState": { "stateType": "legacy", "connectionId": "your-connection-id", "state": { "your_stream": { "updated_at": "2022-09-17T04:34:40Z" } } } } - Usage Notes: - The stateType can be legacy (single state object) or you can use streamState for per-stream state. - The connectionId is the ID of your Airbyte connection. - The state object should match the expected format for your connector. Example cURL command: bash curl -X POST "http://localhost:8000/api/v1/state/create_or_update" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "connectionId": "your-connection-id", "connectionState": { "stateType": "legacy", "connectionId": "your-connection-id", "state": { "your_stream": { "updated_at": "2022-09-17T04:34:40Z" } } } }' References and further details: - The Airbyte forum provides real-world usage and troubleshooting for this endpoint, including payload structure and common issues [Forum: Starting the Airbyte API on a self-hosted instance](https://discuss.airbyte.io/t/2698) and [Forum: Connector state appears to be doubled up](https://discuss.airbyte.io/t/2024). If you need the full official API reference, you can find it at [reference.airbyte.com](https://reference.airbyte.com/reference/getting-started), but please note that the specific documentation for this endpoint may not be detailed there in the knowledge sources provided.