Introduction
Overview
The Twozo Public API enables external applications to securely interact with CRM data. It provides REST APIs to create, update, delete, and list CRM records, allowing seamless integration with third-party systems.
The Public API supports the following modules:
- Contact
- Company
- Deal
- Product
Each module provides the following endpoints:
- Create
- Update
- Delete
- Get Record
- List Records
- Dropdown Values
- Field List
Permission Criteria
- Only users with access to the Admin Settings can generate, view, and manage their API Key.
- Each user is assigned a unique API Key. API requests are authenticated using the API Key associated with the requesting user.
- Access to API operations is governed by the user's existing module and action permissions.
- If a user attempts to perform an action (such as View, Create, Edit, or Delete) without the required permission, the API will reject the request and return the following response:
-
Status Code:
403 Forbidden -
Reason: The authenticated user does not have permission to perform the requested action.
-
Authentication
All Public API requests must include the API Key in the request header.
Request Header
| Header | Value |
|---|---|
X-API-Key | Generated API Key |
Obtaining an API Key
Before using the Public APIs, you must generate an API key from your CRM account.
To generate or retrieve your API key:
- Navigate to Settings.
- Select API Settings.
- Under Your API Key, copy the generated API key.
- Use the copied API key in the
X-API-Keyrequest header for all Public API requests.
Keep your API key secure. Do not share it publicly or include it in client-side applications. If your API key is compromised, regenerate it from the API Settings page.
Base URL
The base URL for all Public API endpoints.
https://crm.twozo.io/rest/api/v1Standard Response Status Codes
| Status Code | When to Use | Example |
|---|---|---|
| 200 OK | Successful GET/PUT/PATCH | Resource returned successfully |
| 204 No Content | Success with no response body | Successful update with no content |
| 400 Bad Request | Invalid request syntax or validation | Missing required field, invalid JSON |
| 401 Unauthorized | Authentication required or invalid token | Missing/expired JWT |
| 403 Forbidden | User authenticated but lacks permission | User cannot access the resource |
| 405 Method Not Allowed | HTTP method not supported | POST on a GET-only endpoint |
| 429 Too Many Requests | Rate limit exceeded | API throttling |
| 500 Internal Server Error | Unexpected server-side exception | NullPointerException, database failure |
| 502 Bad Gateway | Upstream server error | Gateway/proxy issue |
| 503 Service Unavailable | Service temporarily unavailable | Maintenance, overloaded server |
| 504 Gateway Timeout | Upstream service timeout | Dependency timed out |