Skip to main content

Crisp API Python.

Project description


The Crisp API Python wrapper. Authenticate, send messages, fetch conversations, access your agent accounts from your Python code.

Copyright 2018 Crisp IM SARL. See LICENSE for copying information.


Install the library:

pip install crisp-api

Then, import it:

from crisp_api import Crisp

Construct a new authenticated Crisp client with your identifier and key tokens.

client = Crisp()

client.authenticate(identifier, key)

Then, your client is ready to be consumed!


To authenticate against the API, generate your session identifier and session key once using the Crisp token generation utility. You'll get a token keypair made of 2 values.

Keep your token keypair values private, and store them safely for long-term use.

Then, add authentication parameters to your client instance right after you create it:

client = Crisp()

# Make sure to use the correct tier if you are authenticating a plugin
# eg. with a permanent token generated from Crisp Marketplace

# Authenticate to API (identifier, key)
# eg. client.authenticate("13937834-f6ce-4556-ae4f-9e0c54faf038", "eb6c3623245521d7a6c35f5b29f3fa756e893f034ed551d84518961c5ff16dec")
client.authenticate(identifier, key)

# Now, you can use authenticated API sections.

🔴 Important: Make sure to generate your token once, and use the same token keys in all your subsequent requests to the API. Do not generate too many tokens, as we may invalidate your older tokens to make room for newer tokens.

Resource Methods

Most useful available Crisp API resources are implemented. Programmatic methods names are named after their label name in the API Reference.

Thus, it is straightforward to look for them in the library while reading the API Reference.

In the following method prototypes, crisp is to be replaced with your Crisp API instance. For example, instanciate client = Crisp() and then call eg:, 1).

When calling a method that writes data to the API (eg. send a message with:, you need to submit it this way:

website_id = "88972681-a00c-4b3b-a383-cab281636484"
session_id = "session_9df2a21e-f113-41d4-8ed2-bad8b49cafd1"
  website_id, session_id,

    "type": "text",
    "content": "This message was sent from python-crisp-api! :)",
    "from": "operator",
    "origin": "chat"


  • Website Conversations

    • List Conversations:, page_number)
    • Search Conversations:, page_number, search_query, search_type, search_operator, include_empty, filter_unread, filter_resolved, filter_not_resolved, filter_mention, filter_assigned, filter_unassigned, filter_date_start, filter_date_end, order_date_created", order_date_updated)
  • Website Conversation

    • Create A New Conversation:
    • Check If Conversation Exists:, session_id)
    • Get A Conversation:, session_id)
    • Remove A Conversation:, session_id)
    • Initiate A Conversation With Existing Session:, session_id)
    • Get Messages In Conversation:, session_id, query)
    • Send A Message In Conversation:, session_id, query)
    • Update A Message In Conversation:, session_id, fingerprint, data)
    • Compose A Message In Conversation:, session_id, data)
    • Mark Messages As Read In Conversation:, session_id, data)
    • Mark Messages As Delivered In Conversation:, session_id, data)
    • Get Conversation Routing Assign:, session_id)
    • Assign Conversation Routing:, session_id, data)
    • Get Conversation Metas:, session_id)
    • Update Conversation Metas:, session_id, data)
    • List Conversation Pages:, session_id, page_number)
    • List Conversation Events:, session_id, page_number)
    • Get Conversation State:, session_id)
    • Change Conversation State:, session_id, data)
    • Get Block Status For Conversation:, session_id)
    • Block Incoming Messages For Conversation:, session_id, data)
    • Request Email Transcript For Conversation:, session_id, data)
  • Website People

    • Get People Statistics:
    • List People Segments:, page_number)
    • List People Profiles:, page_number)
    • Add New People Profile:, data)
    • Check If People Profile Exists:, people_id)
    • Get People Profile:, people_id)
    • Save People Profile:, people_id, data)
    • Update People Profile:, people_id, data)
    • Remove People Profile:, people_id)
    • List People Conversations:, people_id, page_number)
    • Add A People Event:, people_id, data)
    • List People Events:, people_id, page_number)
    • Get People Data:, people_id)
    • Save People Data:, people_id, data)
    • Get People Subscription Status:, people_id)
    • Update People Subscription Status:, people_id, data)
  • Website Base

    • Create Website:
    • Get A Website:
    • Delete A Website:
  • Website Batch

    • Batch Resolve Items:, data)
    • Batch Read Items:, data)
    • Batch Remove Items:, data)
  • Website Availability

    • Get Website Availability Status:
  • Website Operator

    • List Website Operators:
    • List Last Active Website Operators:
  • Website Settings

    • Get Website Settings:
    • Update Website Settings:, data)
  • Website Visitors

    • Count Visitors:
    • List Visitors:, page_number)


  • Plugin Connect

    • Get Plugin Connect Account: client.get_connect_account()
    • Check Plugin Connect Session Validity: client.check_connect_session_validity()
    • List All Connected Websites: client.list_all_connect_websites(page_number, filter_configured)
  • Plugin Subscription

    • List All Active Subscriptions: client.list_all_active_subscriptions()
    • List Subscriptions For Website: client.list_subscriptions_website(website_id)
    • Get Subscription Details: client.get_subscription_details(website_id, plugin_id)
    • Subscribe Website To Plugin: client.subscribe_plugin_to_website(website_id)
    • Unsubscribe Plugin From Website: client.unsubscribe_plugin_from_website(website_id, plugin_id)
    • Get Subscription Settings: client.get_subscription_settings(website_id, plugin_id)
    • Save Subscription Settings: client.save_subscription_settings(website_id, plugin_id, settings)
    • Update Subscription Settings: client.update_subscription_settings(website_id, plugin_id, settings)
    • Forward Plugin Payload To Channel: client.forward_plugin_payload_to_channel(website_id, plugin_id, data)
    • Dispatch Plugin Event: client.dispatch_plugin_event(website_id, plugin_id, data)


  • Bucket URL
    • Generate Bucket URL: client.bucket.generate_bucket_url(data)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crisp-api-1.1.10.tar.gz (10.7 kB view hashes)

Uploaded source

Built Distribution

crisp_api-1.1.10-py3-none-any.whl (9.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page