Push Employment Messages

View Markdown

Last edited on 2026-03-16

This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.

API English Name: SendEmployeeRelationMsg

Sends template messages to users with an established employment relationship via Mini Program Merchant Assistant.

1. Call Method

HTTPS Call

POST https://api.weixin.qq.com/cgi-bin/message/wxopen/employeerelationmsg/send?access_token=ACCESS_TOKEN

Cloud Call

  • This API does not support cloud call.

Third-party Call

  • This API does not support third-party platform calls.

2. Request Parameters

Query Parameters Query String Parameters

ParameterTypeRequiredExampleDescription
access_tokenstringYesACCESS_TOKENAPI call credential, you can use access_token

Request Body Request Payload

ParameterTypeRequiredExampleDescription
template_idstringYesbV8Jk-XXXXXXMessage template ID
pagestringYespage/XXXJump path
touserstringYesoL7T268t3zlOb64IvrN64-XXXXXXOpenID of the recipient user
datastringYes{\"data\":{\"character_string1\":{\"value\":\"aaa\"},\"amount1\":{\"value\":\"222\"}}}Message content

3. Response Parameters

Response Body Response Payload

ParameterTypeExampleDescription
errcodenumber0Error code
errmsgstringokError message

4. Notes

No special notes for this API

5. Code Example

Request Example

{
    "template_id": "bV8Jk-XXXXXX",
    "page": "page/XXX",
    "touser": "oL7T268t3zlOb64IvrN64-XXXXXX",
    "data": "{\"data\":{\"character_string1\":{\"value\":\"aaa\"},\"amount1\":{\"value\":\"222\"}}}"
}

Response Example

{
    "errcode": 0,
    "errmsg": "ok"
}

6. Error Codes

The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.

Error CodeError DescriptionSolution
-1system errorThe system is busy. Developers are advised to try again later.
40097invalid argsInvalid parameter
40256invalid employee relationPushing messages to a user who has no established employment relationship
40257decode touser errorFailed to parse the recipient user's OpenID
43104this app does not have poermissionThe app does not have the permission to push template messages
50001user unauthorizedThe user has not subscribed to the template

7. Applicable Scope

This API supports 「Mini Program」 account type calls. Other account types cannot call unless otherwise specified.