twilio-ruby 7.12.0 → 7.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +6 -6
  3. data/CHANGES.md +319 -0
  4. data/Gemfile.lock +2 -2
  5. data/README.md +2 -2
  6. data/examples/WebhookSignatureValidation.md +61 -0
  7. data/lib/rack/twilio_webhook_authentication.rb +30 -5
  8. data/lib/twilio-ruby/rest/accounts/v1/compliance_signals_check.rb +254 -0
  9. data/lib/twilio-ruby/rest/accounts/v1.rb +6 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +7 -0
  11. data/lib/twilio-ruby/rest/client.rb +5 -0
  12. data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +108 -1
  13. data/lib/twilio-ruby/rest/content/v1/content.rb +8 -2
  14. data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +7 -0
  15. data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +194 -7
  16. data/lib/twilio-ruby/rest/memory/v1/bulk.rb +22 -1
  17. data/lib/twilio-ruby/rest/memory/v1/import.rb +21 -7
  18. data/lib/twilio-ruby/rest/memory/v1/store.rb +7 -0
  19. data/lib/twilio-ruby/rest/memory/v1/trait.rb +7 -0
  20. data/lib/twilio-ruby/rest/messaging/v3/message_cost_estimate.rb +204 -0
  21. data/lib/twilio-ruby/rest/messaging/v3.rb +6 -0
  22. data/lib/twilio-ruby/rest/numbers_base.rb +0 -5
  23. data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +5 -5
  24. data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +4 -4
  25. data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +28 -0
  26. data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +28 -0
  27. data/lib/twilio-ruby/rest/trusthub/v1.rb +2 -2
  28. data/lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb +825 -0
  29. data/lib/twilio-ruby/rest/webhooks/v1/edge_zone.rb +320 -0
  30. data/lib/twilio-ruby/rest/webhooks/v1/operation.rb +513 -0
  31. data/lib/twilio-ruby/rest/webhooks/v1/rule.rb +818 -0
  32. data/lib/twilio-ruby/rest/webhooks/v1/setting.rb +1028 -0
  33. data/lib/twilio-ruby/rest/webhooks/v1/shared_key.rb +722 -0
  34. data/lib/twilio-ruby/rest/webhooks/v1/test.rb +228 -0
  35. data/lib/twilio-ruby/rest/webhooks/v1.rb +126 -0
  36. data/lib/twilio-ruby/rest/webhooks.rb +6 -0
  37. data/lib/twilio-ruby/rest/webhooks_base.rb +38 -0
  38. data/lib/twilio-ruby/security/request_validator.rb +54 -8
  39. data/lib/twilio-ruby/twiml/voice_response.rb +89 -20
  40. data/lib/twilio-ruby/version.rb +1 -1
  41. metadata +15 -5
  42. data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +0 -425
  43. data/lib/twilio-ruby/rest/numbers/v3.rb +0 -40
  44. data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -200
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de45c2f4e640d77d1ef3ce66c59c270c8c76a7bf60802a5168c0431f72ab3eb1
4
- data.tar.gz: 319065808ccb2132bc019d456490657bd25a07adcfa783f1b0815ea01b9e512e
3
+ metadata.gz: b756a2ce3eb05ea5ff68d598b72b5802a408986b5b0b8c9fb415afee7d82102a
4
+ data.tar.gz: 3df64b81420fd350109dc9d28c5e89e6880986e4c3e57f5b1cd695730084d828
5
5
  SHA512:
6
- metadata.gz: f4eca7472b55d315dcf30b819e04754760fb49250151fb72912db9199502325b910b544464a788277c4aa0974c49872fdba45c6f0af96e52396341d0ce1356c2
7
- data.tar.gz: 5c7a1776e780a85d5ecfd9b2b928122baad0cd7ba3ee100cec889ba84a49b68970b38be01f1f72aa491f5fd36e7224cd9e792b5e64986d6eeb09bfe9c04f738a
6
+ metadata.gz: 43a1153dd5cc39d7d74203eff4d1def51b6669f5195ebd6d1879fe1e798bd8dc6eb5f8a36c3df9944e43e84ee415781fe8778fe69fbda8a534c0498a5e64e826
7
+ data.tar.gz: 36cefab1f1b545246df5d0a7e7486f2b7213afc7e148000743278c18ffb5d014e3c4c561cc6fd2d7a3693485b8dd0cbeb02efb2c4e06ae0f1cd981d399d17ba3
@@ -1,13 +1,13 @@
1
1
  name: Test and Deploy
2
2
  on:
3
3
  push:
4
- branches: [ '*' ]
4
+ branches: [ main ]
5
5
  tags: [ '*' ]
6
- pull_request:
7
- branches: [ main ]
8
- schedule:
9
- # Run automatically at 8AM PST Monday-Friday
10
- - cron: '0 15 * * 1-5'
6
+ pull_request:
7
+ branches: [ '*' ]
8
+ schedule:
9
+ # Run automatically at 8AM PST Monday-Friday
10
+ - cron: '0 15 * * 1-5'
11
11
  workflow_dispatch:
12
12
 
13
13
  env:
data/CHANGES.md CHANGED
@@ -1,5 +1,324 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
+ [2026-11-18] Version 7.13.1
4
+ ---------------------------
5
+ **Twiml**
6
+ - Add `conversation_id` and `conversation_configuration` attributes to `<ConversationRelay>` and `<Transcription>` nouns
7
+ - Add support for `<MediaFilter>` noun under `<Start>` and `<Stop>` verbs
8
+
9
+ **Accounts**
10
+ - Enable the Compliance Signals Check API in prod.
11
+ - Add Compliance Signals Check API
12
+
13
+ **Audiences**
14
+ - ## 2026-11-04
15
+ - **Content updates**:
16
+ - Updated description for `AdminListOperations`
17
+ - Updated description for `AdminListCohorts`
18
+ - Updated description for `AdminListCohortSnapshots`
19
+ - Updated description for `AdminFetchCohortOperation`
20
+ - Updated description for `AdminListSnapshotOperations`
21
+ - Updated description for `AdminListCohortOperations`
22
+ - Updated schema description for `OperationStatus`
23
+ - Added properties to `Cohort`: cohortId
24
+ - Updated schema description for `CohortOperationResult`
25
+ - Updated schema description for `CohortOperation`
26
+ - ## 2026-11-04
27
+ - **Content updates**:
28
+ - Updated description for `ListCohorts`
29
+ - Updated description for `UpdateCohort`
30
+ - Updated description for `DeleteCohort`
31
+ - Updated description for `ListCohortSnapshots`
32
+ - Updated description for `CreateCohortSnapshot`
33
+ - Updated description for `DeleteCohortSnapshot`
34
+ - Updated description for `FetchCohortOperation`
35
+ - Updated schema description for `OperationStatus`
36
+ - Added properties to `Cohort`: cohortId
37
+ - Updated schema description for `CohortOperationResult`
38
+ - ...and 1 more changes
39
+
40
+ **Destinations**
41
+ - ## 2026-11-10
42
+ - **Content updates**:
43
+ - Updated description for `TriggerReplay`
44
+ - Updated description for `FetchReplayStatus`
45
+ - ## 2026-11-10
46
+ - Minor updates (formatting, metadata)
47
+
48
+ **Iam**
49
+ - Added the optional clientSid query parameter to GET /v1/Account/AuthorizedApps/list: keeps only the items of one application or agent by the item's client_sid (for an MCP or CLI connection, the agent's registration_sid), an exact match like the one GET /v1/Organization/AuthorizedApps already has. A value that is not an OAuth app SID is a bad request
50
+ - Added the optional app_permissions and allowed_permissions to the response of GET /v1/Organization/AuthorizedApps/{consentSid}, for an OAuth application: what the application is configured for and what the organization allowed it, as the account detail already has. The response is the new iam.v1.organization-consent-detail, iam.v1.consent plus those two fields, so the lists are unchanged. Both are empty arrays for an MCP or CLI connection, whose grant is in sections. Added offered to each of the sections of an MCP or CLI connection: what consent would offer the context now (the pool narrowed by the organization's agent permissions and by what the user who consented holds), worked out when the detail is fetched, so the detail page can show the full set and tick what the mode, read and write grant. It is nullable: empty on a list and when the detail could not read it, null when the service that answered does not return it yet, so the spec can be deployed before the services. GET /v1/Account/AuthorizedApps/{consentSid} returns it too, on the sections of an MCP or CLI connection (iam.v1.account-consent-detail), so any admin of the account sees it, including permissions the consenting user held but did not select
51
+ - Added the CIMD category type (MCP or CLI) to the POST /v1/Organization/AgentsRegistration request, where the Twilio CLI's URL may be registered as CLI only and any other URL as MCP only, and a type left out is taken from the URL and cimd_category to its response, a type query parameter to GET and a type to the PUT /v1/Organization/AgentsRegistration/Permissions request, whose organization and user parts are null for CLI, and CLI to the GET /v1/Account/AuthorizedApps type
52
+
53
+ **Instrumentation**
54
+ - ## 2026-11-10
55
+ - Synced with the instrumentation Control Plane spec (dev-us1, stage-us1):
56
+ - Replaced `/v1/ControlPlane/EventProducers/{producerId}/EventSchemas` (AdminListEventProducerSchemaAttachments) with `/v1/ControlPlane/EventProducers/{producerId}/EventSchemaAttachments` (AdminListEventSchemaAttachments); items carry `attachmentId` and `eventName`, the list key is `eventSchemaAttachments`
57
+ - Event schemas: `definition { type, eventName, eventProperties }` and typed `eventIdentifiers` replace `name`, `type`, `identifiers` and `properties`; no `deletedAt`
58
+ - Event producers: removed Memory Store `storeIds` and `NO_STORE` readiness
59
+ - `EventSchemaProperty.key` has `minLength: 1`
60
+ - Updated descriptions and transaction tests
61
+ - ## 2026-11-10
62
+ - **Control Plane synced with the events-domain spec after the API review** (`dev-us1`):
63
+ - Schema attachments are their own sub-resource with an `attachmentId`:
64
+ - Replaced `/v1/ControlPlane/EventProducers/{producerId}/EventSchemas` (AttachEventProducerSchemaVersion, ListEventProducerSchemaAttachments) with `/v1/ControlPlane/EventProducers/{producerId}/EventSchemaAttachments` (CreateEventSchemaAttachment, ListEventSchemaAttachments); the list key is `eventSchemaAttachments`
65
+ - Replaced `DELETE /v1/ControlPlane/EventProducers/{producerId}/EventSchemas/{schemaId}/Versions/{version}` (DetachEventProducerSchemaVersion) with `DELETE /v1/ControlPlane/EventProducers/{producerId}/EventSchemaAttachments/{attachmentId}` (DeleteEventSchemaAttachment); an unknown or already-detached id is `404` `550118`
66
+ - Event schemas: the type and its fields move into `definition { type, eventName, eventProperties }` in create and in responses; PatchEventSchema sends any of `description`, `eventIdentifiers` and `definition { eventProperties }`
67
+ - Removed DeleteEventSchema and `deletedAt`; schemas and versions aren't deleted
68
+ - `550106` is returned only by DeleteEventProducer
69
+ - PatchEventSchema: `definition` needs `eventProperties` (`minProperties: 1`); new `400` examples. CreateEventSchema: `eventProperties` on an auto capture schema returns the same `400` message as PatchEventSchema
70
+ - `EventSchemaProperty.key` has `minLength: 1`
71
+ - Replaced the `CustomEventSchemaCreate`, `AutoCaptureEventSchemaCreate`, `CustomEventSchemaUpdate`, `AutoCaptureEventSchemaUpdate` and `EventProducerSchemaAttach*` components with `EventSchemaDefinition`, `CustomEventSchemaDefinition`, `AutoCaptureEventSchemaDefinition`, `EventSchemaUpdateDefinition`, `EventSchemaDefinitionView` and `EventSchemaAttachment*`
72
+ - Updated descriptions, examples and transaction tests
73
+ - ## 2026-11-06
74
+ - **Event ingestion moves to the BehavioralEvents request shape** (`dev-us1`), matching the deployed events-api:
75
+ - Replaced `POST /v1/EventSources/{sourceId}/Batch` (IngestEventBatch) with `POST /v1/EventProducers/{producerId}/BehavioralEvents` (CreateBehavioralEvents); the old path is no longer served
76
+ - The body is `events` (1 to 8 `BehavioralEvent`s, each with `eventId`, `sessionId`, `anonymousId`, `index`, `occurredAt`, `schemaName`, optional `schemaVersion`, `identifiers` and `properties`) instead of `batch`
77
+ - Added the optional `Content-Encoding: gzip` header, the `403` disabled-producer response (`550052`) and the write-key `401` codes (`20401`, `550050`)
78
+ - Removed the now-unused `Event`, `DeviceContext`, `SessionContext`, `InstrumentationContext`, `EventBatchRequest`, `EventBatchResponse` and `EventBatchSuccess` components
79
+ - **Control Plane synced with the events-domain spec** (`dev-us1`):
80
+ - Removed `/v1/ControlPlane/Operations/{operationId}` (FetchControlPlaneOperationStatus, with its `Retry-After` header) and DeleteEventSchemaVersion; every Control Plane operation is synchronous
81
+ - Removed Memory Store: `storeIds` on event producers and `NO_STORE` readiness; readiness is `NO_SCHEMA` or `READY`
82
+ - Event schemas: `name`, `identifiers` and `properties` renamed to `eventName`, `eventIdentifiers` and `eventProperties`; identifiers are `{ key, dataType }` (`STRING` or `NUMBER`), 1 to 5, and are not repeated in `eventProperties`
83
+ - Schema attachments: `schemaName` renamed to `eventName`
84
+ - DeleteEventProducer `409` is `550106` (schema version attached), replacing `550107` (Memory Store attached); DeleteEventSchema no longer returns `550103`; PatchEventSchema `409` adds `550111` for the version limit
85
+ - Updated descriptions, examples and transaction tests
86
+
87
+ **Knowledge**
88
+ - ## 2026-11-05
89
+ - **Added 3 new path(s)**:
90
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/FailedRecords` (AdminListKnowledgeMigrationFailedRecords)
91
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/Retries` (AdminCreateKnowledgeMigrationRetry)
92
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/Retries/{retryId}` (AdminFetchKnowledgeMigrationRetry)
93
+
94
+ **Memory**
95
+ - ## 2026-11-09
96
+ - Added `PatchProfileTraits` (`PATCH /v1/Stores/{storeId}/Profiles/{profileId}/Traits`) to create or
97
+ - update up to 100 traits on a profile in one request, optionally recording where each value came from
98
+ - (`source`) and when it was observed (`occurredAt`). Setting a value to `null` removes the trait. The
99
+ - endpoint is hidden from the helper libraries and gated behind the `api.memory.2026Q3` beta feature.
100
+ - `ListProfileTraits` now returns `source` on each trait (behind the `api.memory.2026Q3` beta feature), when one was set.
101
+ - Additive and backwards compatible: existing request and response fields are unchanged.
102
+ - ## 2026-11-06
103
+ - Documented the `409` response on `CreateProfile`, returned when an identifier belongs to a profile
104
+ - that is pending deletion. The `Conflict` response now includes a `Retry-After` header with the
105
+ - number of seconds to wait before retrying.
106
+
107
+ **Routes**
108
+ - Add `GET`/`POST` `/v3/RcsAgents/{agentId}` to assign and fetch the Inbound Processing Region for RCS agents
109
+ - Set SDK and docs visibility of `GET`/`POST` `/v3/RcsAgents/{agentId}` to `private`, maturity to `preview`
110
+
111
+ **Segment**
112
+ - ## 2026-11-17
113
+ - Add Warehouse Tool routes under `/v1/Segment/WarehouseTool` (read, run/replay/backfill, feature and schema updates, stop task, SQL sessions)
114
+ - ## 2026-11-11
115
+ - Add Cob routes: `DELETE /v1/Segment/Cob/Records/{Family}/{Name}`, `POST /v1/Segment/Cob/Records`, `POST /v1/Segment/Cob/Records/{Family}/{Name}/Clone`
116
+
117
+ **Trusthub**
118
+ - Document the 409 (error code 60736) returned by DELETE /v1/CustomerProfiles/{CustomerProfileSid}/ChannelEndpointAssignments/{Sid} and DELETE /v1/TrustProducts/{TrustProductSid}/ChannelEndpointAssignments/{Sid} when a Branded Calling trust product still depends on the phone number.
119
+
120
+
121
+ [2026-11-05] Version 7.13.0
122
+ ---------------------------
123
+ **Library - Chore**
124
+ - [PR #820](https://github.com/twilio/twilio-ruby/pull/820): support HMAC-SHA256 webhook signatures in RequestValidator. Thanks to [@sbansla](https://github.com/sbansla)!
125
+
126
+ **Twiml**
127
+ - Add ElevenLabs voices to `<Say>` verb.
128
+ - Add `partialPromptOnHangup`, `eagerEotThreshold`, `asrSmartFormat`, `ttsTextNormalization`, `ttsLanguageTextNormalization`, `elevenlabsLanguageTextNormalization`, `includeInPrompt`, `customerName`, `applicationReconnect`, `echoPromptFiltering`, `turnDetection` attributes to `<ConversationRelay>`, and `hints`, `asrSmartFormat`, `ttsTextNormalization`, `ttsLanguageTextNormalization` attributes to `<Language>`
129
+
130
+ **Api**
131
+ - # API Changes
132
+ - ## 2026-09-22
133
+ - Simplified the `criteria` field description.
134
+ - ## 2026-09-18
135
+ - Moved `readOnly` on the snapshot count fields (`profileCount`, `partitionCount`) from the shared schema to the response usage sites, so the counts stay read-only in responses (no change for API consumers).
136
+ - ## 2026-09-17
137
+ - Renamed 3 `Get*` operations to `Fetch*` to match the operationId standard: `FetchCohort`, `FetchSnapshot`, `FetchOperation`.
138
+ - Removed the unused `ExpressionId` schema and made the operation error example cohort-native, so no `aud_` identifiers remain in the spec.
139
+ - Kept `libraryVisibility: hidden` across the whole surface (info, path items, and operations).
140
+ - ## 2026-09-08
141
+ - Removed the deprecated header-based-versioning unified specs, consolidating audiences onto the path-based `api.twilio.com/v1` surface.
142
+ - ## 2026-08-31
143
+ - Published the unified audiences spec at `api.twilio.com/v1`.
144
+ - ## 2026-08-26
145
+ - Fixed the Cohort operation response mapping in the unified audiences API.
146
+ - ## 2026-08-19
147
+ - Migrated the unified audiences spec to the Cohort surface (Audiences renamed to Cohorts).
148
+ - Switched `downstreamServiceName` to `audiences-domain`.
149
+ - ## 2026-08-05
150
+ - Added the `api.unified.version.preview` beta feature.
151
+ - Made the unified APIs available in prod us1.
152
+ - ## 2026-07-30
153
+ - Fixed example values.
154
+ - ## 2026-07-29
155
+ - Added the initial version of the audiences API to the unified APIs.
156
+ - ## 2026-07-20
157
+ - Deployed the audiences-domain OAS to the dev edge.
158
+ - ## 2026-07-06
159
+ - Added the prod-us1 realm to the audiences public API.
160
+ - ## 2026-06-23
161
+ - Changed the `storeType` enum from `MEMORA` to `TWILIO`.
162
+ - ## 2026-05-04
163
+ - Added the stage-us1 realm and `x-rate-limit` to the audiences API.
164
+ - ## 2026-04-08
165
+ - Added the initial audiences endpoints.
166
+ - # API Changes
167
+ - ## 2026-10-28
168
+ - Enabled the Redaction Configurations and Redaction Catalog resources in prod-us1.
169
+ - ## 2026-10-27
170
+ - Enabled the Redaction Configurations and Redaction Catalog resources in stage-us1.
171
+ - ## 2026-09-28
172
+ - Added the Redaction Configurations resource (`/v1/RedactionConfigurations`) as a private beta in dev-us1, gated by the `api.redaction.enabled` beta feature.
173
+ - Added the Redaction Catalog resource (`/v1/RedactionCatalog`), under the same beta feature. It is restricted to One Console.
174
+ - Add `ApplicationSid` parameter to TwimlSession and TwimlProcess Create endpoints
175
+
176
+ **Audiences**
177
+ - ## 2026-10-23
178
+ - **Content updates**:
179
+ - Updated description for `AdminFetchRecord`
180
+ - Updated description for `AdminListCohorts`
181
+ - Updated description for `AdminListCohortSnapshots`
182
+ - Updated description for `AdminFetchCohortOperation`
183
+ - Updated description for `AdminListSnapshotOperations`
184
+ - Updated schema description for `OperationStatus`
185
+ - Added properties to `Cohort`: tags
186
+ - Removed properties from `Cohort`: labels
187
+ - Added properties to `CohortSnapshot`: tags
188
+ - Removed properties from `CohortSnapshot`: labels
189
+ - ## 2026-10-23
190
+ - **Content updates**:
191
+ - Updated description for `ListCohorts`
192
+ - Updated description for `CreateCohort`
193
+ - Updated description for `UpdateCohort`
194
+ - Updated description for `ListCohortSnapshots`
195
+ - Updated description for `CreateCohortSnapshot`
196
+ - Updated description for `FetchCohortOperation`
197
+ - Updated schema description for `OperationStatus`
198
+ - Added properties to `Cohort`: tags
199
+ - Removed properties from `Cohort`: labels
200
+ - Added properties to `CohortSnapshot`: tags
201
+ - ...and 8 more changes
202
+ - ## 2026-10-14
203
+ - Minor updates (formatting, metadata)
204
+ - ## 2026-10-07
205
+ - Minor updates (formatting, metadata)
206
+
207
+ **Conversations**
208
+ - Enable the Imports endpoints (list, create, fetch, cancel) and the Import Outcomes list endpoint in prod-us1
209
+ - Add GET /v2/Imports/{ImportId}/Outcomes to list an import's per-resource outcomes (dev-us1 and stage-us1)
210
+ - Add `EMAIL` to the Conversations v2 Communication channel enum.
211
+
212
+ **Deletions**
213
+ - ## 2026-10-28
214
+ - Enable the User Data Deletions API in the `stage-us1` realm.
215
+
216
+ **Destinations**
217
+ - ## 2026-11-03
218
+ - Enable Replay admin APIs for prod-us1 and prod-ie1 realms
219
+
220
+ **Iam**
221
+ - Raised the most permissions in a POST /v1/Account/AuthorizedApps section, and in a part of the PUT /v1/Organization/AgentsRegistration/Permissions request, to 2000 for MCP agents; the limit of other consents is unchanged
222
+ - Lowered the most permissions in a POST /v1/Account/AuthorizedApps section to 150, which is what an XMS policy holds
223
+ - Made the GET and PUT /v1/Organization/AgentsRegistration/Permissions routes available in stage-us1 and prod-us1
224
+ - Added the MCP agent consent fields to GET /v1/Account/AuthorizedApps: agent, account, organization, sections (the offered permissions per context) and redirect, and a 401 body with redirect when the account's organization has not registered or enabled the agent (code 25110, with organization_sid) or the account has no organization (code 25111). oauth_app_sid, client_sid, consent_state and app_permissions are now nullable, since an MCP agent response does not use them
225
+ - Added sections (at least 1) with permissionSelectionMode (ALL_READ, ALL_READ_WRITE, SPECIFIC) and permissions (at most 200) to the POST /v1/Account/AuthorizedApps request, and response_mode and form_params to its 201 response
226
+ - Made the /v1/Organization/AgentsRegistration routes available in stage-us1 and prod-us1
227
+ - Added created_by (the name of the user who registered the agent) and created_by_sid to the /v1/Organization/AgentsRegistration responses; both are null for a registration made before the user was recorded
228
+ - Moved the POST /v1/actions/post_login (PostLoginActionRequest) webhook payload to camelCase (accountSid, nodeId, actionId, userContext, authenticationContext, requestContext, ipAddress, userAgent, requestId, clientId, identifierType); replaced timestamp with the RFC 3339 sentAt, made authorizationDetails a JSON array, made completedAt an RFC 3339 string, and added userContext (isFirstLogin, user) with the CIAM id at userContext.user.userId
229
+ - Added the optional type, agent, account, organization, sections, last_used and expires_at to the iam.v1.consent responses of the GET /v1/Account/AuthorizedApps and GET /v1/Organization/AuthorizedApps lists, for MCP connections. The list shows an MCP connection beside the OAuth applications, and deleting it revokes the whole connection
230
+ - Added a 404 to PUT /v1/Account/AuthorizedApps/{consentSid} for an MCP connection, which cannot be updated
231
+ - Added the GET and PUT /v1/Organization/AgentsRegistration/Permissions routes for what any agent may do in the caller's organization (dev-us1)
232
+ - Renamed the properties of the /v1/Organization/AgentsRegistration responses to snake_case (registration_sid, friendly_name, client_url, date_created, date_updated), as the other IAM responses are; the request bodies keep clientUrl and enabled
233
+ - Fixed the pagination meta of the GET /v1/Organization/AgentsRegistration response: it is mapped from the service's snake_case fields, as in the other IAM list routes, so key, pageSize and the tokens are no longer null
234
+ - Added the /v1/Organization/AgentsRegistration routes (list, register, fetch, enable or disable, remove) for the MCP agents an organization lets its users connect (dev-us1)
235
+
236
+ **Instrumentation**
237
+ - # API Changes
238
+ - ## 2026-10-12
239
+ - Initial read-only admin-api spec for the Behavioral Events (events-domain) One Admin console: event producers (list, fetch), write keys (list), event schemas (list, fetch). dev-us1 and stage-us1 only.
240
+ - ## 2026-10-27
241
+ - **Control Plane create, update and attach are synchronous** (`dev-us1`), matching the deployed service:
242
+ - CreateEventProducer returns `201` with the event producer (`ETag`, `Idempotent-Replayed`), not `202` with an operation
243
+ - PatchEventProducer returns `200` with the event producer (`ETag`), not `202`; `If-Match` is its only header parameter
244
+ - AttachEventProducerSchemaVersion returns `201` with the attachment (`Idempotent-Replayed`), not `202`
245
+ - ## 2026-10-21
246
+ - **Replaced the Control Plane with the private-beta API** (`/v1/ControlPlane/…`), enabled in `dev-us1` only:
247
+ - Removed the EventSources, Datasets, EventSources EventSchemas and AutoInstrumentationRules operations
248
+ - Added `/v1/ControlPlane/EventProducers` (CreateEventProducer, ListEventProducers)
249
+ - Added `/v1/ControlPlane/EventProducers/{producerId}` (FetchEventProducer, PatchEventProducer, DeleteEventProducer)
250
+ - Added `/v1/ControlPlane/EventProducers/{producerId}/WriteKeys` (CreateWriteKey, ListWriteKeys)
251
+ - Added `/v1/ControlPlane/EventProducers/{producerId}/WriteKeys/{writeKey}` (DeleteWriteKey)
252
+ - Added `/v1/ControlPlane/EventProducers/{producerId}/EventSchemas` (AttachEventProducerSchemaVersion, ListEventProducerSchemaAttachments)
253
+ - Added `/v1/ControlPlane/EventProducers/{producerId}/EventSchemas/{schemaId}/Versions/{version}` (DetachEventProducerSchemaVersion)
254
+ - Added `/v1/ControlPlane/EventSchemas` (CreateEventSchema, ListEventSchemas)
255
+ - Added `/v1/ControlPlane/EventSchemas/{schemaId}` (FetchEventSchema, PatchEventSchema, DeleteEventSchema)
256
+ - Added `/v1/ControlPlane/EventSchemas/{schemaId}/Versions` (ListEventSchemaVersions)
257
+ - Added `/v1/ControlPlane/EventSchemas/{schemaId}/Versions/{version}` (FetchEventSchemaVersion, DeleteEventSchemaVersion)
258
+ - Updated `/v1/ControlPlane/Operations/{operationId}` (FetchControlPlaneOperationStatus) to the new operation shape; now `dev-us1` only
259
+
260
+ **Knowledge**
261
+ - ## 2026-10-27
262
+ - **Added 1 new path(s)**:
263
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/Limits` (AdminFetchKnowledgeMigrationLimits)
264
+ - ## 2026-10-21
265
+ - **Content updates**:
266
+ - `AdminListKnowledgeMigrations`: the `state` query parameter is optional; without it the list returns every account with knowledge bases
267
+ - Added properties to `MigrationSummary`: knowledgeBaseCount
268
+ - ## 2026-10-19
269
+ - **Added 7 new path(s)**:
270
+ - `/v2/ControlPlane/KnowledgeMigrations` (AdminListKnowledgeMigrations)
271
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}` (AdminFetchKnowledgeMigration)
272
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/History` (AdminListKnowledgeMigrationHistory)
273
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/Readiness` (AdminFetchKnowledgeMigrationReadiness)
274
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/Runs` (AdminListKnowledgeMigrationRuns)
275
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/Transitions` (AdminListKnowledgeMigrationTransitions, AdminCreateKnowledgeMigrationTransition)
276
+ - `/v2/ControlPlane/KnowledgeMigrations/{accountSid}/Transitions/{transitionId}` (AdminFetchKnowledgeMigrationTransition)
277
+
278
+ **Lookups**
279
+ - Add test api support for Lookup Bulk Jobs endpoints
280
+
281
+ **Memory**
282
+ - ## 2026-10-14
283
+ - No path changes (schema only)
284
+ - Added optional `dataAsOf` to the `Store` schema returned by `AdminFetchStore`.
285
+ - ## 2026-10-14
286
+ - Added optional `dataAsOf` to the `Store` schema returned by `FetchStore`.
287
+ - ## 2026-10-08
288
+ - Added `FetchProfileOperation` (`GET /v1/ProfileOperations/{operationId}`) to check the status and
289
+ - progress of an asynchronous profile operation. The response includes a `Retry-After` header with
290
+ - the minimum number of seconds to wait before polling again. The endpoint is hidden from the
291
+ - helper libraries and gated behind the `api.memory.2026Q3` beta feature.
292
+ - The `202` responses of `UpdateProfilesBulk` and `CreateProfilesImportV2` now return `operationId`,
293
+ - `createdAt` and `statusUrl` (behind the `api.memory.2026Q3` beta feature), plus the `Operation-Id`,
294
+ - `Location` and `Retry-After` response headers. Use `statusUrl` with `FetchProfileOperation` to
295
+ - track the operation.
296
+ - Additive and backwards compatible: existing request and response fields are unchanged.
297
+
298
+ **Messaging**
299
+ - Add data access policy admin endpoints (`GET/PUT /v1/Accounts/{AccountSid}/DataAccessPolicy`) to the messaging admin-api, backed by `postflight-messaging-api` (dev-us1 and stage-us1 only)
300
+ - Enable data access policy admin endpoints (`GET/PUT /v1/Accounts/{AccountSid}/DataAccessPolicy`) in prod-us1 and prod-ie1
301
+
302
+ **Segment**
303
+ - # API Changes
304
+ - ## 2026-11-04
305
+ - Add read-only Cob routes: `GET /v1/Segment/Cob/Whoami`, `/Records`, `/Audits`, `/Audits/{Family}/{Name}`
306
+ - ## 2026-10-30
307
+ - Add `GET /v1/Whoami` (One Admin identity check for the Segment oneadmin-gateway)
308
+
309
+ **Trusthub**
310
+ - Make id, sessionId and sessionToken required and non-nullable in the A2P embedded session response. **(breaking change)**
311
+
312
+ **Voice**
313
+ - Add internal console ProvisioningStatus endpoint.
314
+
315
+ **Webhooks**
316
+ - ## 2026-10-28
317
+ - **Changed**: Rule `prefix` and `value` are limited to 1000 characters. A `prefix` must end with `/` and a `value` must not.
318
+ - ## 2026-10-13
319
+ - API maturity level changed from `beta` to `ga`. Library visibility changed from `private` to `public`.
320
+
321
+
3
322
  [2026-10-12] Version 7.12.0
4
323
  ---------------------------
5
324
  **Audiences**
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- twilio-ruby (7.12.0)
4
+ twilio-ruby (7.13.1)
5
5
  faraday (>= 2.0, < 3.0)
6
6
  jwt (>= 1.5, < 4.0)
7
7
  nokogiri (>= 1.6, < 2.0)
@@ -144,7 +144,7 @@ CHECKSUMS
144
144
  rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
145
145
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
146
146
  simplecov (1.0.3) sha256=38ef0514f16ae7562f0d0f4df02610071115103d301b6de7dacbcc000082e39b
147
- twilio-ruby (7.12.0)
147
+ twilio-ruby (7.13.1)
148
148
  unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
149
149
  unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
150
150
  uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 7.12.0'
42
+ gem 'twilio-ruby', '~> 7.13.1'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 7.12.0
48
+ gem install twilio-ruby -v 7.13.1
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -0,0 +1,61 @@
1
+ # Validating webhook signatures (HMAC-SHA1 and HMAC-SHA256)
2
+
3
+ By default Twilio signs webhooks with your Auth Token using HMAC-SHA1. If a
4
+ [Webhooks Rule](https://www.twilio.com/docs/usage/webhooks/webhook-rules) matches the webhook URL, Twilio signs
5
+ with the Setting's SharedKey and algorithm instead, and adds this header:
6
+
7
+ ```
8
+ X-Twilio-Webhooks-Signature-Settings: key=<sharedKeyId>,algorithm=HMAC_SHA256
9
+ ```
10
+
11
+ Only the hash changes. The signed string is still the full URL followed by the sorted POST parameters.
12
+
13
+ ## Option 1: Rack middleware
14
+
15
+ `Rack::TwilioWebhookAuthentication` reads the header for you. Pass the SharedKey secret next to the Auth Token:
16
+
17
+ ```ruby
18
+ require 'rack'
19
+
20
+ use Rack::TwilioWebhookAuthentication, ENV['AUTH_TOKEN'], /\/voice/,
21
+ shared_key_secret: ENV['SHARED_KEY_SECRET']
22
+ ```
23
+
24
+ - Header absent: validates with the Auth Token and HMAC-SHA1.
25
+ - Header present: validates with `shared_key_secret` and the header's algorithm.
26
+ - Invalid signature or unsupported algorithm: responds 403.
27
+ - Header present but `shared_key_secret` not set: responds 500.
28
+
29
+ ## Option 2: Validate manually
30
+
31
+ ```ruby
32
+ validator_class = Twilio::Security::RequestValidator
33
+
34
+ signature = request.env['HTTP_X_TWILIO_SIGNATURE']
35
+ settings = request.env['HTTP_X_TWILIO_WEBHOOKS_SIGNATURE_SETTINGS']
36
+
37
+ # No header means the Auth Token and HMAC_SHA1
38
+ secret = settings ? shared_key_secret : auth_token
39
+ algorithm = validator_class.signature_algorithm(settings)
40
+
41
+ validator = validator_class.new(secret)
42
+
43
+ # Form-encoded body
44
+ valid = validator.validate(url, params, signature, algorithm)
45
+
46
+ # JSON body (the URL carries bodySHA256)
47
+ valid_json = validator.validate(url, raw_body, signature, algorithm)
48
+ ```
49
+
50
+ If you use more than one SharedKey, look up the secret by the `key=` value in the header.
51
+
52
+ Twilio signs empty parameters too, so keep them when you parse the form body (for example `URI.decode_www_form`).
53
+
54
+ ## Existing code
55
+
56
+ The `algorithm` argument is optional and defaults to HMAC-SHA1, so code that validates with the Auth Token needs no change:
57
+
58
+ ```ruby
59
+ Twilio::Security::RequestValidator.new(auth_token).validate(url, params, signature)
60
+ use Rack::TwilioWebhookAuthentication, ENV['AUTH_TOKEN'], /\/voice/
61
+ ```
@@ -20,15 +20,28 @@ module Rack
20
20
  # the ENV and only against paths that match /\/messages/. If the request
21
21
  # validates then it gets passed on to the action as normal. If the request
22
22
  # doesn't validate then the middleware responds immediately with a 403 status.
23
+ #
24
+ # Webhooks signed with a SharedKey (see the Webhooks Rules API) carry an
25
+ # X-Twilio-Webhooks-Signature-Settings header naming the signing algorithm, and
26
+ # are signed with the SharedKey secret instead of the auth token. Pass it with
27
+ # the shared_key_secret option:
28
+ #
29
+ # use Rack::TwilioWebhookAuthentication, ENV['AUTH_TOKEN'], /\/voice/, shared_key_secret: ENV['SHARED_KEY_SECRET']
30
+ #
31
+ # Requests without that header are still validated with the auth token and
32
+ # HMAC-SHA1. A request with the header but no shared_key_secret configured gets
33
+ # a 500, as the middleware cannot validate it.
23
34
 
24
35
  class TwilioWebhookAuthentication
25
36
  # Rack's FORM_DATA_MEDIA_TYPES can be modified to taste, so we're slightly
26
37
  # more conservative in what we consider form data.
27
38
  FORM_URLENCODED_MEDIA_TYPE = Rack::MediaType.type('application/x-www-form-urlencoded')
39
+ SIGNATURE_SETTINGS_ENV_KEY = 'HTTP_X_TWILIO_WEBHOOKS_SIGNATURE_SETTINGS'
28
40
 
29
- def initialize(app, auth_token, *paths, &auth_token_lookup)
41
+ def initialize(app, auth_token, *paths, shared_key_secret: nil, &auth_token_lookup)
30
42
  @app = app
31
43
  @auth_token = auth_token
44
+ @shared_key_secret = shared_key_secret
32
45
  define_singleton_method(:get_auth_token, auth_token_lookup) if block_given?
33
46
  @path_regex = Regexp.union(paths)
34
47
  end
@@ -38,10 +51,14 @@ module Rack
38
51
  request = Rack::Request.new(env)
39
52
  original_url = request.url
40
53
  params = extract_params!(request)
41
- auth_token = @auth_token || get_auth_token(params['AccountSid'])
42
- validator = Twilio::Security::RequestValidator.new(auth_token)
54
+ signature_settings = env[SIGNATURE_SETTINGS_ENV_KEY]
55
+ secret = signature_settings ? @shared_key_secret : (@auth_token || get_auth_token(params['AccountSid']))
56
+ return missing_shared_key_secret_response if secret.nil?
57
+
58
+ validator = Twilio::Security::RequestValidator.new(secret)
43
59
  signature = env['HTTP_X_TWILIO_SIGNATURE'] || ''
44
- if validator.validate(original_url, params, signature)
60
+ algorithm = Twilio::Security::RequestValidator.signature_algorithm(signature_settings)
61
+ if validator.validate(original_url, params, signature, algorithm)
45
62
  @app.call(env)
46
63
  else
47
64
  [
@@ -52,6 +69,14 @@ module Rack
52
69
  end
53
70
  end
54
71
 
72
+ def missing_shared_key_secret_response
73
+ [
74
+ 500,
75
+ { 'Content-Type' => 'text/plain' },
76
+ ['Twilio Request Validation Failed: no SharedKey secret configured for a SharedKey-signed request.']
77
+ ]
78
+ end
79
+
55
80
  # Decide whether a request path needs its signature validated.
56
81
  #
57
82
  # PATH_INFO arrives percent-encoded, but the routers we sit in front of
@@ -110,6 +135,6 @@ module Rack
110
135
  end
111
136
  end
112
137
 
113
- private :extract_params!, :protected_path?, :decode, :remove_dot_segments
138
+ private :missing_shared_key_secret_response, :extract_params!, :protected_path?, :decode, :remove_dot_segments
114
139
  end
115
140
  end