Skip to content

Commit 3ca9728

Browse files
committed
Revert ID name changes
1 parent 2544013 commit 3ca9728

19 files changed

Lines changed: 92 additions & 93 deletions

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Added support for new content endpoints:
1010
- `transactionalGroups->list()`, `transactionalGroups->create()`, `transactionalGroups->get()`, and `transactionalGroups->update()` for transactional groups.
1111
- `emailMessages->preview()` for sending test email previews.
1212
- Extended `campaigns->create()` and `campaigns->update()` with audience, group, and scheduling fields.
13-
- Renamed primary resource ID parameters to `id` (for example, `transactional->get(id: '...')` instead of `transactional_id:`).
1413

1514
## v3.0.0 - May 19, 2026
1615

README.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ Send a transactional email to a contact. [Learn about sending transactional emai
776776

777777
| Name | Type | Required | Notes |
778778
| -------------------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
779-
| `$id` | string | Yes | The ID of the transactional email to send. |
779+
| `$transactional_id` | string | Yes | The ID of the transactional email to send. |
780780
| `$email` | string | Yes | The email address of the recipient. |
781781
| `$add_to_audience` | boolean | No | If `true`, a contact will be created in your audience using the `$email` value (if a matching contact doesn’t already exist). |
782782
| `$data_variables` | array | No | An array containing data as defined by the data variables added to the transactional email template.<br />Values can be of type `string` or `number`. |
@@ -790,7 +790,7 @@ Send a transactional email to a contact. [Learn about sending transactional emai
790790

791791
```php
792792
$result = $loops->transactional->send(
793-
id: 'clfq6dinn000yl70fgwwyp82l',
793+
transactional_id: 'clfq6dinn000yl70fgwwyp82l',
794794
email: 'hello@gmail.com',
795795
data_variables: [
796796
'loginUrl' => 'https://myapp.com/login/',
@@ -799,7 +799,7 @@ $result = $loops->transactional->send(
799799

800800
# Example with Idempotency-Key header
801801
$result = $loops->transactional->send(
802-
id: 'clfq6dinn000yl70fgwwyp82l',
802+
transactional_id: 'clfq6dinn000yl70fgwwyp82l',
803803
email: 'hello@gmail.com',
804804
data_variables: [
805805
'loginUrl' => 'https://myapp.com/login/',
@@ -811,7 +811,7 @@ $result = $loops->transactional->send(
811811

812812
# Please contact us to enable attachments on your account.
813813
$result = $loops->transactional->send(
814-
id: 'clfq6dinn000yl70fgwwyp82l',
814+
transactional_id: 'clfq6dinn000yl70fgwwyp82l',
815815
email: 'hello@gmail.com',
816816
data_variables: [
817817
'loginUrl' => 'https://myapp.com/login/',
@@ -980,12 +980,12 @@ Get a single transactional email by ID.
980980

981981
| Name | Type | Required | Notes |
982982
| ------------------- | ------ | -------- | -------------------------------- |
983-
| `$id` | string | Yes | The ID of the transactional email. |
983+
| `$transactional_id` | string | Yes | The ID of the transactional email. |
984984

985985
#### Example
986986

987987
```php
988-
$result = $loops->transactional->get(id: 'clfq6dinn000yl70fgwwyp82l');
988+
$result = $loops->transactional->get(transactional_id: 'clfq6dinn000yl70fgwwyp82l');
989989
```
990990

991991
---
@@ -1000,14 +1000,14 @@ Update a transactional email's name.
10001000

10011001
| Name | Type | Required | Notes |
10021002
| ------------------- | ------ | -------- | -------------------------------- |
1003-
| `$id` | string | Yes | The ID of the transactional email. |
1003+
| `$transactional_id` | string | Yes | The ID of the transactional email. |
10041004
| `$name` | string | Yes | The updated name. |
10051005

10061006
#### Example
10071007

10081008
```php
10091009
$result = $loops->transactional->update(
1010-
id: 'clfq6dinn000yl70fgwwyp82l',
1010+
transactional_id: 'clfq6dinn000yl70fgwwyp82l',
10111011
name: 'Updated welcome email'
10121012
);
10131013
```
@@ -1024,12 +1024,12 @@ Ensure a transactional email has a draft email message. If a draft already exist
10241024

10251025
| Name | Type | Required | Notes |
10261026
| ------------------- | ------ | -------- | -------------------------------- |
1027-
| `$id` | string | Yes | The ID of the transactional email. |
1027+
| `$transactional_id` | string | Yes | The ID of the transactional email. |
10281028

10291029
#### Example
10301030

10311031
```php
1032-
$result = $loops->transactional->ensureDraft(id: 'clfq6dinn000yl70fgwwyp82l');
1032+
$result = $loops->transactional->ensureDraft(transactional_id: 'clfq6dinn000yl70fgwwyp82l');
10331033
```
10341034

10351035
---
@@ -1044,12 +1044,12 @@ Publish the transactional email's current draft email message.
10441044

10451045
| Name | Type | Required | Notes |
10461046
| ------------------- | ------ | -------- | -------------------------------- |
1047-
| `$id` | string | Yes | The ID of the transactional email. |
1047+
| `$transactional_id` | string | Yes | The ID of the transactional email. |
10481048

10491049
#### Example
10501050

10511051
```php
1052-
$result = $loops->transactional->publish(id: 'clfq6dinn000yl70fgwwyp82l');
1052+
$result = $loops->transactional->publish(transactional_id: 'clfq6dinn000yl70fgwwyp82l');
10531053
```
10541054

10551055
---
@@ -1142,12 +1142,12 @@ Get a single email theme by ID.
11421142

11431143
| Name | Type | Required | Notes |
11441144
| ----------- | ------ | -------- | ------------------ |
1145-
| `$id` | string | Yes | The ID of the theme. |
1145+
| `$theme_id` | string | Yes | The ID of the theme. |
11461146

11471147
#### Example
11481148

11491149
```php
1150-
$result = $loops->themes->get(id: 'clo5p8q0r0132ntx6flkunw89');
1150+
$result = $loops->themes->get(theme_id: 'clo5p8q0r0132ntx6flkunw89');
11511151
```
11521152

11531153
---
@@ -1183,12 +1183,12 @@ Get a single email component by ID.
11831183

11841184
| Name | Type | Required | Notes |
11851185
| --------------- | ------ | -------- | ----------------------- |
1186-
| `$id` | string | Yes | The ID of the component. |
1186+
| `$component_id` | string | Yes | The ID of the component. |
11871187

11881188
#### Example
11891189

11901190
```php
1191-
$result = $loops->components->get(id: 'clp6q9r1s0154ouy7gmlovx90');
1191+
$result = $loops->components->get(component_id: 'clp6q9r1s0154ouy7gmlovx90');
11921192
```
11931193

11941194
---
@@ -1270,12 +1270,12 @@ Get a single campaign by ID.
12701270

12711271
| Name | Type | Required | Notes |
12721272
| ----------------------- | ------ | -------- | --------------------- |
1273-
| `$id` | string | Yes | The ID of the campaign. |
1273+
| `$campaign_id` | string | Yes | The ID of the campaign. |
12741274

12751275
#### Example
12761276

12771277
```php
1278-
$result = $loops->campaigns->get(id: 'cln4o7p9q0110msw5ekjtmv78');
1278+
$result = $loops->campaigns->get(campaign_id: 'cln4o7p9q0110msw5ekjtmv78');
12791279
```
12801280

12811281
---
@@ -1290,7 +1290,7 @@ Update a draft campaign's name, group, audience, or scheduling.
12901290

12911291
| Name | Type | Required | Notes |
12921292
| ----------------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------- |
1293-
| `$id` | string | Yes | The ID of the campaign. |
1293+
| `$campaign_id` | string | Yes | The ID of the campaign. |
12941294
| `$name` | string | No | The updated name. |
12951295
| `$campaign_group_id` | string | No | The ID of the group to move this campaign to. |
12961296
| `$mailing_list_id` | string | No | The ID of the mailing list to send to. |
@@ -1304,7 +1304,7 @@ At least one field must be provided.
13041304

13051305
```php
13061306
$result = $loops->campaigns->update(
1307-
id: 'cln4o7p9q0110msw5ekjtmv78',
1307+
campaign_id: 'cln4o7p9q0110msw5ekjtmv78',
13081308
name: 'Updated name'
13091309
);
13101310
```
@@ -1363,12 +1363,12 @@ Get a campaign group by ID.
13631363

13641364
| Name | Type | Required | Notes |
13651365
| ----- | ------ | -------- | ---------------------------- |
1366-
| `$id` | string | Yes | The ID of the campaign group. |
1366+
| `$campaign_group_id` | string | Yes | The ID of the campaign group. |
13671367

13681368
#### Example
13691369

13701370
```php
1371-
$result = $loops->campaignGroups->get(id: 'clq7r0s2t0176pvz8hnmpwy01');
1371+
$result = $loops->campaignGroups->get(campaign_group_id: 'clq7r0s2t0176pvz8hnmpwy01');
13721372
```
13731373

13741374
---
@@ -1383,7 +1383,7 @@ Update a campaign group's name or description.
13831383

13841384
| Name | Type | Required | Notes |
13851385
| --------------- | ------ | -------- | --------------------------------------- |
1386-
| `$id` | string | Yes | The ID of the campaign group. |
1386+
| `$campaign_group_id` | string | Yes | The ID of the campaign group. |
13871387
| `$name` | string | No | Cannot be the reserved name "Unsorted". |
13881388
| `$description` | string | No | |
13891389

@@ -1393,7 +1393,7 @@ At least one field must be provided.
13931393

13941394
```php
13951395
$result = $loops->campaignGroups->update(
1396-
id: 'clq7r0s2t0176pvz8hnmpwy01',
1396+
campaign_group_id: 'clq7r0s2t0176pvz8hnmpwy01',
13971397
name: 'Updated name'
13981398
);
13991399
```
@@ -1431,12 +1431,12 @@ Get an audience segment by ID.
14311431

14321432
| Name | Type | Required | Notes |
14331433
| ----- | ------ | -------- | ------------------------------- |
1434-
| `$id` | string | Yes | The ID of the audience segment. |
1434+
| `$audience_segment_id` | string | Yes | The ID of the audience segment. |
14351435

14361436
#### Example
14371437

14381438
```php
1439-
$result = $loops->audienceSegments->get(id: 'clr8s1t3u0198qw09iotqzx12');
1439+
$result = $loops->audienceSegments->get(audience_segment_id: 'clr8s1t3u0198qw09iotqzx12');
14401440
```
14411441

14421442
---
@@ -1472,12 +1472,12 @@ Get a simplified workflow graph.
14721472

14731473
| Name | Type | Required | Notes |
14741474
| ----- | ------ | -------- | ---------------------- |
1475-
| `$id` | string | Yes | The ID of the workflow. |
1475+
| `$workflow_id` | string | Yes | The ID of the workflow. |
14761476

14771477
#### Example
14781478

14791479
```php
1480-
$result = $loops->workflows->get(id: 'cls9t2u4v0210rx20jpuary23');
1480+
$result = $loops->workflows->get(workflow_id: 'cls9t2u4v0210rx20jpuary23');
14811481
```
14821482

14831483
---
@@ -1516,12 +1516,12 @@ Get an email message, including its compiled LMX content.
15161516

15171517
| Name | Type | Required | Notes |
15181518
| --------- | ------ | -------- | --------------------------- |
1519-
| `$id` | string | Yes | The ID of the email message. |
1519+
| `$email_message_id` | string | Yes | The ID of the email message. |
15201520

15211521
#### Example
15221522

15231523
```php
1524-
$result = $loops->emailMessages->get(id: 'cly8k3m0n0044jpx2bghepq45');
1524+
$result = $loops->emailMessages->get(email_message_id: 'cly8k3m0n0044jpx2bghepq45');
15251525
```
15261526

15271527
---
@@ -1536,14 +1536,14 @@ Update an email message's subject, preview text, sender, or LMX content.
15361536

15371537
| Name | Type | Required | Notes |
15381538
| --------- | ----- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1539-
| `$id` | string | Yes | The ID of the email message. |
1539+
| `$email_message_id` | string | Yes | The ID of the email message. |
15401540
| `$fields` | array | No | Fields to update. Use API field names: `expectedRevisionId`, `subject`, `previewText`, `fromName`, `fromEmail`, `replyToEmail`, `lmx`. Supply `expectedRevisionId` matching the current `contentRevisionId` to avoid 409 conflicts. |
15411541

15421542
#### Example
15431543

15441544
```php
15451545
$result = $loops->emailMessages->update(
1546-
id: 'cly8k3m0n0044jpx2bghepq45',
1546+
email_message_id: 'cly8k3m0n0044jpx2bghepq45',
15471547
fields: [
15481548
'expectedRevisionId' => 'clm9n4o6p0088lrz4dijslt67',
15491549
'subject' => 'Updated subject',
@@ -1564,7 +1564,7 @@ Send a test preview of an email message to one or more addresses.
15641564

15651565
| Name | Type | Required | Notes |
15661566
| ---------------------- | -------- | -------- | --------------------------------------------------------------------------------- |
1567-
| `$id` | string | Yes | The ID of the email message. |
1567+
| `$email_message_id` | string | Yes | The ID of the email message. |
15681568
| `$emails` | array | Yes | One or more addresses to send the preview to. |
15691569
| `$contact_properties` | array | No | Contact property values to render. Accepted for campaign and workflow previews. |
15701570
| `$event_properties` | array | No | Event property values to render. Accepted for workflow previews only. |
@@ -1574,7 +1574,7 @@ Send a test preview of an email message to one or more addresses.
15741574

15751575
```php
15761576
$result = $loops->emailMessages->preview(
1577-
id: 'cly8k3m0n0044jpx2bghepq45',
1577+
email_message_id: 'cly8k3m0n0044jpx2bghepq45',
15781578
emails: ['test@example.com'],
15791579
contact_properties: ['firstName' => 'Alex']
15801580
);
@@ -1634,12 +1634,12 @@ Get a transactional group by ID.
16341634

16351635
| Name | Type | Required | Notes |
16361636
| ----- | ------ | -------- | --------------------------------- |
1637-
| `$id` | string | Yes | The ID of the transactional group. |
1637+
| `$transactional_group_id` | string | Yes | The ID of the transactional group. |
16381638

16391639
#### Example
16401640

16411641
```php
1642-
$result = $loops->transactionalGroups->get(id: 'clv2w3x4y0288xbb0kqrsuv67');
1642+
$result = $loops->transactionalGroups->get(transactional_group_id: 'clv2w3x4y0288xbb0kqrsuv67');
16431643
```
16441644

16451645
---
@@ -1654,7 +1654,7 @@ Update a transactional group's name or description.
16541654

16551655
| Name | Type | Required | Notes |
16561656
| --------------- | ------ | -------- | --------------------------------------- |
1657-
| `$id` | string | Yes | The ID of the transactional group. |
1657+
| `$transactional_group_id` | string | Yes | The ID of the transactional group. |
16581658
| `$name` | string | No | Cannot be the reserved name "Unsorted". |
16591659
| `$description` | string | No | |
16601660

@@ -1664,7 +1664,7 @@ At least one field must be provided.
16641664

16651665
```php
16661666
$result = $loops->transactionalGroups->update(
1667-
id: 'clv2w3x4y0288xbb0kqrsuv67',
1667+
transactional_group_id: 'clv2w3x4y0288xbb0kqrsuv67',
16681668
name: 'Updated name'
16691669
);
16701670
```

src/AudienceSegments.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function list(?int $per_page = null, ?string $cursor = null): mixed
2828
]);
2929
}
3030

31-
public function get(string $id): mixed
31+
public function get(string $audience_segment_id): mixed
3232
{
33-
return $this->client->query(method: 'GET', endpoint: 'v1/audience-segments/' . $id);
33+
return $this->client->query(method: 'GET', endpoint: 'v1/audience-segments/' . $audience_segment_id);
3434
}
3535
}

src/CampaignGroups.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public function create(string $name, ?string $description = null): mixed
4040
]);
4141
}
4242

43-
public function get(string $id): mixed
43+
public function get(string $campaign_group_id): mixed
4444
{
45-
return $this->client->query(method: 'GET', endpoint: 'v1/campaign-groups/' . $id);
45+
return $this->client->query(method: 'GET', endpoint: 'v1/campaign-groups/' . $campaign_group_id);
4646
}
4747

48-
public function update(string $id, ?string $name = null, ?string $description = null): mixed
48+
public function update(string $campaign_group_id, ?string $name = null, ?string $description = null): mixed
4949
{
5050
$payload = [];
5151
if ($name !== null) {
@@ -55,7 +55,7 @@ public function update(string $id, ?string $name = null, ?string $description =
5555
$payload['description'] = $description;
5656
}
5757

58-
return $this->client->query(method: 'POST', endpoint: 'v1/campaign-groups/' . $id, options: [
58+
return $this->client->query(method: 'POST', endpoint: 'v1/campaign-groups/' . $campaign_group_id, options: [
5959
'json' => $payload
6060
]);
6161
}

src/Campaigns.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ public function create(
5858
]);
5959
}
6060

61-
public function get(string $id): mixed
61+
public function get(string $campaign_id): mixed
6262
{
63-
return $this->client->query(method: 'GET', endpoint: 'v1/campaigns/' . $id);
63+
return $this->client->query(method: 'GET', endpoint: 'v1/campaigns/' . $campaign_id);
6464
}
6565

6666
public function update(
67-
string $id,
67+
string $campaign_id,
6868
?string $name = null,
6969
?string $campaign_group_id = null,
7070
?string $mailing_list_id = null,
@@ -92,7 +92,7 @@ public function update(
9292
$payload['scheduling'] = $scheduling;
9393
}
9494

95-
return $this->client->query(method: 'POST', endpoint: 'v1/campaigns/' . $id, options: [
95+
return $this->client->query(method: 'POST', endpoint: 'v1/campaigns/' . $campaign_id, options: [
9696
'json' => $payload
9797
]);
9898
}

src/Components.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function list(?int $per_page = null, ?string $cursor = null): mixed
2828
]);
2929
}
3030

31-
public function get(string $id): mixed
31+
public function get(string $component_id): mixed
3232
{
33-
return $this->client->query(method: 'GET', endpoint: 'v1/components/' . $id);
33+
return $this->client->query(method: 'GET', endpoint: 'v1/components/' . $component_id);
3434
}
3535
}

0 commit comments

Comments
 (0)