conversationCreate
mutation
Requires unauthenticated_write_message access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Create a new conversation in a chat app or messaging system. Before you call this mutation, ensure that a third-party user has been created using the thirdUserCreate mutation.
Arguments
The input fields to create a conversation.
Return
Conversation information.
Errors related to the user information.
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Create a conversation
Code
mutation {
conversationCreate(input: { userId: "gid://shopline/ThirdUser/******5235111" }) {
userErrors {
code
field
message
}
conversation {
id
}
}
}
Response
{
"conversationCreate": {
"conversation": {
"id": "gid://shopline/Conversation/******403588"
},
"userErrors": []
}
}
Was this article helpful to you?