---
title: "Add remote state consumers"
method: POST
path: "/workspaces/{workspace}/relationships/remote-state-consumers"
tags: ["remote-state-consumers"]
---

# Add remote state consumers

`POST /workspaces/{workspace}/relationships/remote-state-consumers`

## Request

- Base URL: `https://example.scalr.io/api/iacp/v3`
- URL: `https://example.scalr.io/api/iacp/v3/workspaces/{workspace}/relationships/remote-state-consumers`
- Auth: HTTP bearer

This endpoint adds provided workspaces
to a list of allowed remote state consumers for a given workspace.

## Path parameters

- `workspace` string, required

## Request body

- RemoteStateConsumerRelationshipFieldsetsListingDocument: Document Listing.
  - `data` RemoteStateConsumerRelationship[]
    - `id` string, required
    - `type` 'workspaces', required
  - `included` object[]
  - `links` object
  - `meta` object

## Response `204`

Success.

## Other responses

- `403`: User unauthorized to perform this action.
- `404`: Workspace not found, or user unauthorized to perform action.
- `409`: Not allowed. `global-remote-state` is enabled for the workspace.
- `4XX`: Client error.
- `5XX`: Server error.

---

[API](https://skmtc.dev/scalr/apis/scalr-iacp-api.md) - [All operations](https://skmtc.dev/scalr/apis/scalr-iacp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scalr/apis/scalr-iacp-api/revisions/d3e1dc85657a?raw)
