Wechaty Puppet Service OpenAPI Specification (1.0.1)
Download OpenAPI specification:Download
Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.
Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.
Puppet_ContactCorporationRemark
path Parameters
contactId required | string |
Request Body schema: application/json
corporationRemarkStringValueDeprecated | string |
corporationRemark | string |
Responses
Request samples
- Payload
Content type
application/json
{- "corporationRemarkStringValueDeprecated": "string",
- "corporationRemark": "string"
}
Response samples
- 200
- default
Content type
application/json
{ }
Puppet_ContactDescription
path Parameters
contactId required | string |
Request Body schema: application/json
descriptionStringValueDeprecated | string |
description | string |
Responses
Request samples
- Payload
Content type
application/json
{- "descriptionStringValueDeprecated": "string",
- "description": "string"
}
Response samples
- 200
- default
Content type
application/json
{ }
Puppet_TagContactList
path Parameters
contactId required | string |
query Parameters
contactIdStringValueDeprecated | string @deprecated: Huan(202109): Wrapper types must not be used going forward. https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields |
Responses
Response samples
- 200
- default
Content type
application/json
{- "ids": [
- "string"
]
}
Puppet_ContactAlias
path Parameters
id required | string |
Request Body schema: application/json
aliasStringValueDeprecated | string (nullable) |
alias | string |
Responses
Request samples
- Payload
Content type
application/json
{- "aliasStringValueDeprecated": "string",
- "alias": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "aliasStringValueDeprecated": "string",
- "alias": "string"
}
Puppet_DirtyPayload2
path Parameters
id required | string |
type required | stringPAYLOAD_TYPE_CONTACT Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
Content type
application/json
{ }
Puppet_MessageSendContact
path Parameters
conversationId required | string |
Request Body schema: application/json
contactId | string |
Responses
Request samples
- Payload
Content type
application/json
{- "contactId": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "idStringValueDeprecated": "string",
- "id": "string"
}
Puppet_MessageSendLocation
path Parameters
conversationId required | string |
Request Body schema: application/json
object (puppetLocationPayload) | |||||||||||
|
Responses
Request samples
- Payload
Content type
application/json
{- "location": {
- "accuracy": 0.1,
- "address": "string",
- "latitude": 0.1,
- "longitude": 0.1,
- "name": "string"
}
}
Response samples
- 200
- default
Content type
application/json
{- "id": "string"
}
Puppet_MessageSendMiniProgram
path Parameters
conversationId required | string |
Request Body schema: application/json
miniProgramDeprecated | string (*
Huan(202110): We should use payload instead of JSON.stringify string
The compatible code will be removed after Dec 31, 2022) |
object (puppetMiniProgramPayload) |
Responses
Request samples
- Payload
Content type
application/json
{- "miniProgramDeprecated": "string",
- "miniProgram": {
- "appid": "string",
- "description": "string",
- "pagePath": "string",
- "iconUrl": "string",
- "shareId": "string",
- "thumbUrl": "string",
- "title": "string",
- "username": "string",
- "thumbKey": "string"
}
}
Response samples
- 200
- default
Content type
application/json
{- "idStringValueDeprecated": "string",
- "id": "string"
}
Puppet_MessageSendText
path Parameters
conversationId required | string |
Request Body schema: application/json
text | string |
mentionalIds | Array of strings (Huan(202011) FIXME: Issue #99
https://github.com/wechaty/grpc/issues/99) |
Responses
Request samples
- Payload
Content type
application/json
{- "text": "string",
- "mentionalIds": [
- "string"
]
}
Response samples
- 200
- default
Content type
application/json
{- "idStringValueDeprecated": "string",
- "id": "string"
}
Puppet_MessageSendUrl
path Parameters
conversationId required | string |
Request Body schema: application/json
urlLinkDeprecated | string (*
Huan(202110): We should use payload instead of JSON.stringify string
The compatible code will be removed after Dec 31, 2022) |
object (puppetUrlLinkPayload) |
Responses
Request samples
- Payload
Content type
application/json
{- "urlLinkDeprecated": "string",
- "urlLink": {
- "description": "string",
- "thumbnailUrl": "string",
- "title": "string",
- "url": "string"
}
}
Response samples
- 200
- default
Content type
application/json
{- "idStringValueDeprecated": "string",
- "id": "string"
}
Puppet_FriendshipAdd
path Parameters
contactId required | string |
Request Body schema: application/json
hello | string |
sourceRoomIdStringValueDeprecated | string |
sourceContactIdStringValueDeprecated | string |
object (*
"Referrer" and "Referral" refers to different things. "Referrer" is something or somebody who refers. "Referral" is the act of referring.
- https://english.stackexchange.com/questions/33135/referrer-versus-referral-versus-referer) |
Responses
Request samples
- Payload
Content type
application/json
{- "hello": "string",
- "sourceRoomIdStringValueDeprecated": "string",
- "sourceContactIdStringValueDeprecated": "string",
- "referrer": {
- "contactId": "string",
- "roomId": "string"
}
}
Response samples
- 200
- default
Content type
application/json
{ }
*
Friendship
path Parameters
id required | string |
query Parameters
payloadStringValueDeprecated | string
|
payload | string |
Responses
Response samples
- 200
- default
Content type
application/json
{- "id": "string",
- "contactId": "string",
- "hello": "string",
- "type": "FRIENDSHIP_TYPE_UNSPECIFIED",
- "stranger": "string",
- "ticket": "string",
- "scene": "FRIENDSHIP_SCENE_TYPE_UNSPECIFIED"
}
Puppet_DirtyPayload5
path Parameters
id required | string |
type required | stringPAYLOAD_TYPE_FRIENDSHIP Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
Content type
application/json
{ }
Response samples
- 200
- default
Content type
application/json
{- "id": "string",
- "filename": "string",
- "text": "string",
- "timestampDeprecated": "string",
- "type": "MESSAGE_TYPE_UNSPECIFIED",
- "fromId": "string",
- "roomId": "string",
- "toId": "string",
- "mentionIds": [
- "string"
], - "receiveTime": "2019-08-24T14:15:22Z"
}
Puppet_DirtyPayload
path Parameters
id required | string |
type required | stringPAYLOAD_TYPE_MESSAGE Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
Content type
application/json
{ }
Response samples
- 200
- default
Content type
application/json
{- "miniProgramDeprecated": "string",
- "miniProgram": {
- "appid": "string",
- "description": "string",
- "pagePath": "string",
- "iconUrl": "string",
- "shareId": "string",
- "thumbUrl": "string",
- "title": "string",
- "username": "string",
- "thumbKey": "string"
}
}
*
Room Invitation
path Parameters
id required | string |
query Parameters
payloadStringValueDeprecated | string
@deprecated: use payload instead. Huan(202109): Wrapper types must not be used going forward. https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields |
payload | string |
Responses
Response samples
- 200
- default
Content type
application/json
{- "id": "string",
- "inviterId": "string",
- "topic": "string",
- "memberCount": 0,
- "memberIds": [
- "string"
], - "timestampUint64Deprecated": "string",
- "avatar": "string",
- "invitation": "string",
- "receiverId": "string",
- "receiveTime": "2019-08-24T14:15:22Z"
}
Puppet_RoomAnnounce2
path Parameters
id required | string |
Request Body schema: application/json
textStringValueDeprecated | string |
text | string |
Responses
Request samples
- Payload
Content type
application/json
{- "textStringValueDeprecated": "string",
- "text": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "textStringValueDeprecated": "string",
- "text": "string"
}
Puppet_DirtyPayload4
path Parameters
id required | string |
type required | stringPAYLOAD_TYPE_ROOM_MEMBER Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
Content type
application/json
{ }
Puppet_DirtyPayload3
path Parameters
id required | string |
type required | stringPAYLOAD_TYPE_ROOM Enum: "PAYLOAD_TYPE_UNSPECIFIED" "PAYLOAD_TYPE_MESSAGE" "PAYLOAD_TYPE_CONTACT" "PAYLOAD_TYPE_ROOM" "PAYLOAD_TYPE_ROOM_MEMBER" "PAYLOAD_TYPE_FRIENDSHIP" |
Responses
Response samples
- 200
- default
Content type
application/json
{ }
* Deprecated: will be removed after Dec 31, 2022
Request Body schema: application/json
id | string |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "result": {
- "fileBoxChunk": {
- "data": "string",
- "name": "string"
}
}, - "error": {
- "code": 0,
- "message": "string",
- "details": [
- {
- "@type": "string",
- "property1": null,
- "property2": null
}
]
}
}
Puppet_MessageImage
Request Body schema: application/json
id | string |
type | string (puppetImageType) Default: "IMAGE_TYPE_UNSPECIFIED" Enum: "IMAGE_TYPE_UNSPECIFIED" "IMAGE_TYPE_THUMBNAIL" "IMAGE_TYPE_HD" "IMAGE_TYPE_ARTWORK" |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "type": "IMAGE_TYPE_UNSPECIFIED"
}
Response samples
- 200
- default
Content type
application/json
{- "fileBox": "string"
}
Puppet_MessageImageStream
Request Body schema: application/json
id | string |
type | string (puppetImageType) Default: "IMAGE_TYPE_UNSPECIFIED" Enum: "IMAGE_TYPE_UNSPECIFIED" "IMAGE_TYPE_THUMBNAIL" "IMAGE_TYPE_HD" "IMAGE_TYPE_ARTWORK" |
Responses
Request samples
- Payload
Content type
application/json
{- "id": "string",
- "type": "IMAGE_TYPE_UNSPECIFIED"
}
Response samples
- 200
- default
Content type
application/json
{- "result": {
- "fileBoxChunk": {
- "data": "string",
- "name": "string"
}
}, - "error": {
- "code": 0,
- "message": "string",
- "details": [
- {
- "@type": "string",
- "property1": null,
- "property2": null
}
]
}
}
Puppet_MessageSendFile
Request Body schema: application/json
conversationId | string |
fileBox | string |
Responses
Request samples
- Payload
Content type
application/json
{- "conversationId": "string",
- "fileBox": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "idStringValueDeprecated": "string",
- "id": "string"
}
Puppet_MessageSendFileStream
Request Body schema: application/json
(streaming inputs)
conversationId | string (oneof payload {) |
object (puppetFileBoxChunk) |
Responses
Request samples
- Payload
Content type
application/json
{- "conversationId": "string",
- "fileBoxChunk": {
- "data": "string",
- "name": "string"
}
}
Response samples
- 200
- default
Content type
application/json
{- "idStringValueDeprecated": "string",
- "id": "string"
}
Response samples
- 200
- default
Content type
application/json
{- "id": "string",
- "gender": "CONTACT_GENDER_UNSPECIFIED",
- "type": "CONTACT_TYPE_UNSPECIFIED",
- "name": "string",
- "avatar": "string",
- "address": "string",
- "alias": "string",
- "city": "string",
- "friend": true,
- "province": "string",
- "signature": "string",
- "star": true,
- "weixin": "string",
- "corporation": "string",
- "title": "string",
- "description": "string",
- "coworker": true,
- "phones": [
- "string"
]
}