How to use the ECDP API
Before you start using the ECDP API, review the basic requirements for base addresses, authentication, headers, and the request/response format. These rules apply to all API methods and are the starting point for creating valid requests.
What can you do with the ECDP API?
With the ExpertSender API, you can automate:
- adding new customers to your database in the platform,
- updating customer data already in your database,
- registering orders and changing their statuses,
- adding custom events in scenarios,
- exporting customer data from selected segments.
How to use the ECDP API
To work with the API you need an application (a client) from which you can send requests. The best choice is the one you already use.
Add your business unit’s API key to the application and send an API request for the data you need. Every request must include your API key.
A request is part of an API call, which also includes processing the request by the server (for example, the ECDP platform) and returning the results as data.
Base URL
All endpoints use the base address:
https://api.ecdp.app/{resource}
Here, {resource}
is the name of the API section, for example: orders
, customers
, or scenariocustomevents
.
API key – authentication
Each business unit has its own API key. You can find your key in the ExpertSender app under: Settings → API.
If you manage multiple business units, each one has its own unique API key.
Headers
Every request must include:
- x-api-key: {your-api-key}
- Content-Type: application/json
Request and response format
- All request bodies must be written in JSON format.
- All responses are returned in JSON format.
Every request must include the header: x-api-key: {your-api-key}
API response codes
When you send a request, the server responds with a code. Here are the most common ones:
Code | Message | Description |
200 | Success | Your request worked – the server returned data. |
201 | Created | Your request was created successfully. |
400 | Bad request | Something’s wrong with your request – usually a missing or incorrect parameter, like email or phone. |
401 | Unauthorized | Your API key is missing, or you’re trying to access data you don’t have permission for. |
403 | Forbidden | Your request format is correct, but you can’t access this data. |
404 | Not found | The data you’re looking for doesn’t exist on the server. |
500 | Internal server error | Something went wrong on our end – no action needed from you. |
Different methods might return different response codes. Check each method’s documentation for specific codes.
API logs
All API requests linked to the business unit you manage can be found in: Settings > Logs > API logs.
API logs are stored in the system for 1 month.