API Integration
This section introduces how to use the API for integration.
Overview
SendKit is a secure and reliable email delivery service that supports HMAC-SHA256 signature authentication to ensure the security and integrity of requests.
Base URL:
https://api.sendkit.bestAuthentication
Every API call requires an access token. Please include the following in your request header. If you don’t have a token yet, please log in to your account and create one in the API Keys page of the dashboard.
Authorization: Bearer <token>Common HTTP Response Body
All API Endpoint responses maintain a unified data structure.
| Name | Type | Required | Description |
|---|---|---|---|
| requestId | string | Yes | A unique number for the request, which can be used for troubleshooting. |
| code | number | Yes | Service response code. 0 indicates success. |
| success | boolean | Yes | Indicates whether the business operation is successful. |
| message | string | Yes | Message prompt of the operation result. |
| ts | number | Yes | Server millisecond timestamp. |
| data | any | Yes | Business data field. This field can be of any data type. For specific data types, please refer to the corresponding API Endpoint. |
API Endpoints
Tips
Please note that all the request endpoints below are subject to rate limits. The current limit is 5 requests per second, but this may change in the future. Be sure to check the documentation or contact us for the most up-to-date information.
Send Email
Send an email
Request Endpoint:
/v1/sendRequest Method:
POST Request Payload:
| Name | Type | Required | Description |
|---|---|---|---|
| from | string | Yes | Sender email address |
| to | string | Yes | Recipient email address |
| subject | string | Yes | Email subject |
| body | string | Yes | Email content |
Response Enity
| Name | Type | Required | Description |
|---|---|---|---|
| - | - | - | - |
Example Request Body:
{
"from": "test@example.com",
"to": "test@example.com",
"subject": "Hello, world!",
"body": "This is a test email."
}Example Response:
{
"requestId": "7d7db227-4f67-4318-8231-480bf519db54",
"code": 0,
"success": true,
"message": "Successfully",
"ts": 1758864125072,
"data": null
}Code Examples
curl -X POST https://api.sendkit.best/v1/send \
-H "Content-Type: application/json; charset=utf-8" \
-H "Authorization: Bearer <token>" \
-d '{
"from": "from@example.com",
"to": "to@example.com",
"subject": "test send",
"body": "test content"
}'Contact List
Get contact list
Request Endpoint:
/v1/contactRequest Method:
GET Request Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| appId | string | Yes | Application ID |
| page | number | No | Page number, default is 1 |
| pageSize | number | No | Page size, default is 500 |
Response Entity:
| Name | Type | Required | Description |
|---|---|---|---|
| total | number | Yes | Total number of contacts |
| page | number | Yes | Page number |
| pageSize | number | Yes | Page size |
| list | array<object> | Yes | Contact list |
| - emailAddress | string | Yes | Email address |
| - status | string | Yes | Contact status, enums: Confirmed, Unsubscribed |
| - language | string | Yes | Language |
| - firstName | string | Yes | First name |
| - lastName | string | Yes | Last name |
| - phoneNumber | string | Yes | Phone number |
| - birthday | string | Yes | Birthday |
| - company | string | Yes | Company |
| - vipLevel | number | Yes | VIP level |
| - amount | string | Yes | Amount |
Example Response:
{
"requestId": "7d7db227-4f67-4318-8231-480bf519db54",
"code": 0,
"success": true,
"message": "Successfully",
"ts": 1758864125072,
"data": {
"total": 100,
"page": 1,
"pageSize": 500,
"list": [
{
"emailAddress": "john.doe@example.com",
"status": "Confirmed",
"language": "en",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "1234567890",
"birthday": "1990-01-01",
"company": "Example Inc.",
"vipLevel": 1,
"amount": "100.00"
}
]
}
}Code Examples
curl -X GET https://api.sendkit.best/v1/contact \
-H "Content-Type: application/json; charset=utf-8" \
-H "Authorization: Bearer <token>" \
-d 'appId=1234567890&page=1&pageSize=50'Save Contact
Create or update contact
Request Endpoint:
/v1/contactRequest Method:
POST Request Payload:
| Name | Type | Required | Description |
|---|---|---|---|
| appId | string | Yes | Application ID (effected when create only) |
| emailAddress | string | Yes | Email address (effected when create only) |
| status | string | Yes | Contact status, enums: Confirmed, Unsubscribed (effected when create only) |
| data | record<string, string> | No | contact metadata |
data field supported:
| Name | Type | Required | Description | Examples |
|---|---|---|---|---|
| language | string | No | Language | en |
| firstName | string | No | First name | John |
| lastName | string | No | Last name | Doe |
| phoneNumber | string | No | Phone number | 1234567890 |
| birthday | string | No | Birthday (date only, format: DD/MM) | 01/12 |
| company | string | No | Company | Example Inc. |
| vipLevel | number | No | VIP level | 1 |
| amount | string | No | Amount | 100.00 |
Response Entity:
| Name | Type | Required | Description |
|---|---|---|---|
| - | - | - | - |
Example Request Body:
{
"appId": "1234567890",
"emailAddress": "john.doe@example.com",
"status": "Confirmed",
"data": {
"language": "en",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "1234567890",
"birthday": "1990-01-01",
"company": "Example Inc.",
"vipLevel": 1,
"amount": "100.00"
}
}Example Response:
{
"requestId": "7d7db227-4f67-4318-8231-480bf519db54",
"code": 0,
"success": true,
"message": "Successfully",
"ts": 1758864125072,
"data": null
}Code Examples
curl -X POST https://api.sendkit.best/v1/contact \
-H "Content-Type: application/json; charset=utf-8" \
-H "Authorization: Bearer <token>" \
-d '{
"appId": "1234567890",
"emailAddress": "john.doe@example.com",
"status": "Confirmed",
"data": {
"language": "en",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "1234567890",
"birthday": "1990-01-01",
"company": "Example Inc.",
"vipLevel": 1,
"amount": "100.00"
}
}'Delete Contact
Delete a contact
Request Endpoint:
/v1/contactRequest Method:
DELETE Request Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| appId | string | Yes | Application ID |
| emailAddress | string | Yes | Email address |
Response Entity:
| Name | Type | Required | Description |
|---|---|---|---|
| - | - | - | - |
Example Response:
{
"requestId": "7d7db227-4f67-4318-8231-480bf519db54",
"code": 0,
"success": true,
"message": "Successfully",
"ts": 1758864125072,
"data": null
}Code Examples
curl -X DELETE https://api.sendkit.best/v1/contact?appId=1234567890&emailAddress=john.doe@example.com \
-H "Content-Type: application/json; charset=utf-8" \
-H "Authorization: Bearer <token>"Error Handling
In the response body, the code field indicates different business processing results. The following are the possible code values you may encounter.
| Code | Description |
|---|---|
| 0 | Request successful |
| 100033 | Bad request parameters |
| 100023 | Email too large |
| 100025 | Exceeding the maximum sending limit |
| 100029 | Invalid signature |
| 100030 | The sending domain is invalid |
| 100031 | You have reached the maximum daily sending limit |
| 100047 | Your subscription has expired. Please renew to continue using the service |
| 100048 | The sender’s email address does not exist |
| 100049 | Please activate your account |