|
| 1 | +# Automation Steps |
| 2 | +## The automation step object |
| 3 | +``` |
| 4 | +# EXAMPLE OBJECT |
| 5 | +``` |
| 6 | + |
| 7 | +```json |
| 8 | +{ |
| 9 | + "data": [ |
| 10 | + { |
| 11 | + "id": "a-z0-9-abc1", |
| 12 | + "type": "automations_steps", |
| 13 | + "attributes": { |
| 14 | + "step_type": "email", |
| 15 | + "position": 0, |
| 16 | + "previous_step_id" : null, |
| 17 | + "created_at": "2024-01-31T12:00:00.000Z", |
| 18 | + "updated_at": "2024-01-31T12:00:00.000Z", |
| 19 | + "config": { |
| 20 | + "generate_with_ai": true, |
| 21 | + "message_personalization_settings": { |
| 22 | + "email_structure": "aida", |
| 23 | + "icebreaker_enabled": true, |
| 24 | + "subject_line_style": "intriguing" |
| 25 | + } |
| 26 | + } |
| 27 | + }, |
| 28 | + "relationships": { |
| 29 | + "automation": { |
| 30 | + "data": { |
| 31 | + "id": "1", |
| 32 | + "type": "automations" |
| 33 | + } |
| 34 | + } |
| 35 | + } |
| 36 | + } |
| 37 | + ] |
| 38 | +} |
| 39 | +``` |
| 40 | + |
| 41 | + |
| 42 | +### Object attributes |
| 43 | +Attribute | Description |
| 44 | +--------- | ----------- |
| 45 | +id | **integer** <br />A unique identifier for the automation step |
| 46 | +step_type | **string** <br />The type of step. Possible values depend on the automation type. |
| 47 | +position | **integer** <br />When the previous_step is not a `condition`, the position will always be 0. Otherwise, `0` is the left/yes branch of a condition, while `1` is the right/no branch |
| 48 | +previous_step_id | **string** <br />The unique identifier of the previous step. A `null` value will always be assigned to the first step of the automation |
| 49 | +created_at | **datetime** <br />ISO 8601 format with timezone offset |
| 50 | +updated_at | **datetime** <br />ISO 8601 format with timezone offset |
| 51 | +config | **object** <br />All specific attributes related to the _step_type_ |
| 52 | + |
| 53 | +### Relationships |
| 54 | +Object | Description |
| 55 | +--------- | ----------- |
| 56 | +automation | The parent [automation](#automations) |
| 57 | + |
| 58 | +## Retrieve a automation step |
| 59 | +```shell |
| 60 | +# DEFINITION |
| 61 | +GET https://api.overloop.ai/public/v1/automations/{AUTOMATION_ID}/steps/{STEP_ID} |
| 62 | + |
| 63 | +# EXAMPLE |
| 64 | +curl -X GET "https://api.overloop.ai/public/v1/automations/1/steps/1" \ |
| 65 | +-H "Authorization: your_api_key" \ |
| 66 | +-H "Content-Type: application/vnd.api+json; charset=utf-8" |
| 67 | +``` |
| 68 | + |
| 69 | +### Parameters |
| 70 | +Parameter | Description |
| 71 | +--------- | ----------- |
| 72 | +automation_id<br />**required** - *integer* | The ID of the automation |
| 73 | +id<br />**required** - *integer* | The ID of the automation step to retrieve |
| 74 | + |
| 75 | +### Returns |
| 76 | +Returns the [automation step object](#the-automation-step-object). |
| 77 | + |
| 78 | +## List automation steps |
| 79 | +```shell |
| 80 | +# DEFINITION |
| 81 | +GET https://api.overloop.ai/public/v1/automations/{AUTOMATION_ID}/steps |
| 82 | + |
| 83 | +# EXAMPLE |
| 84 | +curl -X GET "https://api.overloop.ai/public/v1/automations/1/steps" \ |
| 85 | +-H "Authorization: your_api_key" \ |
| 86 | +-H "Content-Type: application/vnd.api+json; charset=utf-8" |
| 87 | +``` |
| 88 | + |
| 89 | +> The above command returns JSON structured like this: |
| 90 | +
|
| 91 | +```json |
| 92 | +{ |
| 93 | + "data": [ |
| 94 | + { |
| 95 | + "id": "a-z0-9-abc1", |
| 96 | + "type": "automations_steps", |
| 97 | + "attributes": { |
| 98 | + ... |
| 99 | + }, |
| 100 | + "relationships": { |
| 101 | + "automation": { |
| 102 | + "data": { |
| 103 | + "id": "1", |
| 104 | + "type": "automations" |
| 105 | + } |
| 106 | + } |
| 107 | + } |
| 108 | + }, |
| 109 | + { |
| 110 | + "id": "a-z0-9-abc2", |
| 111 | + "type": "automations_steps", |
| 112 | + "attributes": { |
| 113 | + ... |
| 114 | + }, |
| 115 | + "relationships": { |
| 116 | + "automation": { |
| 117 | + "data": { |
| 118 | + "id": "1", |
| 119 | + "type": "automations" |
| 120 | + } |
| 121 | + } |
| 122 | + } |
| 123 | + }, |
| 124 | + { |
| 125 | + "id": "a-z0-9-abc3", |
| 126 | + "type": "automations_steps", |
| 127 | + "attributes": { |
| 128 | + ... |
| 129 | + }, |
| 130 | + "relationships": { |
| 131 | + "automation": { |
| 132 | + "data": { |
| 133 | + "id": "1", |
| 134 | + "type": "automations" |
| 135 | + } |
| 136 | + } |
| 137 | + } |
| 138 | + } |
| 139 | + ], |
| 140 | + "links": { |
| 141 | + "self": "https://api.overloop.ai/public/v1/automations/1/steps?page%5Bnumber%5D=1&page%5Bsize%5D=100", |
| 142 | + "next": "https://api.overloop.ai/public/v1/automations/1/steps?page%5Bnumber%5D=2&page%5Bsize%5D=100", |
| 143 | + "last": "https://api.overloop.ai/public/v1/automations/1/steps?page%5Bnumber%5D=5&page%5Bsize%5D=100" |
| 144 | + } |
| 145 | +} |
| 146 | +``` |
| 147 | + |
| 148 | +Returns a list of automation steps. |
| 149 | + |
| 150 | +This list is [paginated](#pagination) by 100 records and can also be [sorted](#sorting). |
0 commit comments