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

# create

> Create a new FreeSWITCH connector resource.

Create a new FreeSWITCH connector resource.

### Schema

```yaml
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
paths:
  /api/fabric/resources/freeswitch_connectors:
    post:
      operationId: create_freeswitch_connector
      summary: Create FreeSWITCH connector
      description: >-
        Creates a FreeSWITCH Connector


        #### 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_freeSwitchConnector
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FreeswitchConnectorResponse'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode404'
        '422':
          description: The request contains invalid parameters. See errors for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FreeswitchConnectorCreateStatusCode422'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FreeswitchConnectorCreateRequest'
servers:
  - url: https://%7BYour_Space_Name%7D.signalwire.com
    description: SignalWire API
components:
  schemas:
    uuid:
      type: string
      format: uuid
      description: Universal Unique Identifier.
      title: uuid
    FreeswitchConnectorCreateRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the FreeSWITCH Connector
        token:
          $ref: '#/components/schemas/uuid'
          description: FreeSWITCH token
      required:
        - name
        - token
      title: FreeswitchConnectorCreateRequest
    FreeswitchConnectorResponseType:
      type: string
      enum:
        - freeswitch_connector
      description: Type of the Fabric Resource
      title: FreeswitchConnectorResponseType
    FreeswitchConnector:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of a FreeSWITCH Connector.
        name:
          type: string
          description: Name of the FreeSWITCH Connector
        caller_id:
          type:
            - string
            - 'null'
          description: Caller ID for the connector
        send_as:
          type:
            - string
            - 'null'
          description: Send as identifier
      required:
        - id
      title: FreeswitchConnector
    FreeswitchConnectorResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the FreeSWITCH Connector.
        project_id:
          $ref: '#/components/schemas/uuid'
          description: Unique ID of the Project.
        display_name:
          type: string
          description: Display name of the FreeSWITCH Connector Fabric Resource
        type:
          $ref: '#/components/schemas/FreeswitchConnectorResponseType'
          description: Type of the Fabric Resource
        created_at:
          type: string
          format: date-time
          description: Date and time when the resource was created.
        updated_at:
          type: string
          format: date-time
          description: Date and time when the resource was updated.
        freeswitch_connector:
          $ref: '#/components/schemas/FreeswitchConnector'
          description: FreeSWITCH Connector data.
      required:
        - id
        - project_id
        - display_name
        - type
        - created_at
        - updated_at
        - freeswitch_connector
      title: FreeswitchConnectorResponse
    TypesStatusCodesStatusCode401Error:
      type: string
      enum:
        - Unauthorized
      title: TypesStatusCodesStatusCode401Error
    Types.StatusCodes.StatusCode401:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode401Error'
      required:
        - error
      description: Access is unauthorized.
      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
      description: The server cannot find the requested resource.
      title: Types.StatusCodes.StatusCode404
    Types.StatusCodes.RestApiErrorItem:
      type: object
      properties:
        type:
          type: string
          description: The category of error.
        code:
          type: string
          description: A specific error code.
        message:
          type: string
          description: A description of what caused the error.
        attribute:
          type:
            - string
            - 'null'
          description: The request parameter that caused the error, if applicable.
        url:
          type: string
          description: A link to documentation about this error.
      required:
        - type
        - code
        - message
        - url
      description: Details about a specific error.
      title: Types.StatusCodes.RestApiErrorItem
    FreeswitchConnectorCreateStatusCode422:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem'
          description: List of validation errors.
      required:
        - errors
      description: The request contains invalid parameters. See errors for details.
      title: FreeswitchConnectorCreateStatusCode422
    TypesStatusCodesStatusCode500Error:
      type: string
      enum:
        - Internal Server Error
      title: TypesStatusCodesStatusCode500Error
    Types.StatusCodes.StatusCode500:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/TypesStatusCodesStatusCode500Error'
      required:
        - error
      description: An internal server error occurred.
      title: Types.StatusCodes.StatusCode500

```

## **Response Example**

### Response (200)

```json
{
  "id": "993ed018-9e79-4e50-b97b-984bd5534095",
  "project_id": "1313fe58-5e14-4c11-bbe7-6fdfa11fe780",
  "display_name": "Main FreeSWITCH Server",
  "type": "freeswitch_connector",
  "created_at": "2024-05-06T12:20:00Z",
  "updated_at": "2024-05-06T12:20:00Z",
  "freeswitch_connector": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "Booking Assistant",
    "caller_id": "123456",
    "send_as": "123456"
  }
}
```

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

result = client.fabric.freeswitch_connectors.create(
    name="my-connector",
)
print(f"Created: {result['id']}")
```