Chat21 native REST API server
Below are described the REST API of Chat21
Before using these APIs you need an authentication JWT token
Coming soon
== Send a Message ==
curl --location --request POST 'http://localhost:8004/api/APP_ID/messages' \
--header 'Authorization: JWT-TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"sender_fullname": "SENDER FULLNAME",
"recipient_id": "RECIPIENT-UUID",
"recipient_fullname": "RECIPIENT FULLNAME",
"text": "hello",
"type": "text",
"channel_type": "direct"
}'
Where :
Create a chat user's group making the following POST call :
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"group_name": "<GROUP_NAME>", "group_members": {"<MEMBER_ID>":1}}' \
'http://localhost:8004/api/<APP_ID>/groups'
Where:
With this API the user can join (become a member) of an existing group:
curl -X POST \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"member_id": "<MEMBER_ID>"}' \
'http://localhost:8004/api/<APP_ID>/groups/<GROUP_ID>/members'
Where :
With this API the user can leave an existing group:
curl -X DELETE \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"member_id": "<MEMBER_ID>"}' \
'http://localhost:8004/api/<APP_ID>/groups/<GROUP_ID>/members/<MEMBERID'
Where :
With this API you can set the group members
curl -X PUT \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
-d '{"members": {"<member_id1>":1},{"<member_id2>":1}}' \
'http://localhost:8004/api/<APP_ID>/groups/<GROUP_ID>/members'
Where :
Archive or delete a conversation from the personal timeline specified by a RECIPIENT_ID
curl -X DELETE \
-H 'Content-Type: application/json' \
-H "Authorization: JWT-TOKEN" \
http://localhost:8004/api/<APP_ID>/conversations/<RECIPIENT_ID>?delete=<BOOLEAN_VALUE>
Where :
Content type
Image
Digest
sha256:cd78a91e3…
Size
369.1 MB
Last updated
1 day ago
docker pull chat21/chat21-http-server