Skip to main content
POST
Create a rule

Authorizations

Authorization
string
header
required

Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely. Every key can read the management API (/v2/teamspaces/*), except personal data: member and invitation emails, library requesters, visitor questions, Docs7 reader searches, conversations, feedback and feature requests, and the GitHub account behind a build. To read those or make changes there, the key must be created with Write access ticked; other keys get 403 write_access_required.

Path Parameters

teamspaceId
string<uuid>
required

Teamspace id (from GET /v2/teamspaces).

Body

application/json
text
string
required
Required string length: 1 - 1000
libraryId
string | null

Library id starting with /. Omit or null for a rule on every library.

libraryType
enum<string>

Display hint for the library.

Available options:
repo,
llmstxt,
website,
openapi,
pdf,
docx,
file,
confluence,
notion
docsUrl
string<uri>

http(s) link shown with the library.

Response

Rule created

success
boolean
data
object