What type of API does Drift provide?
Key API Types
-
REST (Representational State Transfer)
- Resource-based architecture
- Uses standard HTTP methods (GET, POST, PUT, DELETE, etc.)
- Typically uses JSON for data exchange
- Stateless communication
-
SOAP (Simple Object Access Protocol)
- Uses XML for message format
- More rigid structure and strong typing
- Can be more complex to implement
-
GraphQL
- Query language for APIs
- Allows clients to request exactly the data they need
- Single endpoint
- Strongly typed schema
-
gRPC
- Uses Protocol Buffers for serialization
- Designed for high performance
- Supports streaming
Without specific information about Drift's API, I cannot definitively state which type they use. Many modern web services tend to use REST or GraphQL APIs, but this is just a general trend. To determine Drift's API type, you would need to check their API documentation or developer resources directly.
Does the Drift API have webhooks?
Yes, the official Drift API does have webhooks. Here are the key points about Drift's webhook functionality:
Webhook Availability
Drift offers webhooks that allow you to receive real-time information about events happening in your Drift account.
Event Types
You can subscribe to various types of events through Drift webhooks, including:
- contact_identified: When a contact adds their email in chat
- new_message: When a new message is created
- new_conversation: When a new conversation is started
- conversation_inactive: When a conversation has been inactive for a configurable period
- conversation_push: Combines events indicating conversations are ready for consumption
- button_clicked: When a button is clicked in a conversation
- playbook_goal_met: When a goal is met with a previously identified contact
- new_meeting: When a meeting is booked
- contact_updated: When a contact record is updated in Drift
- user_availability_updated: When a Drift user's availability changes
- chat_to_call: When a Drift user completes a call through Chat to Call
Configuring Webhooks
To set up webhooks:
- Go to your app on dev.drift.com
- Under the "Events" section, provide a request URL
- Choose the events you want to be notified about
Verification and Security
Drift provides a Verification Token that you can use to verify that the data sent to your endpoint is actually from Drift. This token is more secure than IP whitelisting.
Best Practices
- Use the provided Verification Token to ensure the authenticity of webhook data
- Consider using a tool like ngrok for testing webhooks on your local machine
- Be aware that some events, like conversation_status_updated, are being deprecated
Summary
Drift's webhook system provides a robust way to receive real-time updates about various events in your Drift account. By subscribing to these events, you can build integrations that react immediately to changes and activities within Drift, enabling more dynamic and responsive applications.
Rate Limits and other limitations
The API Rate Limits for the Drift API are as follows:
Default Rate Limit
The default rate limit for the Drift API is 600 requests per minute [1]. This is generally considered a high limit to accommodate bulk updates and data pulls from the Drift platform.
Key Points to Consider
- Rate limits and usage caps are returned in the headers of web responses from the Drift API [1].
- The rate limit may be lower for certain endpoints if specifically stated in the documentation [1].
- Drift logs the volume of requests from tokens and apps, so it's recommended to use the APIs with intent [1].
Best Practices
- Monitor the rate limit headers in API responses to track your usage.
- If you need to perform bulk operations, consider spreading them out over time to avoid hitting rate limits.
- For large data synchronization tasks, Drift recommends using webhooks to stay in sync rather than constantly polling the API [1].
- If you require higher rate limits for your use case, you may need to contact Drift support to discuss your requirements.
Additional Information
While not directly related to the Drift API rate limits, it's worth noting that some other APIs in the conversation space have different rate limits. For example:
- The Radiant Drift API (which appears to be a different service) has the following rate limits:
- Standard: 10 requests per second per IP
- Premium: 25 requests per second per IP
These are mentioned to provide context on how rate limits can vary between different services, but they do not apply to the Drift API itself.
In summary, the Drift API has a generally high rate limit of 600 requests per minute by default, but it's important to monitor the rate limit headers in responses and use the API responsibly to ensure smooth operation of your integrations.
Latest API Version
Based on the search results provided, I could not find a specific mention of the most recent version of the Drift API. However, I can provide some relevant information about Drift versions and updates:
Latest Release Information
The most recent release mentioned in the search results is Drift 2.19.1, which was released on July 12, 2023 [5]. This patch release fixed an issue with the exclusively
function not working on the web.
Recent Major Versions
Some of the recent major versions of Drift mentioned in the search results include:
- Drift 2.19.0 (release date not specified) [5]
- Drift 2.18.0 (released on May 4, 2023) [5]
- Drift 2.17.0 (released on April 20, 2023) [5]
- Drift 2.16.0 (released on February 24, 2023) [5]
- Drift 2.15.0 (released on January 17, 2023) [5]
Key Points to Consider
- Drift regularly releases updates with bug fixes, performance improvements, and new features [5].
- The Drift project is actively maintained, with frequent releases and updates [5].
- When upgrading to a new version, it's important to check the release notes for any breaking changes or new features [5].
Best Practices
- Always check the official Drift documentation or GitHub repository for the most up-to-date information on versions and releases.
- When using Drift in your projects, specify the version in your
pubspec.yaml
file to ensure consistency.
- Keep an eye on the release notes for each new version to stay informed about new features, bug fixes, and potential breaking changes.
It's important to note that the information provided here is based on the search results, which may not include the absolute latest version. For the most current information, I recommend checking the official Drift GitHub repository or pub.dev page.
How to get a Drift developer account and API Keys?
Here are the key steps to get a developer account for Drift to create an API integration:
-
Create a Drift account:
- Go to dev.drift.com and sign up for a developer account if you don't already have one.
-
Create an app:
- On the dev.drift.com dashboard, click "Build Your App" to create a new app.
- Add basic information like name, description, and icon for your app.
-
Configure permissions:
- Go to the "OAuth & Permissions" section and select the API scopes your app will need.
- Be deliberate in choosing scopes, as changing them later requires regenerating tokens.
-
Install the app:
- In the "Activate Your App" section, install the app to your Drift account.
- This will generate a non-expiring access token you can use for API requests.
-
Implement OAuth (for public apps only):
- If you want to make your app available to other Drift users, implement the OAuth 2.0 flow.
- This is not required for private apps used only within your organization.
-
Test your integration:
- Use the access token to make API requests and test your integration.
By following these steps, you can create a developer account and set up an API integration with Drift.
What can you do with the Drift API?
Based on the provided search results, here's a list of data models you can interact with using the Drift API, along with what is possible for each:
Contacts
- Create new contacts
- Update existing contacts
- Retrieve contact information
- Delete contacts
- Unsubscribe contacts from emails
- Post timeline events for contacts
- Set up and manage custom attributes for contacts
- List custom attributes
Conversations
- Retrieve conversation data
- Export conversation transcripts
- Update conversation status
- Interact with Drift chat programmatically
Users
- Manage user data through the SCIM API
- Search for users
- Provision users
- Update user information
- Deprovision users
Playbooks
- Implement webhook functionality for playbooks
- Switch playbooks programmatically
Events
- Subscribe to various Drift events through webhooks
- Capture and process conversation events
Custom Integrations
- Build custom integrations with other platforms or bots
- Create custom Marketing Automation Platform (MAP) or Customer Relationship Management (CRM) integrations
Attributes
- Manage and update custom attributes
- Capture URL query strings as attributes
- Assign country from browser/IP address to attributes
Chat Widget
- Start a chat programmatically
- Customize chat widget behavior
- Load support chat client with conversation events
Analytics
- Send conversation events to Google Tag Manager's Data Layer
- Integrate with Adobe Analytics for browser events
Miscellaneous
- Embed Drift's landing pages
- Manage welcome messages
- Convert epoch time to standard time
- Implement custom webhook configurations (e.g., with Zapier)
It's important to note that the specific capabilities and endpoints available may vary depending on your Drift plan and permissions. Always refer to the most up-to-date Drift API documentation for the most accurate and detailed information on available data models and interactions.