Resynchronize account messaging data
Initiate a sync process (from scratch or within a specific time span) and monitor its status via regular polling. Supported providers: LinkedIn and Telegram. Instagram and WhatsApp are not supported by this route.
Authorization
Path parameters
Query parameters
Response 200 OK
The response indicates the current sync status. Poll this same route to track progress. A new request issued after a SYNC_DONE, CHUNK_DONE or SYNC_ERROR response will start a fresh sync.
objectstringAccountResyncrequiredstatusstringrequiredstatus object
SYNC_STARTEDstringSYNC_STARTEDSYNC_RUNNINGstringSYNC_RUNNINGSYNC_DONEstringSYNC_DONESYNC_ERRORstringSYNC_ERRORCHUNK_DONEstringCHUNK_DONEExample response
{
"object": "AccountResync",
"status": "SYNC_RUNNING"
}Example request
curl --request GET \
--url 'https://api.postpress.ai/api/v1/accounts/acc_01HXYZ4QK3WJ8FN3M6QH7TZ8GR/sync?chunk_size=50&partial=true' \
--header 'X-API-KEY: pp_live_...' \
--header 'accept: application/json'Errors
Every error response follows the same envelope:
400 Bad Request8 types
The request can't be processed because of malformed or invalid input.
errors/invalid_parameters- One or more request parameters are invalid or missing.errors/missing_parameters- One or more request parameters are missing.errors/malformed_request- The given request has been rejected by the provider.errors/content_too_large- The request payload is too large for the provider.errors/invalid_url- The provided URL is not valid.errors/too_many_characters- The provided content exceeds the character limit.errors/unescaped_characters- The request path contains unescaped characters.errors/limit_too_high- Pagination limit too high. See API reference for details.
401 Unauthorized13 types
Credentials are missing, expired, or invalid - or the account has been disconnected from the provider.
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 to avoid this.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. Contact support if it persists.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 requested feature is not subscribed.
errors/account_restricted- The account has been restricted by the provider.errors/account_mismatch- Credentials don't match the requested account.errors/insufficient_permissions- The account lacks the required permissions.errors/session_mismatch- The session does not match the current account.errors/feature_not_subscribed- The required feature is not part of your subscription.errors/subscription_required- A subscription is required to use this feature.errors/unknown_authentication_context- Unknown authentication context.errors/action_required- The provider requires an additional action.errors/resource_access_restricted- Access to this resource is restricted.
404 Not Found2 types
The requested account does not exist or is not accessible with this API key.
errors/resource_not_found- The requested resource was not found.errors/invalid_resource_identifier- The provided resource identifier is invalid.
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. Start again from the beginning.
501 Not Implemented1 types
The requested feature is planned but has not been implemented yet for this provider.
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.