Skip to main content
PATCH
/
chats
/
{chat_id}
Update chat
curl --request PATCH \
  --url https://app.timelines.ai/integrations/api/chats/{chat_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "John Doe",
  "responsible": "john.doe@acme.com",
  "closed": false,
  "read": true,
  "chatgpt_autoresponse_enabled": true
}
'
{
  "status": "ok",
  "data": {
    "id": "1000001",
    "name": "John Doe",
    "jid": "14840000000@s.whatsapp.net",
    "is_group": false,
    "closed": false,
    "read": true,
    "labels": [
      "label1",
      "label2",
      "label3"
    ],
    "chatgpt_autoresponse_enabled": true,
    "whatsapp_account_id": "972502222222@s.whatsapp.net",
    "chat_url": "https://app.timelines.ai/chat/1000001/messages/",
    "created_timestamp": "2024-01-08 10:35:18 +0200",
    "unattended": false,
    "photo": "https://acme.com/logo.png",
    "phone": "+972501111111",
    "responsible_email": "kate.smitch@acme.com",
    "responsible_name": "Kate Smith",
    "last_message_uid": "4f43a9a0-b87e-4667-adfd-689674c3326c",
    "last_message_timestamp": "2024-01-29 13:55:04 +0200",
    "group_members": [
      {
        "name": "John Doe",
        "phone": "+972502222222",
        "role": "admin",
        "chat_id": 123456
      }
    ],
    "is_allowed_to_message": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chat_id
integer
required

an id of the chat as appears in TimelinesAI (can be found in the URL of the chat page, or in the payload of outbound webhook). Supports sending messages to a group.

Body

application/json
name
string

Chat's name (must be unique in workspace)

Example:

"John Doe"

responsible
string

Assign team member as responsible (specified by registration email in TimelinesAI) or unassign a chat from responsible by supplying an empty string ("").

Example:

"john.doe@acme.com"

closed
boolean

Is the chart closed (true) or open (false)

Example:

false

read
boolean

Is the chat read (true) or unread (false)

Example:

true

chatgpt_autoresponse_enabled
boolean

Is the ChatGPT autoresponse enabled (true) or disabled (false) for the chat

Example:

true

Response

Success

status
enum<string>
required
Available options:
ok,
error
Example:

"ok"

data
object
required