# NetworkAccessProfile Network Subresource

Each **Network Access Profile (NAP)** resource has a [**Networks**](https://docs.korewireless.com/en-us/api/products/supersim/network-resource) subresource (**NAP Networks**) that contains a list of allowed cellular networks Super SIMs can connect to.

```
https://supersim.api.korewireless.com/v1/NetworkAccessProfiles/{Sid}/Networks
```

The **NAP Network** resources in this subresource are a subset of all of the [**Network**](https://docs.korewireless.com/en-us/api/products/supersim/network-resource) resources available from the [**Networks**](https://docs.korewireless.com/en-us/api/products/supersim/network-resource) resource. You can add or remove **NAP Network** resources from the **NAP Networks** subresource at any time to change which cellular networks Super SIMs using the parent **Network Access Profile** resource can connect to.

The `sid` used to add, remove, or identify NAP Network resources is the same as the `sid` of the corresponding [**Network**](https://docs.korewireless.com/en-us/api/products/supersim/network-resource) resource. You can filter the **NAP Networks** subresource the same way you can the **Networks** resource.

***

## NetworkAccessProfile Network properties <a href="#networkaccessprofile-network-properties" id="networkaccessprofile-network-properties"></a>

A Network Access Profile Network resource (NAP Network) has the same representation and values as the corresponding available [**Network**](https://docs.korewireless.com/en-us/api/products/supersim/network-resource) resource with the exception of the additional `NetworkAccessProfileSid` property that identifies the Network Access Profile the subresource belongs to.

***

## Managing Access to Networks

### Allowing Access to a Network

To allow Super SIMs to connect to a cellular network represented by a [Network](https://docs.korewireless.com/en-us/api/products/supersim/network-resource) resource, a NAP Network resource must be created. Use the `sid` of the Network resource you with to add in your create request to add the NAP Networks subresource.

For example, if you wish to allow Super SIMs to connect to AT\&T US you would follow these steps:

1. First, you need to know the `sid` of the [Network](https://docs.korewireless.com/en-us/api/products/supersim/network-resource) resource that represents AT\&T US. You could do that by reading through the list of Network resources or if you know the MCC and MNC identifiers (310 and 410, respectively for AT\&T US), you can [read Networks resource by MCC and MNC](https://docs.korewireless.com/en-us/api/products/supersim/network-resource#read-multiple-network-resources). You will find that the `sid` of the Network resource representing AT\&T US is `HWd85b0262d6fc4c0b991bf8294596642e`.
2. Now that you know the `sid` of the Network resource you wish to add, you can allow your Super SIMs to that use your NAP by creating NAP Network resource with AT\&T US' `sid`. See the documentation [below](#create-a-networkaccessprofile-network-resource) for more details on how to do this.

### Removing Access to a Network

To prevent Super SIMs from connecting to a cellular network that was previously allowed by your NAP, the corresponding NAP Network resource must be deleted. See the documentation [below](#delete-a-networkaccessprofile-network-resource) for more details on how to do this.

{% hint style="info" %}
Remember that the networks listed in your NAP Networks list act as an allow list. Your SIMs will be blocked from connecting to any networks not present in the list. Adding networks to the list gives permission to connect to it. Removing networks from the list blocks them again.
{% endhint %}

***

## API Authorization <a href="#api-authorization" id="api-authorization"></a>

Before you can make requests to this resource, you must have a valid bearer token. Review our API [authorization guide](https://docs.korewireless.com/en-us/developers/api-management/auth) to learn how to generate a token. Here's a curl example on how to define your access token in a header:

{% code overflow="wrap" %}

```bash
curl -L "https://supersim.api.korewireless.com/v1/Sims" -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" 
```

{% endcode %}

{% hint style="warning" %}
The examples below do not show the required `Authorization` header due to a bug. We're working on fixing that. In the meantime, be sure to include that in all of your requests.
{% endhint %}

***

## Create a NetworkAccessProfile Network Resource

## POST /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks

> Add a Network resource to the Network Access Profile resource.

```json
{"openapi":"3.0.1","info":{"title":"KORE - Supersim","version":"1.0.0"},"tags":[{"name":"SupersimV1NetworkAccessProfileNetwork"}],"servers":[{"url":"https://supersim.api.korewireless.com"}],"security":[{"OAuth":[]}],"components":{"securitySchemes":{"OAuth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"supersim.v1.network_access_profile.network_access_profile_network":{"type":"object","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies the Network resource."},"network_access_profile_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HA[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies the Network resource's Network Access Profile resource."},"friendly_name":{"type":"string","nullable":true,"description":"A human readable identifier of the Network this resource refers to."},"iso_country":{"type":"string","nullable":true,"description":"The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resource."},"identifiers":{"type":"array","items":{},"nullable":true,"description":"Array of objects identifying the [MCC-MNCs](https://en.wikipedia.org/wiki/Mobile_country_code) that are included in the Network resource."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Network resource."}}}}},"paths":{"/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks":{"post":{"description":"Add a Network resource to the Network Access Profile resource.","tags":["SupersimV1NetworkAccessProfileNetwork"],"parameters":[{"name":"NetworkAccessProfileSid","in":"path","description":"The unique string that identifies the Network Access Profile resource.","schema":{"type":"string"},"required":true}],"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supersim.v1.network_access_profile.network_access_profile_network"}}},"headers":{"Access-Control-Allow-Origin":{"description":"Specify the origin(s) allowed to access the resource","schema":{"type":"string"}},"Access-Control-Allow-Methods":{"description":"Specify the HTTP methods allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Headers":{"description":"Specify the headers allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"description":"Indicates whether the browser should include credentials","schema":{"type":"boolean"}},"Access-Control-Expose-Headers":{"description":"Headers exposed to the client","schema":{"type":"string"}}},"description":"Created"}},"operationId":"CreateNetworkAccessProfileNetwork","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","title":"CreateNetworkAccessProfileNetworkRequest","properties":{"Network":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$","description":"The SID of the Network resource to be added to the Network Access Profile resource."}},"required":["Network"]}}}}}}}}
```

***

## Fetch a NetworkAccessProfile Network resource <a href="#fetch-a-networkaccessprofile-network-resource" id="fetch-a-networkaccessprofile-network-resource"></a>

## GET /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}

> Fetch a Network Access Profile resource's Network resource.

```json
{"openapi":"3.0.1","info":{"title":"KORE - Supersim","version":"1.0.0"},"tags":[{"name":"SupersimV1NetworkAccessProfileNetwork"}],"servers":[{"url":"https://supersim.api.korewireless.com"}],"security":[{"OAuth":[]}],"components":{"securitySchemes":{"OAuth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"supersim.v1.network_access_profile.network_access_profile_network":{"type":"object","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies the Network resource."},"network_access_profile_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HA[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies the Network resource's Network Access Profile resource."},"friendly_name":{"type":"string","nullable":true,"description":"A human readable identifier of the Network this resource refers to."},"iso_country":{"type":"string","nullable":true,"description":"The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resource."},"identifiers":{"type":"array","items":{},"nullable":true,"description":"Array of objects identifying the [MCC-MNCs](https://en.wikipedia.org/wiki/Mobile_country_code) that are included in the Network resource."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Network resource."}}}}},"paths":{"/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}":{"get":{"description":"Fetch a Network Access Profile resource's Network resource.","tags":["SupersimV1NetworkAccessProfileNetwork"],"parameters":[{"name":"NetworkAccessProfileSid","in":"path","description":"The unique string that identifies the Network Access Profile resource.","schema":{"type":"string"},"required":true},{"name":"Sid","in":"path","description":"The SID of the Network resource to fetch.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/supersim.v1.network_access_profile.network_access_profile_network"}}},"headers":{"Access-Control-Allow-Origin":{"description":"Specify the origin(s) allowed to access the resource","schema":{"type":"string"}},"Access-Control-Allow-Methods":{"description":"Specify the HTTP methods allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Headers":{"description":"Specify the headers allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"description":"Indicates whether the browser should include credentials","schema":{"type":"boolean"}},"Access-Control-Expose-Headers":{"description":"Headers exposed to the client","schema":{"type":"string"}}},"description":"OK"}},"operationId":"FetchNetworkAccessProfileNetwork"}}}}
```

***

## Read multiple NetworkAccessProfile Network resources <a href="#read-multiple-networkaccessprofile-network-resources" id="read-multiple-networkaccessprofile-network-resources"></a>

## GET /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks

> Retrieve a list of Network Access Profile resource's Network resource.

```json
{"openapi":"3.0.1","info":{"title":"KORE - Supersim","version":"1.0.0"},"tags":[{"name":"SupersimV1NetworkAccessProfileNetwork"}],"servers":[{"url":"https://supersim.api.korewireless.com"}],"security":[{"OAuth":[]}],"components":{"securitySchemes":{"OAuth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}},"schemas":{"supersim.v1.network_access_profile.network_access_profile_network":{"type":"object","properties":{"sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies the Network resource."},"network_access_profile_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HA[0-9a-fA-F]{32}$","nullable":true,"description":"The unique string that identifies the Network resource's Network Access Profile resource."},"friendly_name":{"type":"string","nullable":true,"description":"A human readable identifier of the Network this resource refers to."},"iso_country":{"type":"string","nullable":true,"description":"The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Network resource."},"identifiers":{"type":"array","items":{},"nullable":true,"description":"Array of objects identifying the [MCC-MNCs](https://en.wikipedia.org/wiki/Mobile_country_code) that are included in the Network resource."},"url":{"type":"string","format":"uri","nullable":true,"description":"The absolute URL of the Network resource."}}}}},"paths":{"/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks":{"get":{"description":"Retrieve a list of Network Access Profile resource's Network resource.","tags":["SupersimV1NetworkAccessProfileNetwork"],"parameters":[{"name":"NetworkAccessProfileSid","in":"path","description":"The unique string that identifies the Network Access Profile resource.","schema":{"type":"string"},"required":true},{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"networks":{"type":"array","items":{"$ref":"#/components/schemas/supersim.v1.network_access_profile.network_access_profile_network"}},"meta":{"properties":{"first_page_url":{"format":"uri","type":"string"},"key":{"type":"string"},"next_page_url":{"format":"uri","nullable":true,"type":"string"},"page":{"type":"integer"},"page_size":{"type":"integer"},"previous_page_url":{"format":"uri","nullable":true,"type":"string"},"url":{"format":"uri","type":"string"}},"type":"object"}},"title":"ListNetworkAccessProfileNetworkResponse"}}},"headers":{"Access-Control-Allow-Origin":{"description":"Specify the origin(s) allowed to access the resource","schema":{"type":"string"}},"Access-Control-Allow-Methods":{"description":"Specify the HTTP methods allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Headers":{"description":"Specify the headers allowed when accessing the resource","schema":{"type":"string"}},"Access-Control-Allow-Credentials":{"description":"Indicates whether the browser should include credentials","schema":{"type":"boolean"}},"Access-Control-Expose-Headers":{"description":"Headers exposed to the client","schema":{"type":"string"}}},"description":"OK"}},"operationId":"ListNetworkAccessProfileNetwork"}}}}
```

***

## Delete a NetworkAccessProfile Network resource <a href="#delete-a-networkaccessprofile-network-resource" id="delete-a-networkaccessprofile-network-resource"></a>

## DELETE /v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}

> Remove a Network resource from the Network Access Profile resource's.

```json
{"openapi":"3.0.1","info":{"title":"KORE - Supersim","version":"1.0.0"},"tags":[{"name":"SupersimV1NetworkAccessProfileNetwork"}],"servers":[{"url":"https://supersim.api.korewireless.com"}],"security":[{"OAuth":[]}],"components":{"securitySchemes":{"OAuth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.korewireless.com/api-services/v1/auth/token","scopes":{}}}}}},"paths":{"/v1/NetworkAccessProfiles/{NetworkAccessProfileSid}/Networks/{Sid}":{"delete":{"description":"Remove a Network resource from the Network Access Profile resource's.","tags":["SupersimV1NetworkAccessProfileNetwork"],"parameters":[{"name":"NetworkAccessProfileSid","in":"path","description":"The unique string that identifies the Network Access Profile resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HA[0-9a-fA-F]{32}$"},"required":true},{"name":"Sid","in":"path","description":"The SID of the Network resource to be removed from the Network Access Profile resource.","schema":{"type":"string","minLength":34,"maxLength":34,"pattern":"^HW[0-9a-fA-F]{32}$"},"required":true}],"responses":{"204":{"description":"The resource was deleted successfully."}},"operationId":"DeleteNetworkAccessProfileNetwork"}}}}
```

***
