Synchronize a conversation from its beginning

GEThttps://api.postpress.ai/v1/chats/{chat_id}/sync

Start a full-history sync of a chat, or poll its current status. Calling this endpoint after `SYNC_DONE` or `SYNC_ERROR` starts a fresh sync.

Authorization

X-API-KEYstringrequired
API key from your postpress dashboard. Sent as a request header.

Path parameters

chat_idstringrequired
The id of the chat to synchronize.

Polling

Call this endpoint once to initiate a sync, then poll the same URL to monitor progress. Typical sequence: SYNC_STARTED -> SYNC_RUNNING -> SYNC_DONE (or SYNC_ERROR). A new request after SYNC_DONE or SYNC_ERROR restarts the sync from the beginning.

Response 200 OK

objectstringChatHistorySyncrequired
chat_idstringlength ≥ 1required
statusstringrequired
SYNC_STARTEDCHAT_DELETEDSYNC_RUNNINGSYNC_DONESYNC_ERROR
Current sync state. `CHAT_DELETED` indicates the chat no longer exists at the provider.

Example request

curl --request GET \
  --url 'https://api.postpress.ai/api/v1/chats/chat_01HXYZ4QK3WJ8FN3M6QH7TZ8GR/sync' \
  --header 'X-API-KEY: pp_live_...' \
  --header 'accept: application/json'

Example response

{
  "object": "ChatHistorySync",
  "chat_id": "chat_01HXYZ4QK3WJ8FN3M6QH7TZ8GR",
  "status": "SYNC_RUNNING"
}

Errors

Every error response follows the same envelope:

titlestringrequired
Short error title.
detailstringoptional
Human-readable explanation.
instancestringoptional
Request identifier for support.
typestringrequired
Error type identifier.
statusnumberrequired
HTTP status code.
401 Unauthorized13 types

Credentials are missing, expired, or otherwise invalid.

  • errors/missing_credentials - Some credentials are necessary to perform the request.
  • errors/multiple_sessions - LinkedIn limits multiple sessions on certain Recruiter accounts. Use the cookie connection method.
  • errors/invalid_checkpoint_solution - The checkpoint resolution did not pass successfully. Retry.
  • errors/invalid_proxy_credentials - The provided proxy credentials are invalid.
  • errors/checkpoint_error - The checkpoint does not appear to be resolvable.
  • errors/invalid_credentials - The provided credentials are invalid.
  • errors/expired_credentials - Credentials have expired. Reconnect the account.
  • errors/insufficient_privileges - This resource is out of your API-key scopes.
  • errors/disconnected_account - The account is disconnected from the provider service.
  • errors/disconnected_feature - The service you're trying to reach is disconnected.
  • errors/invalid_credentials_but_valid_account_imap - IMAP/SMTP credentials are invalid but the account is otherwise valid.
  • errors/expired_link - This link has expired. Generate a new one.
  • errors/wrong_account - The provided credentials do not match the correct account.
403 Forbidden9 types

Authenticated but the account is restricted or the action is not allowed.

  • errors/account_restricted - The account has been restricted by the provider.
  • errors/account_mismatch - This action cannot be done with your account.
  • errors/insufficient_permissions - Valid authentication but insufficient permissions to perform the request.
  • errors/session_mismatch - Token user id does not match client session id.
  • errors/feature_not_subscribed - The requested feature has not been subscribed or authenticated properly.
  • errors/subscription_required - A subscription is required to use this feature.
  • errors/unknown_authentication_context - An additional step seems necessary to complete login.
  • errors/action_required - An additional step is required.
  • errors/resource_access_restricted - You don't have access to this resource.
404 Not Found2 types

The chat id does not match any chat visible to this API key.

  • errors/resource_not_found - The requested resource was not found.
  • errors/invalid_resource_identifier - The provided identifier is not a valid chat id.
422 Unprocessable Entity35 types

The sync could not be initiated because of provider-side validation.

  • errors/invalid_account - The account is not designed for this feature.
  • errors/invalid_recipient - The recipient is invalid for this provider.
  • errors/no_connection_with_recipient - A connection with the recipient is required.
  • errors/blocked_recipient - The recipient has blocked the sender.
  • errors/user_unreachable - The recipient cannot be reached.
  • errors/unprocessable_entity - The provider could not process the request.
  • errors/payment_error - A payment is required to perform this action.
  • errors/action_already_performed - The action was already performed.
  • errors/invalid_message - The referenced message is invalid.
  • errors/invalid_post - The referenced post is invalid.
  • errors/not_allowed_inmail - InMail is not allowed for this recipient.
  • errors/insufficient_credits - Not enough credits.
  • errors/cannot_resend_yet - The action cannot be re-attempted yet.
  • errors/cannot_resend_within_24hrs - The action cannot be re-attempted within 24 hours.
  • errors/limit_exceeded - The provider's limit was exceeded.
  • errors/already_invited_recently - The recipient was already invited recently.
  • errors/already_connected - Already connected with this recipient.
  • errors/cannot_invite_attendee - This attendee cannot be invited.
  • errors/parent_mail_not_found - Parent email was not found.
  • errors/parent_mail_invalid_provider_id - Parent email has an invalid provider id.
  • errors/invalid_reply_subject - The reply subject is invalid.
  • errors/invalid_headers - The message headers are invalid.
  • errors/send_as_denied - The provider denied the send-as request.
  • errors/invalid_folder - The target folder is invalid.
  • errors/invalid_thread - The target thread is invalid.
  • errors/unauthorized - The provider rejected the request as unauthorized.
  • errors/sender_rejected - The sender was rejected by the provider.
  • errors/recipient_rejected - The recipient was rejected by the provider.
  • errors/ip_rejected_by_server - The sending IP was rejected by the upstream server.
  • errors/provider_unreachable - The provider is currently unreachable.
  • errors/account_configuration_error - The account is misconfigured.
  • errors/cant_send_message - The message could not be sent.
  • errors/realtime_client_not_initialized - The realtime client is not initialized.
  • errors/comments_disabled - Comments are disabled on this resource.
  • errors/insufficient_job_slot - No remaining job slot to perform this action.
500 Internal Server Error3 types

Something went wrong on our side or with the upstream provider.

  • errors/unexpected_error - Something went wrong.
  • errors/provider_error - The provider is experiencing operational problems. Retry later.
  • errors/authentication_intent_error - The current authentication intent was killed after failure.
501 Not Implemented1 types

This action is not supported for the chat's provider yet.

  • errors/feature_not_implemented - Requested feature is planned but has not been implemented yet.
503 Service Unavailable5 types

postpress is temporarily unable to handle the request.

  • errors/no_client_session - No client session is currently running.
  • errors/no_channel - No channel to client session.
  • errors/no_handler - Handler missing for that request.
  • errors/network_down - Network is down on the server side. Retry shortly.
  • errors/service_unavailable - Service temporarily unavailable. Retry later.
504 Gateway Timeout1 types

The upstream provider did not respond in time.

  • errors/request_timeout - Request timed out. Retry, and contact support if it persists.
Updated May 2026