For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
        • addMembership
        • create
        • delete
        • deleteMembership
        • get
        • getMembership
        • list
        • listMemberships
        • update
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Response Example
  • Example
REST ClientNumber Groups

addMembership

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

create

Next
Built with

Add a phone number to a group.

Path parameters

NumberGroupIdstringRequiredformat: "uuid"
Unique ID of the number group.

Request

phone_number_idstringRequiredformat: "uuid"
The phone number ID to add to the group.

Response

idstringRequiredformat: "uuid"
The unique identifier of the Number Group Membership on SignalWire. This can be used to delete the membership programmatically.
number_group_idstringRequiredformat: "uuid"
The unique identifier of the Number Group this membership is associated with.
phone_numberobjectRequired
A representation of the phone number this membership is associated with.
created_atstringRequired
The date and time when the membership was created.
updated_atstringRequired
The date and time when the membership was last updated.

Response Example

Response
1{
2 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
3 "number_group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "phone_number": {
5 "id": "string",
6 "name": "Jenny",
7 "number": "+15558675309",
8 "capabilities": [
9 "voice",
10 "sms",
11 "mms",
12 "fax"
13 ]
14 },
15 "created_at": "2023-01-15T10:30:00Z",
16 "updated_at": "2023-01-15T10:30:00Z"
17}

Example

1import { RestClient } from "@signalwire/sdk";
2
3const client = new RestClient({
4 project: "your-project-id",
5 token: "your-api-token",
6 host: "your-space.signalwire.com"
7});
8
9const membership = await client.numberGroups.addMembership("group-id", {
10 phone_number_id: "phone-number-id",
11});
12console.log("Membership ID:", membership.id);