---
type: api
title: Get shareable references
description: Collect references and space contexts for saved objects.
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-post-spaces-get-shareable-references
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v8/operation/operation-post-spaces-get-shareable-references
products:
  - Kibana
---

# Get shareable references

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/spaces/_get_shareable_references`

## Description

Collect references and space contexts for saved objects.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `objects` (object[]) — required
  - `id` (string) — required
  - `type` (string) — required

## Response

Indicates a successful call.

## Code examples

#### Console

```console
POST kbn:/api/spaces/_get_shareable_references
{
  "objects": [
    {
      "id": "string",
      "type": "string"
    }
  ]
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/spaces/_get_shareable_references" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "objects": [
      {
        "id": "string",
        "type": "string"
      }
    ]
  }'
```

