Skip to content

Subscribers ​

Fresh

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# Create Subscriber

POST https://%7BYour_Space_Name%7D.signalwire.com/api/fabric/resources/subscribers Content-Type: application/json

Create a new [Subscriber](/docs/platform/subscribers).

#### Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, _Fax_, or _Video_.

[Learn more about API scopes](/docs/platform/your-signalwire-api-space).

Reference: https://signalwire.com/docs/apis/rest/subscribers/create-subscriber

## OpenAPI Specification

```yaml openapi: 3.1.0 info: title: signalwire-rest version: 1.0.0 paths: /api/fabric/resources/subscribers: post: operationId: create-subscriber summary: Create Subscriber Create a new [Subscriber](/docs/platform/subscribers).

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: _Voice_, _Messaging_, _Fax_, or _Video_.

[Learn more about API scopes](/docs/platform/your-signalwire-api-space). tags: - subpackage_subscribers parameters: - name: Authorization in: header SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing

the word Basic followed by a space and a base64-encoded string of project_id:token.

The project ID will be used as the username and the API token as the password.

Example:

```

Authorization: Basic base64(project_id:token)

``` required: true schema: type: string responses: '201': The request has succeeded and a new resource has been created as a result. content: application/json: schema: $ref: '#/components/schemas/SubscriberResponse' '401': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode401' '404': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode404' '422': content: application/json: schema: $ref: '#/components/schemas/SubscriberCreateStatusCode422' '500': content: application/json: schema: $ref: '#/components/schemas/Types.StatusCodes.StatusCode500' requestBody: content: application/json: schema: $ref: '#/components/schemas/SubscriberRequest' servers: - url: https://%7BYour_Space_Name%7D.signalwire.com components: schemas: SubscriberRequest: type: object properties: password: type: string Password of the Subscriber. Defaults to a secure random password if not provided. email: type: string first_name: type: string last_name: type: string display_name: type: string job_title: type: string timezone: type: string country: type: string company_name: type: string required: - email title: SubscriberRequest SubscriberResponseType: type: string enum: - subscriber title: SubscriberResponseType uuid: type: string format: uuid title: uuid Subscriber: type: object properties: id: $ref: '#/components/schemas/uuid' email: type: string first_name: type: string last_name: type: string display_name: type: string job_title: type: string timezone: type: string country: type: string company_name: type: string required: - id - email - first_name - last_name - display_name - job_title - timezone - country - company_name title: Subscriber SubscriberResponse: type: object properties: id: type: string project_id: type: string display_name: type: string type: $ref: '#/components/schemas/SubscriberResponseType' created_at: type: string format: date-time updated_at: type: string format: date-time subscriber: $ref: '#/components/schemas/Subscriber' required: - id - project_id - display_name - type - created_at - updated_at - subscriber title: SubscriberResponse TypesStatusCodesStatusCode401Error: type: string enum: - Unauthorized title: TypesStatusCodesStatusCode401Error Types.StatusCodes.StatusCode401: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode401Error' required: - error title: Types.StatusCodes.StatusCode401 TypesStatusCodesStatusCode404Error: type: string enum: - Not Found title: TypesStatusCodesStatusCode404Error Types.StatusCodes.StatusCode404: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode404Error' required: - error title: Types.StatusCodes.StatusCode404 Types.StatusCodes.RestApiErrorItem: type: object properties: type: type: string code: type: string message: type: string attribute: type: - string - 'null' url: type: string required: - type - code - message - url title: Types.StatusCodes.RestApiErrorItem SubscriberCreateStatusCode422: type: object properties: errors: type: array items: $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem' required: - errors title: SubscriberCreateStatusCode422 TypesStatusCodesStatusCode500Error: type: string enum: - Internal Server Error title: TypesStatusCodesStatusCode500Error Types.StatusCodes.StatusCode500: type: object properties: error: $ref: '#/components/schemas/TypesStatusCodesStatusCode500Error' required: - error title: Types.StatusCodes.StatusCode500 securitySchemes: SignalWireBasicAuth: type: http scheme: basic SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing

the word Basic followed by a space and a base64-encoded string of project_id:token.

The project ID will be used as the username and the API token as the password.

Example:

```

Authorization: Basic base64(project_id:token)

```

```

## SDK Code Examples

```python import requests

url = "https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers"

payload = { "email": "johndoe@example.com" } headers = { "Content-Type": "application/json" }

response = requests.post(url, json=payload, headers=headers, auth=("", ""))

print(response.json()) ```

```javascript const url = 'https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers'; const credentials = btoa("😊;

const options = { method: 'POST', headers: { Authorization: `Basic ${credentials}`, 'Content-Type': 'application/json' }, body: '{"email":"johndoe@example.com"}' };

try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ```

```go package main

import ( "fmt" "strings" "net/http" "io" )

func main() {

url := "https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers"

payload := strings.NewReader("{\n \"email\": \"johndoe@example.com\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.SetBasicAuth("", "") req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close() body, _ := io.ReadAll(res.Body)

fmt.Println(res) fmt.Println(string(body))

} ```

```ruby require 'uri' require 'net/http'

url = URI("https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers")

http = Net::HTTP.new(url.host, url.port) http.use_ssl = true

request = Net::HTTP::Post.new(url) request.basic_auth("", "") request["Content-Type"] = 'application/json' request.body = "{\n \"email\": \"johndoe@example.com\"\n}"

response = http.request(request) puts response.read_body ```

```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest;

HttpResponse response = Unirest.post("https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers") .basicAuth("", "") .header("Content-Type", "application/json") .body("{\n \"email\": \"johndoe@example.com\"\n}") .asString(); ```

```php request('POST', 'https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers', [
'body' => '{
"email": "johndoe@example.com"
}',
'headers' => [
'Content-Type' => 'application/json',
],
'auth' => ['', ''],
]);

echo $response->getBody(); ```

```csharp using RestSharp; using RestSharp.Authenticators;

var client = new RestClient("https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers"); client.Authenticator = new HttpBasicAuthenticator("", ""); var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"email\": \"johndoe@example.com\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ```

```swift import Foundation

let credentials = Data(":".utf8).base64EncodedString()

let headers = [
"Authorization": "Basic \(credentials)",
"Content-Type": "application/json"
] let parameters = ["email": "johndoe@example.com"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/fabric/resources/subscribers")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data

let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } })

dataTask.resume() ```


Delete Subscriber ​

Delete an existing Subscriber.

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Authentication ​

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Path parameters ​

idstringRequiredformat: "uuid"

Unique ID of a Subscriber.

Errors ​

401

Unauthorized Error

404

Not Found Error

500

Internal Server Error


Create Subscriber SIP credential ​

Creates a Subscriber SIP Credential.

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Authentication ​

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Path parameters ​

fabric_subscriber_idstringRequiredformat: "uuid"

Unique ID of a Fabric Subscriber.

Request ​

This endpoint expects an object.

usernamestringRequired

Username of the Sip Endpoint.

passwordstringRequired

Password of the Sip Endpoint.

caller_idstringOptional

Caller ID of the Sip Endpoint.

send_asstringOptional

The Number to send as.

cipherslist of enumsOptional

Ciphers of the Sip Endpoint.

Allowed values:AEAD_AES_256_GCM_8AES_256_CM_HMAC_SHA1_80AES_CM_128_HMAC_SHA1_80AES_256_CM_HMAC_SHA1_32AES_CM_128_HMAC_SHA1_32

codecslist of enumsOptional

Codecs of the Sip Endpoint.

Show 7 enum values

encryptionenumOptional

Encryption requirement of the Sip Endpoint.

Allowed values:requiredoptionaldefault

Response ​

The request has succeeded and a new resource has been created as a result.

idstringformat: "uuid"

Unique ID of the Sip Endpoint.

usernamestring

Username of the Sip Endpoint.

caller_idstring

Caller ID of the Sip Endpoint.

send_asstring

Purchased or verified number

cipherslist of enums

Ciphers of the Sip Endpoint.

Allowed values:AEAD_AES_256_GCM_8AES_256_CM_HMAC_SHA1_80AES_CM_128_HMAC_SHA1_80AES_256_CM_HMAC_SHA1_32AES_CM_128_HMAC_SHA1_32

codecslist of enums

Codecs of the Sip Endpoint.

Show 7 enum values

encryptionenum

Encryption requirement of the Sip Endpoint.

Allowed values:requiredoptionaldefault

Errors ​

401

Unauthorized Error

404

Not Found Error

422

Unprocessable Entity Error

500

Internal Server Error


List Subscriber SIP credentials ​

A list of SIP Credentials for the Subscriber.

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Authentication ​

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Path parameters ​

fabric_subscriber_idstringRequiredformat: "uuid"

Unique ID of a Fabric Subscriber.

Response ​

The request has succeeded.

datalist of objects

Show 7 properties

linksobject

Show 4 properties

Errors ​

401

Unauthorized Error

404

Not Found Error

500

Internal Server Error


Create guest embed token ​

Creates a guest subscriber token from a public Click-to-Call (C2C) token. The returned short-lived token authorizes a guest subscriber to place a call through the C2C embed widget without exposing sensitive credentials or requiring a full subscriber account.

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Request ​

This endpoint expects an object.

tokenstringRequired

Click to Call Token

Response ​

The request has succeeded and a new resource has been created as a result.

tokenstringformat: "jwt"

Encrypted guest token.

Errors ​

401

Unauthorized Error

403

Forbidden Error

404

Not Found Error

422

Unprocessable Entity Error

500

Internal Server Error


Create Subscriber guest token ​

Creates a Subscriber Guest Token. The token is authorized using an existing API token.

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Authentication ​

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Request ​

This endpoint expects an object.

allowed_addresseslist of stringsRequired

List of up to 10 UUIDs representing the allowed Fabric addresses.

expire_atintegerOptional

A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to β€˜two hours from now’

regionenumOptional

A routing override that controls which regional cluster the SDK connects to.

Allowed values:us-central

chenumOptional

A direct routing override specifying the regional cluster endpoint, set as the ch claim in the SAT JWE header.

Allowed values:us-central

Response ​

The request has succeeded and a new resource has been created as a result.

tokenstringformat: "jwt"

Guest Token

refresh_tokenstringformat: "jwt"

Refresh Token

Errors ​

401

Unauthorized Error

404

Not Found Error

422

Unprocessable Entity Error

500

Internal Server Error


Create Subscriber invite token ​

Creates a Subscriber Invite Token to be used for client-side API calls. The token is authorized using a subscriber’s SAT (Subscriber Access Token).

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Authentication ​

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Request ​

This endpoint expects an object.

address_idstringRequiredformat: "uuid"

Unique ID of a Subscriber Address

expires_atintegerOptional

A unixtime (the number of seconds since 1970-01-01 00:00:00) at which the token should no longer be valid. Defaults to β€˜two hours from now’

Response ​

The request has succeeded and a new resource has been created as a result.

tokenstringformat: "jwt"

Invite Token

Errors ​

401

Unauthorized Error

404

Not Found Error

422

Unprocessable Entity Error

500

Internal Server Error


Refresh Subscriber token ​

Exchanges a valid refresh token for a new subscriber access token and a new refresh token. The new access token is valid for 2 hours, and the new refresh token is valid for 2 hours and 5 minutes.

Permissions ​

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Voice, Messaging, Fax, or Video.

Learn more about API scopes.

Authentication ​

AuthorizationBasic

SignalWire Basic Authentication using Project ID and API Token.

The client sends HTTP requests with the Authorization header containing the word Basic followed by a space and a base64-encoded string of project_id:token. The project ID will be used as the username and the API token as the password.

Example:

Authorization: Basic base64(project_id:token)

Request ​

This endpoint expects an object.

refresh_tokenstringRequiredformat: "jwt"

The refresh token previously issued alongside a subscriber access token. This token is used to request a new access token.

Response ​

The request has succeeded and a new resource has been created as a result.

tokenstringformat: "jwt"

A newly generated subscriber access token, valid for 2 hours.

refresh_tokenstringformat: "jwt"

A new refresh token, valid for 2 hours and 5 minutes.

Errors ​

401

Unauthorized Error

404

Not Found Error

422

Unprocessable Entity Error

500

Internal Server Error

SignalWire Developer Documentation