SendKit Docs

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.best

Authentication

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.

NameTypeRequiredDescription
requestIdstringYesA unique number for the request, which can be used for troubleshooting.
codenumberYesService response code. 0 indicates success.
successbooleanYesIndicates whether the business operation is successful.
messagestringYesMessage prompt of the operation result.
tsnumberYesServer millisecond timestamp.
dataanyYesBusiness 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/send

Request Method:

POST  

Request Payload:

NameTypeRequiredDescription
fromstringYesSender email address
tostringYesRecipient email address
subjectstringYesEmail subject
bodystringYesEmail content

Response Enity

NameTypeRequiredDescription
----

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/contact

Request Method:

GET  

Request Parameters:

NameTypeRequiredDescription
appIdstringYesApplication ID
pagenumberNoPage number, default is 1
pageSizenumberNoPage size, default is 500

Response Entity:

NameTypeRequiredDescription
totalnumberYesTotal number of contacts
pagenumberYesPage number
pageSizenumberYesPage size
listarray<object>YesContact list
- emailAddressstringYesEmail address
- statusstringYesContact status, enums: Confirmed, Unsubscribed
- languagestringYesLanguage
- firstNamestringYesFirst name
- lastNamestringYesLast name
- phoneNumberstringYesPhone number
- birthdaystringYesBirthday
- companystringYesCompany
- vipLevelnumberYesVIP level
- amountstringYesAmount

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/contact

Request Method:

POST  

Request Payload:

NameTypeRequiredDescription
appIdstringYesApplication ID (effected when create only)
emailAddressstringYesEmail address (effected when create only)
statusstringYesContact status, enums: Confirmed, Unsubscribed (effected when create only)
datarecord<string, string>Nocontact metadata

data field supported:

NameTypeRequiredDescriptionExamples
languagestringNoLanguageen
firstNamestringNoFirst nameJohn
lastNamestringNoLast nameDoe
phoneNumberstringNoPhone number1234567890
birthdaystringNoBirthday (date only, format: DD/MM)01/12
companystringNoCompanyExample Inc.
vipLevelnumberNoVIP level1
amountstringNoAmount100.00

Response Entity:

NameTypeRequiredDescription
----

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/contact

Request Method:

DELETE  

Request Parameters:

NameTypeRequiredDescription
appIdstringYesApplication ID
emailAddressstringYesEmail address

Response Entity:

NameTypeRequiredDescription
----

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.

CodeDescription
0Request successful
100033Bad request parameters
100023Email too large
100025Exceeding the maximum sending limit
100029Invalid signature
100030The sending domain is invalid
100031You have reached the maximum daily sending limit
100047Your subscription has expired. Please renew to continue using the service
100048The sender’s email address does not exist
100049Please activate your account