---
title: "Add a Confluence space"
method: POST
path: "/v2/add/confluence"
tags: ["Add Library"]
---

# Add a Confluence space

`POST /v2/add/confluence`

Submit a Confluence space for documentation processing. Requires a connected Confluence account and a team project. You can optionally specify specific page IDs to index only a subset of the space.

## Request body

- object
  - `cloudId` string, required — The Confluence cloud instance ID
  - `siteUrl` string, required — The Confluence site URL
  - `spaceKey` string, required — The Confluence space key
  - `spaceName` string, required — The Confluence space name
  - `pageIds` string[] — Optional list of specific page IDs to index. If omitted, the entire space is indexed.
  - `title` string, required — Title for the library
  - `description` string, required — Description of the library
  - `projectId` string — The team project ID to associate this Confluence space with

## Response `200`

Library submitted successfully for processing

- AddLibraryResponse — Response after successfully submitting a library
  - `libraryName` string, required — The library identifier assigned — the URL path of the library on context7.com. `/owner/repo` for GitHub repositories, or `/<source>/<id>` for other sources (e.g., `/vercel/next.js`, `/websites/uploadcare_com`). See [Library ID format](/api-guide#library-id-format).
  - `message` string, required — Human-readable success message

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - Insufficient permissions or plan restrictions
- `409` — Conflict - Resource already exists
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error
- `504` — Gateway Timeout - Processing timed out waiting for logs

---

[API](https://skmtc.net/context7/apis/context7-public-api.md) · [All operations](https://skmtc.net/context7/apis/context7-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/context7/context7-public-api/versions/5e85fc74bff0/schema)
