Start a new chat
Start a new conversation with one or more attendees. The body is sent as `multipart/form-data` so you can attach files alongside the textual fields.
linkedin[api]=classic and linkedin[inmail]=true. Some interactive clients render the nested object incorrectly in generated snippets.Authorization
Request body
Encoded as multipart/form-data.
account_idstringlength ≥ 1requiredattendees_idsarray of stringsrequiredattendees_ids array
<provider_id>stringtextstringsubjectstringattachmentsarray of binariesattachments array
<file>binaryvoice_messagebinaryvideo_messagebinarylinkedinobjectlinkedin object
Classic optionsobjectClassic options object
apistringclassictopicstringservice_requestrequest_demosupportcareersotherapplicant_idstringinvitation_idstringinmailbooleanRecruiter optionsobjectRecruiter options object
apistringrecruiterrequiredsignaturestringhiring_project_idstringjob_posting_idstringsourcing_channelstringJOB_POSTING_RECOMMENDED_MATCHESJOB_POSTINGREFERRALINTERNAL_CANDIDATESAUTOMATED_SOURCINGRECRUITER_SEARCHCAREER_SITEemail_addressstringvisibilitystringPUBLICPRIVATEPROJECTfollow_upobjectfollow_up object
subjectstringrequiredtextstringrequiredattachmentsarray of binariesattachments array
<file>binaryscheduled_timeobjectrequiredscheduled_time object
Days basedobjectDays based object
daysnumberrequiredtimezonestringrequiredWeeks basedobjectWeeks based object
weeksnumberrequiredtimezonestringrequiredSales Navigator optionsobjectSales Navigator options object
apistringsales_navigatorrequiredResponse 201 Created
objectstringChatStartedrequiredchat_idstringrequiredmessage_idstringrequiredExample request
curl --request POST \
--url 'https://api.postpress.ai/api/v1/chats' \
--header 'X-API-KEY: pp_live_...' \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--form 'account_id=acc_01HXYZ4QK3WJ8FN3M6QH7TZ8GR' \
--form 'attendees_ids[]=ACoAACr-1eYBl...' \
--form 'text=Hey! Interested in chatting about your role.' \
--form 'linkedin[api]=classic' \
--form 'linkedin[inmail]=true'Example response
{
"object": "ChatStarted",
"chat_id": "chat_01HXYZ4QK3WJ8FN3M6QH7TZ8GR",
"message_id": "msg_01HXYZ4QK3WJ8FN3M6QH7TZ8GR"
}Errors
Every error response follows the same envelope:
400 Bad Request8 types
The request payload is invalid or missing required fields.
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- A url in the payload is invalid.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 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. Complete authentication on the provider's native application.errors/resource_access_restricted- You don't have access to this resource.
404 Not Found2 types
One of the referenced resources does not exist.
errors/resource_not_found- The requested resource was not found.errors/invalid_resource_identifier- The provided identifier is not valid.
415 Unsupported Media Type1 types
An attachment or voice/video message was rejected by the provider.
errors/unsupported_media_type- The media has been rejected by the provider.
422 Unprocessable Entity35 types
The provider refused to start the chat for a domain-specific reason.
errors/invalid_account- The account is not valid for this operation.errors/invalid_recipient- The recipient is not valid.errors/no_connection_with_recipient- The recipient is not a first-degree connection.errors/blocked_recipient- The recipient has blocked this account.errors/user_unreachable- The user cannot be reached.errors/unprocessable_entity- The request cannot be processed.errors/payment_error- A payment is required and could not be completed.errors/action_already_performed- This action has already been performed.errors/invalid_message- The message is invalid.errors/invalid_post- The referenced post is invalid.errors/not_allowed_inmail- InMail is not allowed for this recipient or account.errors/insufficient_credits- Not enough InMail credits.errors/cannot_resend_yet- The message cannot be resent yet.errors/cannot_resend_within_24hrs- The message cannot be resent within 24 hours.errors/limit_exceeded- A provider-side limit has been exceeded.errors/already_invited_recently- The recipient was already invited recently.errors/already_connected- Already connected to this recipient.errors/cannot_invite_attendee- The attendee cannot be invited.errors/parent_mail_not_found- The parent mail was not found.errors/parent_mail_invalid_provider_id- The parent mail provider id is invalid.errors/invalid_reply_subject- Reply subject is invalid.errors/invalid_headers- Headers are invalid.errors/send_as_denied- Send-as permission denied.errors/invalid_folder- Folder is invalid.errors/invalid_thread- Thread is invalid.errors/unauthorized- Unauthorized.errors/sender_rejected- Sender rejected by upstream.errors/recipient_rejected- Recipient rejected by upstream.errors/ip_rejected_by_server- Server rejected the source IP.errors/provider_unreachable- Provider unreachable.errors/account_configuration_error- Account configuration error.errors/cant_send_message- The message cannot be sent.errors/realtime_client_not_initialized- Realtime client not initialized.errors/comments_disabled- Comments are disabled.errors/insufficient_job_slot- No job slot available.
429 Too Many Requests1 types
Rate limited by the upstream provider.
errors/too_many_requests- The provider cannot accept any more requests at the moment. Retry later.
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
The requested feature is planned but not yet implemented 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.