# Get SIP Accounts

Get all SIP Accounts belonging to the given Voice Account.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Sip Accounts API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.cm.com"
    }
  ],
  "paths": {
    "/voice-sipaccountsapi/v1/{voiceAccountGuid}/sipAccounts": {
      "get": {
        "tags": [
          "Sip Accounts"
        ],
        "summary": "Get SIP Accounts",
        "description": "Get all SIP Accounts belonging to the given Voice Account.",
        "parameters": [
          {
            "name": "voiceAccountGuid",
            "in": "path",
            "description": "Unique identifier of the Voice Account.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "00000000-0000-0000-0000-000000000000"
          },
          {
            "name": "includeConfig",
            "in": "query",
            "description": "Whether or not to include the SIP Account configuration, defaults to `true`.",
            "schema": {
              "type": "boolean",
              "example": true
            },
            "example": true
          },
          {
            "name": "q",
            "in": "query",
            "description": "The search query that can be applied to search through the items before they get paginated.",
            "schema": {
              "type": "string",
              "example": ""
            },
            "example": ""
          },
          {
            "name": "skip",
            "in": "query",
            "description": "The amount of items to be skipped, defaults to 0.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "example": 0
            },
            "example": 0
          },
          {
            "name": "take",
            "in": "query",
            "description": "The amount of items to take, defaults to 25.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "example": 25
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "X-CM-PAGINATION-SKIP": {
                "description": "The amount of items that have been skipped",
                "schema": {
                  "type": "number"
                }
              },
              "X-CM-PAGINATION-TAKE": {
                "description": "The amount of items that have been taken",
                "schema": {
                  "type": "number"
                }
              },
              "X-CM-PAGINATION-TOTAL": {
                "description": "The total amount of available items",
                "schema": {
                  "type": "number"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiSipAccount"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCollection"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiSipAccount": {
        "title": "Sip Account",
        "type": "object",
        "properties": {
          "guid": {
            "type": "string",
            "description": "Unique identifier of the SIP Account.",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "description": "Date and time on which the SIP Account was created.",
            "format": "date-time"
          },
          "customerAccountGuid": {
            "type": "string",
            "description": "The unique identifier of the Voice Account which this SIP Account is part of.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the SIP Account.",
            "nullable": true
          },
          "username": {
            "type": "string",
            "description": "Username of the SIP Account. The username is generated automatically by CM.com and cannot be changed.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether or not the SIP Account is set to active."
          },
          "inPrison": {
            "type": "boolean",
            "description": "Whether the account has a temporary ban after entering the wrong password too many times.",
            "nullable": true
          },
          "config": {
            "$ref": "#/components/schemas/ApiSipConfig"
          }
        },
        "additionalProperties": false,
        "description": "A SIP Account that can be used to make calls via the CM.com Platform."
      },
      "ApiSipConfig": {
        "title": "Sip Config",
        "type": "object",
        "properties": {
          "cpsLimit": {
            "type": "integer",
            "description": "Limit of the amount of calls that can be set up per second.",
            "format": "int32",
            "example": 2
          },
          "ccLimit": {
            "type": "integer",
            "description": "Limit of the amount of calls that can take place concurrently.",
            "format": "int32",
            "example": 100
          },
          "alwaysAnonymous": {
            "type": "boolean",
            "description": "Whether or not outbound calls from this SIP Account will always be dialed out with CLI anonymous.",
            "example": false
          },
          "hasAnonymousOverride": {
            "type": "boolean",
            "description": "When set to true, this option guarantees routing that support anonymous calls.",
            "example": false
          },
          "defaultOutboundCallerId": {
            "type": "string",
            "description": "The CLI used when making outbound calls. This does not override a valid CLI that is already provided in the SIP invite.",
            "nullable": true,
            "example": ""
          },
          "restrictionType": {
            "type": "string",
            "description": "Sets the type of prefix restrictions placed on this SIP Account, this can be either set to `whitelist` or `blacklist`. When set to `whitelist`, only calls to the given prefixes will be allowed, when set to `blacklist`, only calls to the given prefixes will be blocked.",
            "nullable": true,
            "example": "blacklist"
          },
          "primaryTrunkId": {
            "type": "string",
            "description": "Platform name or domain of the primary SIP trunk or DNS that will be used. The `/trunks` and `/platformdomains` endpoints can be used to get a list of currently active SIP Trunks and Platform Domains.",
            "nullable": true,
            "example": "outbound02"
          },
          "secondaryTrunkId": {
            "type": "string",
            "description": "Platform name or domain of the secondary (backup) SIP trunk that will be used. The `/trunks` and `/platformdomains` endpoints can be used to get a list of currently active SIP Trunks and Platform Domains. **When using DNS, reach out to support for a backup DNS.**",
            "nullable": true,
            "example": "outbound01"
          },
          "blockNonEerToEer": {
            "type": "boolean",
            "description": "All calls with a non-European CLI to a European country will be blocked for this SIP account.",
            "example": false
          },
          "allowPremium": {
            "type": "boolean",
            "description": "Allow calls to premium pay-per-minute or pay-per-call numbers.",
            "example": false
          }
        },
        "additionalProperties": false,
        "description": "SIP configuration containing settings that define how a SIP Account can be used."
      },
      "Error": {
        "title": "Error",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ErrorCollection": {
        "title": "Error Collection",
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "X-CM-PRODUCTTOKEN": {
        "type": "apiKey",
        "description": "Your producttoken",
        "name": "X-CM-PRODUCTTOKEN",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "X-CM-PRODUCTTOKEN": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 254,
      "2": 39,
      "3": 241,
      "4": 128,
      "5": 239,
      "6": 120,
      "7": 0,
      "8": 82,
      "9": 163,
      "10": 4,
      "11": 41
    }
  }
}
```