TimelinesAI

App · 20 actions

Send WhatsApp messages and read chats, messages, accounts, and calls.

Actions

ActionWhat it does
Get chatGet chat.
Get current teammateGet current teammate.
Get messageGet message.
Get message status historyGet message status history.
Get workspace informationGet workspace information.
List callsList calls.
List chat labelsList chat labels.
List chat messagesList chat messages.
List chatsList chats.
List filesList files.
List teammatesList teammates.
List templatesList templates.
List webhooksList webhooks.
List WhatsApp accountsList WhatsApp accounts.
List WhatsApp Business accountsList WhatsApp Business accounts.
List WhatsApp Business chatsList WhatsApp Business chats.
List WhatsApp Business templatesList WhatsApp Business templates.
Search messagesSearch messages.
Send message to chatSend text to an existing WhatsApp chat.
Send WhatsApp messageSend text to a phone number using a connected WhatsApp account.

Get chat

Get chat.

Inputs

Chatchat_idnumberRequired
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._

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "chat_sync": true,
      "chat_url": "example",
      "chatgpt_autoresponse_enabled": true,
      "closed": true,
      "created_timestamp": "example",
      "id": 1,
      "is_group": true,
      "jid": "example",
      "labels": [
        "example"
      ],
      "last_message": {},
      "last_message_timestamp": "example",
      "last_message_uid": "example",
      "name": "example",
      "phone": "example",
      "read": true,
      "responsible_email": "example",
      "responsible_name": "example",
      "whatsapp_account_id": "example"
    },
    "status": "ok"
  }
}

Get current teammate

Get current teammate.

Inputs

None.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "created_at": "example",
      "display_name": "example",
      "email": "example",
      "invitation_status": "example",
      "role": "example",
      "status": "example",
      "team": "example",
      "user_id": 1,
      "whatsapp_accounts": [
        {}
      ]
    },
    "status": "ok"
  }
}

Get message

Get message.

Inputs

Message uidmessage_uidtextRequired
a UID of a message, that is unique for TimelinesAI workspace. Can be used to lookup a message or its sending status.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "attachment_filename": "example",
      "attachment_url": "example",
      "chat_id": 1,
      "from_me": true,
      "has_attachment": true,
      "message_type": "example",
      "origin": "example",
      "reactions": {},
      "received_timestamp": "example",
      "recipient_name": "example",
      "recipient_phone": "example",
      "sender_name": "example",
      "sender_phone": "example",
      "status": "example",
      "text": "example",
      "text_is_transcript": true,
      "timestamp": "example",
      "uid": "example"
    },
    "status": "ok"
  }
}

Get message status history

Get message status history.

Inputs

Message uidmessage_uidtextRequired
a UID of a message, that is unique for TimelinesAI workspace. Can be used to lookup a message or its sending status.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": [
      {
        "failure_reason": {},
        "status": "example",
        "timestamp": "example"
      }
    ],
    "status": "ok"
  }
}

Get workspace information

Get workspace information.

Inputs

None.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "ai_credits": {},
      "ai_credits_non_recurring": {},
      "api_calls_quota": {},
      "display_name": "example",
      "messaging_quota": {},
      "non_recurring_quota": {},
      "plan": "example",
      "seats": {},
      "workspace_id": "example"
    },
    "status": "ok"
  }
}

List calls

List calls.

Inputs

Chat IDchat_idnumber
filter calls in the specified chat (the chat id from `CallInfo`)
Whatsapp account IDwhatsapp_account_idtext
filters calls on one of the specified WhatsApp accounts (in wid format, comma-separated)
Directiondirectiontext
filter incoming or outgoing callsOne of: incoming, outgoing.
Started afterstarted_afterdate and time
filter calls that started after this timestamp, can be specified with started_before
Started beforestarted_beforedate and time
filter calls that started before this timestamp, can be specified with started_after
Recording statusrecording_statustext
filter calls by recording status (comma-separated values from `CallRecordingStatus`; `none` matches calls with no recording)
Transcript statustranscript_statustext
filter calls by transcript status (comma-separated values from `CallTranscriptStatus`; `none` matches calls with no transcript)
Pagepagenumber
specify the page of results (each page contains up to 50 items), starting with 1. Check "has more page" response value to see if more pages are available.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "calls": [
        {}
      ],
      "has_more_pages": true
    },
    "status": "ok"
  }
}

List chat labels

List chat labels.

Inputs

Chatchat_idnumberRequired
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._

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "labels": [
        "example"
      ]
    },
    "status": "ok"
  }
}

List chat messages

List chat messages.

Inputs

Chatchat_idnumberRequired
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._
From mefrom_metrue/false
specify true to filter messages sent from my WhatsApp account (from any session), false to filter messages received from other WhatsApp users.
Afterafterdate and time
can specify date or datetime in ISO format to filter out messages created AFTER the specified date (inclusive)
Beforebeforedate and time
can specify date or datetime in ISO format to filter out messages created BEFORE the specified date (inclusive)
After messageafter_messagetext
can specify message uid to filter out messages created after the specified message (excluding the specified message itself)
Before messagebefore_messagetext
can specify message uid to filter out messages created before the specified message (excluding the specified message itself)
Sorting ordersorting_ordertext
order messages by timestamp, according to possible values: asc, descOne of: asc, desc.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "has_more_pages": true,
      "messages": [
        {}
      ]
    },
    "status": "ok"
  }
}

List chats

List chats.

Inputs

Labellabeltext
filters chats having at least one of specified labels (comma-separated)
Whatsapp account IDwhatsapp_account_idtext
filters chats belonging to one of the specified WhatsApp accounts (in wid format, comma-separated)
Groupgrouptrue/false
filters chats that are either group chats (true) or direct chats (false)
Namenametext
filter chats that contain any of specified strings (case-insensitive, comma-separated). Note: a string containing a whitespace will be matched as exact substring without being split to words.
Phonephonetext
Filter direct (non-group) chats by a single phone number. Phone is sanitized in the same way as for sending messages. If sanitized value starts with '+', the match is exact. Otherwise, leading zeroes are removed and the number is matched as a substring of the stored phone. Group chats are always excluded when this parameter is used.
Readreadtrue/false
filter chats that are either read (true) or unread (false)
Closedclosedtrue/false
filter chats that are either closed (true) or open (false)
Pagepagenumber
specify the page of results (each page contains up to `page_size` items), starting with 1. Check \"has more page" response value to see if more pages are available.
Page sizepage_sizenumber
Number of items per page. Defaults to 50. Minimum 1. Maximum 100.From 1 to 100.
Created aftercreated_afterdate and time
filter chats that were created after this timestamp, can be specified with created_before
Created beforecreated_beforedate and time
filter chats that were created before this timestamp, can be specified with created_after
Last message afterlast_message_afterdate and time
filter chats whose most recent message (including internal notes) is at or after this timestamp, can be specified with last_message_before. Include the timezone offset; a value without one is read in the server timezone. Chats without messages are excluded when this parameter is set.
Last message beforelast_message_beforedate and time
filter chats whose most recent message (including internal notes) is at or before this timestamp, can be specified with last_message_after. Include the timezone offset; a value without one is read in the server timezone. Chats without messages are excluded when this parameter is set.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "chats": [
        {}
      ],
      "has_more_pages": true
    },
    "status": "ok"
  }
}

List files

List files.

Inputs

Filenamefilenametext
a filename or any part of it (for example, extension), case insensitive . Leave empty to get unfiltered list of all uploaded files.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": [
      {
        "filename": "example",
        "mimetype": "example",
        "size": 1,
        "uid": "example",
        "uploaded_at": "example",
        "uploaded_by_email": "example"
      }
    ],
    "status": "ok"
  }
}

List teammates

List teammates.

Inputs

None.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "teammates": [
        {}
      ],
      "teams": [
        {}
      ]
    },
    "status": "ok"
  }
}

List templates

List templates.

Inputs

None.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "templates": [
        {}
      ],
      "templates_count": 1
    },
    "status": "ok"
  }
}

List webhooks

List webhooks.

Inputs

None.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": [
      {
        "enabled": true,
        "errors_counter": 1,
        "event_type": "message:new",
        "id": 1,
        "url": "example"
      }
    ],
    "status": "ok"
  }
}

List WhatsApp accounts

List WhatsApp accounts.

Inputs

None.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "whatsapp_accounts": [
        {}
      ]
    },
    "status": "ok"
  }
}

List WhatsApp Business accounts

List WhatsApp Business accounts.

Inputs

None.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "waba_accounts": [
        {}
      ]
    },
    "status": "ok"
  }
}

List WhatsApp Business chats

List WhatsApp Business chats.

Inputs

Waba account IDwaba_account_idtext
filters WABA chats belonging to one of the specified WABA accounts (comma-separated internal account ids). For member-scoped tokens, the result is intersected with the member-visible chat set; an invisible account id contributes no chats except chats where the member is responsible.
Closedclosedtrue/false
filter chats that are either closed (true) or open (false)
Pagepagenumber
specify the page of results (each page contains up to `page_size` items), starting with 1. Check "has more page" response value to see if more pages are available.
Page sizepage_sizenumber
Number of items per page. Defaults to 50. Minimum 1. Maximum 100.From 1 to 100.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "chats": [
        {}
      ],
      "has_more_pages": true
    },
    "status": "ok"
  }
}

List WhatsApp Business templates

List WhatsApp Business templates.

Inputs

Pagepagenumber
specify the page of results (each page contains up to 50 items), starting with 1. Check "has more page" response value to see if more pages are available.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "has_more_pages": true,
      "templates": [
        {}
      ]
    },
    "status": "ok"
  }
}

Search messages

Search messages.

Inputs

TexttexttextRequired
words to search for. Any characters are accepted; punctuation such as `&`, `|`, `!`, quotes, `:` and `+` is not an error
Before messagebefore_messagetext
uid of the last message of the previous page, to get the next page (excluding the specified message itself). Omit it or leave it blank for the first page

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "has_more_pages": true,
      "messages": [
        {}
      ]
    },
    "status": "ok"
  }
}

Send message to chat

Send text to an existing WhatsApp chat.

Inputs

Chatchat_idnumberRequired
Choose a WhatsApp chat.
TexttexttextRequired
Enter the message text.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "message_uid": "example"
    },
    "status": "ok"
  }
}

Send WhatsApp message

Send text to a phone number using a connected WhatsApp account.

Inputs

PhonephonetextRequired
Use the recipient’s full international phone number.
TexttexttextRequired
Enter the message text.
Sender phonesender_phonetext
Use the sender’s international phone number if you have multiple WhatsApp accounts.

Outputs

dataobject
The response from TimelinesAI.
Example output
{
  "data": {
    "data": {
      "message_uid": "example"
    },
    "status": "ok"
  }
}

On this page