Przejdź do głównej treści
POST
/
api
/
v1
/
automations
Utwórz automatyzację
curl --request POST \
  --url https://api.railmail.app/api/v1/automations \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "triggerTopicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "automationKey": "<string>",
  "name": "<string>",
  "description": "<string>",
  "status": "<string>",
  "triggerType": "<string>",
  "triggerTopicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "triggerTopicName": "<string>",
  "nodeCount": 123,
  "totalEntered": 123,
  "totalCompleted": 123,
  "currentlyActive": 123,
  "nodes": "<string>",
  "edges": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Autoryzacje

X-API-Key
string
header
wymagane

Project-scoped API key, format rm_(live|test)_... . May also be sent as Authorization: Bearer rm_....

Treść

application/json
name
string
wymagane
Maximum string length: 200
description
string | null
triggerType
enum<string> | null
Dostępne opcje:
subscriber_joins_list,
segment_entered,
segment_left,
custom_event,
manual
triggerTopicId
string<uuid> | null

Odpowiedź

Automatyzacja utworzona

id
string<uuid>
automationKey
string | null
name
string
description
string | null
status
string
triggerType
string | null
triggerTopicId
string<uuid> | null
triggerTopicName
string | null
nodeCount
integer | null
totalEntered
integer | null
totalCompleted
integer | null
currentlyActive
integer | null
nodes
string | null
edges
string | null
createdAt
string<date-time>
updatedAt
string<date-time>