@@ -15,9 +15,12 @@ This SDK implements JSON:API serialization and deserialization without external
1515Read more https://doc.didww.com/api
1616
1717This SDK targets DIDWW API v3 documentation version:
18- [ https://doc.didww.com/api3/2022-05-10 /index.html ] ( https://doc.didww.com/api3/2022-05-10 /index.html )
18+ [ https://doc.didww.com/api3/2026-04-16 /index.html ] ( https://doc.didww.com/api3/2026-04-16 /index.html )
1919
20- The client sends the ` X-DIDWW-API-Version: 2022-05-10 ` header with each request.
20+ The client sends the ` X-DIDWW-API-Version: 2026-04-16 ` header with each request.
21+
22+ Version ** 3.x** targets API version ` 2026-04-16 ` .
23+ Version ** 2.x** (branch ` release-2 ` ) targets API version ` 2022-05-10 ` .
2124
2225## Requirements
2326
@@ -29,6 +32,11 @@ The client sends the `X-DIDWW-API-Version: 2022-05-10` header with each request.
2932go get github.com/didww/didww-api-3-go-sdk
3033```
3134
35+ ** Note on module path:** This module intentionally does not use a ` /v3 ` suffix,
36+ following the same convention established in v2. The major version is bumped in
37+ ` go.mod ` and tagged releases, but the import path stays
38+ ` github.com/didww/didww-api-3-go-sdk ` for backward compatibility.
39+
3240## Usage
3341
3442``` go
@@ -161,8 +169,14 @@ proofTypes, _ := client.ProofTypes().List(ctx, nil)
161169// Public Keys
162170publicKeys , _ := client.PublicKeys ().List (ctx, nil )
163171
164- // Requirements
165- requirements , _ := client.Requirements ().List (ctx, nil )
172+ // Address Requirements
173+ requirements , _ := client.AddressRequirements ().List (ctx, nil )
174+
175+ // Emergency Requirements (2026-04-16)
176+ emergReqs , _ := client.EmergencyRequirements ().List (ctx, nil )
177+
178+ // DID History (2026-04-16)
179+ history , _ := client.DIDHistory ().List (ctx, nil )
166180
167181// Supporting Document Templates
168182templates , _ := client.SupportingDocumentTemplates ().List (ctx, nil )
@@ -232,19 +246,32 @@ created, _ := client.VoiceInTrunkGroups().Create(ctx, group)
232246> ** Note:** Voice Out Trunks require additional account configuration. Contact DIDWW support to enable.
233247> The ` replace_cli ` and ` randomize_cli ` values of ` OnCliMismatchAction ` also require account configuration.
234248
249+ Voice Out Trunks use a polymorphic ` AuthenticationMethod ` (2026-04-16). Three types are supported:
250+
251+ - ** ` credentials_and_ip ` ** -- default method; ` Username ` and ` Password ` are server-generated and returned in the response.
252+ - ** ` twilio ` ** -- requires a ` TwilioAccountSid ` .
253+ - ** ` ip_only ` ** -- read-only; can only be configured by DIDWW staff upon request. Cannot be set via the API.
254+
235255``` go
236- import " github.com/didww/didww-api-3-go-sdk/resource/enums"
256+ import (
257+ " github.com/didww/didww-api-3-go-sdk/resource/authenticationmethod"
258+ " github.com/didww/didww-api-3-go-sdk/resource/enums"
259+ )
237260
261+ // NOTE: 203.0.113.0/24 is RFC 5737 TEST-NET-3 documentation space.
262+ // Replace with the real CIDR of your SIP infrastructure.
238263trunk := &didww.VoiceOutTrunk {
239- Name : " My Outbound Trunk" ,
240- AllowedSipIPs : [] string { " 0.0.0.0/0 " },
241- AllowedRtpIPs : []string {" 0 .0.0 .0/0 " },
242- DstPrefixes : [] string { },
264+ Name : " My Outbound Trunk" ,
265+ AuthenticationMethod : &authenticationmethod. CredentialsAndIp {
266+ AllowedSipIPs: []string {" 203 .0.113 .0/24 " },
267+ },
243268 DefaultDstAction : enums.DefaultDstActionAllowAll ,
244269 OnCliMismatchAction : enums.OnCliMismatchActionRejectCall ,
245270 MediaEncryptionMode : enums.MediaEncryptionModeDisabled ,
246271}
247272created , _ := client.VoiceOutTrunks ().Create (ctx, trunk)
273+ // created.AuthenticationMethod.(*authenticationmethod.CredentialsAndIp).Username -- server-generated
274+ // created.AuthenticationMethod.(*authenticationmethod.CredentialsAndIp).Password -- server-generated
248275```
249276
250277### Orders
@@ -335,14 +362,41 @@ verification := &didww.AddressVerification{
335362created , _ := client.AddressVerifications ().Create (ctx, verification)
336363```
337364
365+ ### Emergency Services (2026-04-16)
366+
367+ ``` go
368+ // List emergency requirements filtered by country
369+ params := didww.NewQueryParams ().Filter (" country.id" , " country-uuid" )
370+ reqs , _ := client.EmergencyRequirements ().List (ctx, params)
371+
372+ // Create emergency verification
373+ verification := &didww.EmergencyVerification {
374+ AddressID : " address-uuid" ,
375+ IdentityID : " identity-uuid" ,
376+ DIDIDs : []string {" did-uuid" },
377+ }
378+ created , _ := client.EmergencyVerifications ().Create (ctx, verification)
379+
380+ // List emergency calling services
381+ services , _ := client.EmergencyCallingServices ().List (ctx, nil )
382+ ```
383+
384+ ### DID History (2026-04-16)
385+
386+ ``` go
387+ // List DID history entries
388+ params := didww.NewQueryParams ().Filter (" did.id" , " did-uuid" )
389+ history , _ := client.DIDHistory ().List (ctx, params)
390+ ```
391+
338392### Exports
339393
340394``` go
341395import " github.com/didww/didww-api-3-go-sdk/resource/enums"
342396
343397export := &didww.Export {
344398 ExportType : enums.ExportTypeCdrIn ,
345- Filters : map [string ]interface {}{" year " : 2025 , " month " : 1 },
399+ Filters : map [string ]interface {}{" from " : " 2026-04-01 00:00:00 " , " to " : " 2026-04-16 00:00:00 " },
346400}
347401created , _ := client.Exports ().Create (ctx, export)
348402```
@@ -439,6 +493,7 @@ updated, _ := client.VoiceInTrunks().Update(ctx, trunk)
439493| Available DID | ` available_did_order_items ` |
440494| Reservation DID | ` reservation_did_order_items ` |
441495| Capacity | ` capacity_order_items ` |
496+ | Emergency | ` emergency_order_items ` |
442497| Generic (response only) | ` generic_order_items ` |
443498
444499## Error Handling
@@ -478,7 +533,9 @@ if err != nil {
478533| AvailableDID | ` client.AvailableDIDs() ` | list, find |
479534| ProofType | ` client.ProofTypes() ` | list, find |
480535| PublicKey | ` client.PublicKeys() ` | list |
481- | Requirement | ` client.Requirements() ` | list, find |
536+ | AddressRequirement | ` client.AddressRequirements() ` | list, find |
537+ | EmergencyRequirement | ` client.EmergencyRequirements() ` | list, find |
538+ | DIDHistory | ` client.DIDHistory() ` | list |
482539| SupportingDocumentTemplate | ` client.SupportingDocumentTemplates() ` | list, find |
483540| Balance | ` client.Balance() ` | find |
484541| DID | ` client.DIDs() ` | list, find, update, delete |
@@ -490,14 +547,17 @@ if err != nil {
490547| CapacityPool | ` client.CapacityPools() ` | list, find, update |
491548| SharedCapacityGroup | ` client.SharedCapacityGroups() ` | list, find, create, update, delete |
492549| Order | ` client.Orders() ` | list, find, create, delete |
493- | Export | ` client.Exports() ` | list, find, create |
550+ | Export | ` client.Exports() ` | list, find, create, update |
494551| Address | ` client.Addresses() ` | list, find, create, update, delete |
495- | AddressVerification | ` client.AddressVerifications() ` | list, find, create |
552+ | AddressVerification | ` client.AddressVerifications() ` | list, find, create, update |
553+ | EmergencyCallingService | ` client.EmergencyCallingServices() ` | list, find, delete |
554+ | EmergencyVerification | ` client.EmergencyVerifications() ` | list, find, create, update |
555+ | EmergencyRequirementValidation | ` client.EmergencyRequirementValidations() ` | create |
496556| Identity | ` client.Identities() ` | list, find, create, update, delete |
497557| EncryptedFile | ` client.EncryptedFiles() ` | list, find, delete |
498558| PermanentSupportingDocument | ` client.PermanentSupportingDocuments() ` | create |
499559| Proof | ` client.Proofs() ` | create |
500- | RequirementValidation | ` client.RequirementValidations () ` | create |
560+ | AddressRequirementValidation | ` client.AddressRequirementValidations () ` | create |
501561| StockKeepingUnit | include on ` DIDGroups ` | — |
502562| QtyBasedPricing | include on ` CapacityPools ` | — |
503563
@@ -509,9 +569,22 @@ if err != nil {
509569The SDK distinguishes between date-only and datetime fields:
510570
511571- ** Datetime fields** are deserialized as ` time.Time ` (UTC) when always present, or ` *time.Time ` when optional (nil if the API omits the value):
512- - All ` CreatedAt ` fields — ` time.Time ` , present on most resources
513- - Expiry fields — ` *time.Time ` : ` DID.ExpiresAt ` , ` Proof.ExpiresAt ` , ` EncryptedFile.ExpireAt ` ; ` DIDReservation.ExpireAt ` is ` time.Time ` (always present)
514- - ** Date-only fields** (` Identity.BirthDate ` , ` CapacityPool.RenewDate ` , order item ` BilledFrom ` /` BilledTo ` ) remain as ` string ` in ` "YYYY-MM-DD" ` format — Go has no separate date-only type, so the raw string avoids timezone ambiguity.
572+ - ` CreatedAt ` — ` time.Time ` , present on most resources
573+ - ` ExpiresAt ` — ` *time.Time ` : ` DID ` , ` DIDReservation ` , ` Proof ` , ` EncryptedFile `
574+ - ` ActivatedAt ` — ` *time.Time ` : ` EmergencyCallingService ` (nullable)
575+ - ` CanceledAt ` — ` *time.Time ` : ` EmergencyCallingService ` (nullable)
576+ - ** Date-only fields** remain as ` string ` in ` "YYYY-MM-DD" ` format — Go has no separate date-only type, so the raw string avoids timezone ambiguity:
577+ - ` Identity.BirthDate `
578+ - ` CapacityPool.RenewDate ` , ` EmergencyCallingService.RenewDate ` (nullable)
579+ - Order item ` BilledFrom ` / ` BilledTo `
580+ - ** String fields** (not numeric):
581+ - ` EmergencyRequirement.EstimateSetupTime ` — e.g. ` "7-14 days" ` , ` "1" `
582+ - ` EmergencyRequirement.RequirementRestrictionMessage ` — nullable
583+
584+ ** Important changes from previous API versions:**
585+ - ` ExpiresAt ` replaces ` ExpireAt ` on ` DIDReservation ` and ` EncryptedFile `
586+ - ` RenewDate ` is a date-only string, NOT a ` time.Time `
587+ - ` EstimateSetupTime ` is a string, NOT an integer
515588
516589``` go
517590did , _ := client.DIDs ().Find (ctx, " uuid" )
@@ -528,6 +601,7 @@ The SDK provides enum types in `github.com/didww/didww-api-3-go-sdk/resource/enu
528601
529602` CallbackMethod ` , ` IdentityType ` , ` OrderStatus ` , ` ExportType ` , ` ExportStatus ` , ` CliFormat ` ,
530603` OnCliMismatchAction ` \* , ` MediaEncryptionMode ` , ` DefaultDstAction ` , ` VoiceOutTrunkStatus ` ,
604+ ` EmergencyCallingServiceStatus ` , ` EmergencyVerificationStatus ` , ` DiversionRelayPolicy ` ,
531605` TransportProtocol ` , ` Codec ` , ` RxDtmfFormat ` , ` TxDtmfFormat ` , ` SstRefreshMethod ` ,
532606` ReroutingDisconnectCode ` , ` Feature ` , ` AreaLevel ` , ` AddressVerificationStatus ` , ` StirShakenMode `
533607
0 commit comments