Actions

Create an action

Create an action. Story or group ID must be provided. Defaults to a draft called test if change control is enabled on the story and no draft_id is provided.

post/api/v1/agents

Request

  • Base URL: https://your-tenant.tines.com
  • URL: https://your-tenant.tines.com/api/v1/agents
  • Auth: one of:
    • API key in header X-User-Token
    • HTTP bearer

Request body

type'Agents::EmailAgent' | 'Agents::EventTransformationAgent' | 'Agents::HTTPRequestAgent' | 'Agents::IMAPAgent' | 'Agents::LLMAgent' | 'Agents::TriggerAgent' | 'Agents::WebhookAgent' | 'Agents::SendToStoryAgent' | 'Agents::GroupAgent' | 'Agents::RunScriptAgent' required

Type of action to create

namestring required

Name of the action

optionsobject

JSON options block of the action

positionobject

An object describing the XY coordinates of the action on the story diagram

story_idinteger

ID of story to which the action should be added

group_idinteger

ID of group to which the action should be added

descriptionstring

A user-defined description of the action

disabledboolean

Whether the action is disabled. Defaults to false.

source_idsinteger[]

Array of action IDs the action should receive emitted events from

links_to_sourcesobject[]

Array of objects representing links to source actions. Mutually exclusive with source_ids. Each object has source_id (required) and type (optional; DEFAULT, NO_MATCH, or FAILURE).

receiver_idsinteger[]

Array of action IDs the action should emit events to

links_to_receiversobject[]

Array of objects representing links to receiver actions. Mutually exclusive with receiver_ids. Each object has receiver_id (required) and type (optional; DEFAULT, NO_MATCH, or FAILURE).

scheduleobject

An object defining the cron schedule for the action

monitor_failuresboolean

Whether a notification should be sent when this action fails

monitor_all_eventsboolean

Whether all events should be monitored

monitor_no_events_emittedinteger

Duration in seconds. If no events are emitted in this time, a notification will be sent.

draft_idinteger

ID of the draft to which the action should be added

Response

Successful response

idinteger

Action ID

typestring

Action type

user_idinteger

User ID of the action's owner

optionsobject

JSON options block of the action

namestring

Name of the action

descriptionstring nullable

User-defined description of the action

scheduleobject[] nullable

Cron schedule for the action

blended_events_countinteger

Number of events the action has emitted in both TEST and LIVE mode

logs_countinteger

Number of logs the action has stored

last_check_atstring nullable

ISO 8601 timestamp of the action's last scheduled run

last_receive_atstring nullable

ISO 8601 timestamp of the last event received

created_atstring

ISO 8601 timestamp of when the action was created

updated_atstring

ISO 8601 timestamp of when the action was last updated

last_event_atstring nullable

ISO 8601 timestamp of the last event received, updated at one-minute intervals

last_error_log_atstring nullable

ISO 8601 timestamp of the last error thrown by the action

disabledboolean

Whether the action is disabled

guidstring

Unique identifier of the action

group_idinteger nullable

ID of the group to which the action belongs

positionobject

XY coordinates of the action on the story diagram

story_idinteger

ID of the story to which the action belongs

story_modestring

Mode of the story to which the action belongs (LIVE or TEST)

nested_group_idinteger nullable

ID of the group contained in the action

team_idinteger

ID of the team to which the action belongs

sourcesinteger[]

IDs of actions this action receives emitted events from

receiversinteger[]

IDs of actions this action emits events to

monitor_failuresboolean

Whether a notification should be sent when this action fails

monitor_all_eventsboolean

Whether all events should be monitored

monitor_no_events_emittedinteger nullable

Duration in seconds; if no events are emitted in this time, a notification is sent

time_saved_unitstring nullable

Unit of time corresponding to the time saved value

time_saved_valueinteger nullable

Amount of time saved

pageobject nullable

Associated page, if this is a page action

action_memory_contentsobject

Values the action may be holding in its memory

slugstring

Underscored representation of the action's name

links_to_sourcesobject[]

Links to source actions, including the source ID and link type

links_to_receiversobject[]

Links to receiver actions, including the receiver ID and link type

story_run_save_settingobject nullable

Story run save settings for this action; only present for Receive Email and Webhook agents

Changes

No recorded changes to this operation across all 1 revision of this API.