# Emergency Numbers

Manage your Emergency numbers.

## List emergency numbers

> Get a collection of emergency numbers.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Emergency Number","description":"Manage your Emergency numbers.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/emergency_numbers":{"get":{"tags":["Emergency Number"],"operationId":"listEmergencyNumbers","summary":"List emergency numbers","description":"Get a collection of emergency numbers.\n","parameters":[{"name":"filter","in":"query","schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of emergency number.\n"},"number_prefix":{"type":"string","minLength":1,"maxLength":64,"description":"The emergency number prefix.\n"},"description":{"type":"string","maxLength":1024,"description":"The emergency number description.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Add emergency number.

> Add a new emergency number.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Emergency Number","description":"Manage your Emergency numbers.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/emergency_numbers":{"post":{"tags":["Emergency Number"],"operationId":"addEmergencyNumber","summary":"Add emergency number.","description":"Add a new emergency number.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number_prefix":{"type":"string","minLength":1,"maxLength":64,"description":"The emergency number prefix.\n"},"description":{"type":"string","maxLength":1024,"description":"The emergency number description.\n"}}}}},"required":true},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of emergency number.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve emergency number

> Get detail information of emergency number.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Emergency Number","description":"Manage your Emergency numbers.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/emergency_numbers/{id}":{"get":{"tags":["Emergency Number"],"operationId":"showEmergencyNumber","summary":"Retrieve emergency number","description":"Get detail information of emergency number.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of emergency number.\n"},"description":"The unique ID of the emergency number."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of emergency number.\n"},"number_prefix":{"type":"string","minLength":1,"maxLength":64,"description":"The emergency number prefix.\n"},"description":{"type":"string","maxLength":1024,"description":"The emergency number description.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update emergency number

> Update a emergency number.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Emergency Number","description":"Manage your Emergency numbers.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/emergency_numbers/{id}":{"post":{"tags":["Emergency Number"],"operationId":"updateEmergencyNumber","summary":"Update emergency number","description":"Update a emergency number.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of emergency number.\n"},"description":"The unique ID of the emergency number."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"number_prefix":{"type":"string","minLength":1,"maxLength":64,"description":"The emergency number prefix.\n"},"description":{"type":"string","maxLength":1024,"description":"The emergency number description.\n"}}}}},"required":true},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Delete emergency number

> Delete emergency number<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Emergency Number","description":"Manage your Emergency numbers.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/emergency_numbers/{id}/destroy":{"post":{"tags":["Emergency Number"],"operationId":"deleteEmergencyNumber","summary":"Delete emergency number","description":"Delete emergency number\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The unique ID of the resource.\n"},"description":"The unique ID of the emergency number."}],"responses":{"204":{"description":"No Content"},"4XX":{"description":"Error"}}}}}}
```
