---
title: "Associate facility with a network"
method: POST
path: "/facilities/{id}/networks"
tags: ["Facility"]
---

# Associate facility with a network

`POST /facilities/{id}/networks`

Associates a facility with a network following the roster ingestion pattern. The network must belong to a group (groupId provided in request body). If the facility is not associated with the group, the group association will also be created simultaneously. Validates that the network belongs to the specified group before creating the association. Creates or updates a TenantGroupFacilityNetwork relationship.

## Path parameters

- `id` string, required

## Headers

- `tenant-id` string

## Request body

- AssociateFacilityNetworkRequest — Request to associate a facility with a network
  - `groupId` string, required — ID of the group that the network belongs to
  - `networkId` string, required — ID of the network to associate with
  - `networkEffectiveDate` string — Effective date for the facility-network association
  - `groupEffectiveDate` string — Effective date for the TenantGroupFacility relationship

## Response `201`

Successfully associated facility with network

- AssociateFacilityNetworkResponse — Response containing facility-network association result
  - `tenantGroupFacilityId` string — ID of the tenant group facility
  - `tenantGroupFacilityNetworkId` string — ID of the tenant group facility network association
  - `networkId` string — ID of the network that was associated
  - `status` string — Indicates the result of the association

## Other responses

- `400` — Bad request - Invalid input or validation error
- `401` — Unauthorized - Authentication required
- `403` — Forbidden - Insufficient permissions
- `404` — Facility, group, or network not found, or network does not belong to the group
- `500` — Internal server error

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/versions/3d27e9019c7b/schema)
