Selda Material API
Prospect material: raw files in, a campaign and a company list out.
Prospect material: raw files in, a campaign and a company list out.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/selda-ai:selda-ai-material-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Selda Material API
version: 1.0.0
summary: Find the right people, write the message, prepare the campaign. A person still presses send.
description: 'Generated from `convex/lib/mcpRegistry.ts`, the same table the endpoints dispatch from. A
function added to the registry appears here on the next build and one removed disappears, so
this document cannot describe a capability the API does not have.
## Authentication
`Authorization: Bearer sk_live_...` or `Bearer sk_test_...`. **Your organisation is resolved
from the key.** You never send an `orgId`, and a key cannot reach a workspace outside the
organisation it was made in. A `sk_test_` key reaches every read and write that costs Selda
nothing and cannot spend or send; each operation says whether it refuses one, and why.
## These paths and the RPC endpoints are the same API
Every route here is dispatched by the same code that answers `POST /mcp/query`,
`POST /mcp/mutate` and `POST /mcp/run`. The path chooses the function name; nothing else
changes. The RPC form is not deprecated and is still the only way to call the few entries
that have no route.
## What is not here, on purpose
**There is no operation that sends.** `launchRun` is in no registry, not this one and not the
MCP one, and it never will be. A script can prepare a campaign completely: import material,
confirm the companies, write and rewrite every draft. A human presses send in the app. That is
the product''s central claim, not a gap waiting to be filled.
**There is no operation that creates a workspace.** `projects.create` is absent rather than
gated, because a rule enforced by a plan tier is a rule with a price on it.
**Response shapes are almost never documented.** A shape for `value` is published for
1 of the 97 operations, because one is derived only where the target function declares
a `returns` validator. Everywhere else `value` carries a description saying exactly that,
rather than an invented object that would go stale with nothing to notice. Call an operation
once with a test key and read what comes back.
## Registry entries with no route
- `chats.get` on `POST /mcp/query`: `GET /v1/chats` is already the route for `chats.list` on `/mcp/query`, and one URL cannot mean two functions. Call this one at `POST /mcp/query` with `{ "fn": "chats.get" }`.
- `leads.enrich` on `POST /mcp/run`: another registry table (INTERNAL_ACTIONS) declares leads.enrich on /mcp/run too and the dispatcher checks that one first, so this entry can never be the one that runs.
- `leads.update` on `POST /mcp/mutate`: another registry table (INTERNAL_MUTATIONS) declares leads.update on /mcp/mutate too and the dispatcher checks that one first, so this entry can never be the one that runs.
- `replies.draft` on `POST /mcp/run`: `POST /v1/replies/draft` is already the route for `replies.draft` on `/mcp/mutate`, and one URL cannot mean two functions. Call this one at `POST /mcp/run` with `{ "fn": "replies.draft" }`.'
servers:
- url: https://api.selda.ai
description: Production
security:
- bearerAuth: []
tags:
- name: material
description: 'Prospect material: raw files in, a campaign and a company list out.'
paths:
/v1/material/import:
post:
operationId: material_import
summary: material.import
description: 'Your prospect folder → a campaign + company list, then it stops. Uploading material is not permission to send.
Dispatched to `material.import` on `POST /mcp/run`. This route is a different URL for the same call: the request is answered by the same dispatcher, with the same authentication, the same scope check, the same organisation scoping and the same refusals.
- Scope: `pipeline`
- A free sandbox key may call it, but not with every argument. `autoAdvance` carries the run on into contact lookup and drafting, which spend, so with it the same call needs a live key.
- MCP tools that wrap the same function: `selda_import_material`
- Filled in from your API key, never sent by you: `orgId`, `apiKeyId`'
tags:
- material
responses:
'200':
description: The call succeeded.
content:
application/json:
schema:
type: object
required:
- value
- request_id
properties:
value:
description: Not documented. `campaignRunner/folderImportApi:importProspectMaterial` declares no `returns` validator, so there is nothing to derive a shape from, and a shape written out by hand here is a shape that goes stale without anything noticing. Call it once against a test key and read what comes back.
request_id:
type: string
description: Echoed in the `X-Request-Id` header.
'400':
description: Unknown route, or arguments the validator refused.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing, expired or revoked key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The key lacks the scope, the plan entitlement, or is a sandbox key on a live-only function.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limited. Wait for the next minute window and retry.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: The function threw. The message says what, without leaking internals.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-selda-fn: material.import
x-selda-rpc-endpoint: /mcp/run
x-selda-scope: pipeline
x-selda-sandbox: depends-on-arguments
x-selda-mcp-tools:
- selda_import_material
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
projectId:
type: string
description: A Convex document id in the `projects` table.
files:
type: array
items:
type: object
properties:
path:
type: string
storageId:
type: string
description: A Convex document id in the `_storage` table.
sizeBytes:
type: number
mimeType:
type: string
required:
- path
- storageId
- sizeBytes
assignments:
type: array
items:
type: object
properties:
folderName:
type: string
domain:
type: string
required:
- folderName
- domain
excludedFolders:
type: array
items:
type: string
campaignName:
type: string
targetRunId:
type: string
description: 'Push INTO an existing campaign instead of creating one (#357), the campaign''s run id. The other door onto the same feature: a script that already produced a second folder of prospects for the same motion should be able to add them as the campaign''s next wave rather than fragmenting one effort across several campaigns. The permission rule is unchanged, the wave parks at the company-list gate and inherits nothing from an earlier wave''s grant, and the run must belong to the project this API key''s org owns, which `appendCandidateBatch` verifies. A Convex document id in the `campaignRuns` table.'
campaignBrief:
type: string
description: 'The operator''s campaign document (18.8.2026): rules, structure, tone, what may not be claimed. This is what made the API pipeline half-manual, analyses went in over the wire, but the RULES had to be pasted by hand in the app, and a campaign without them runs on house defaults. Honored exactly as the Määritä card''s own-prompt mode is. On a `targetRunId` wave it is accepted only when the campaign has no brief yet; a differing one is refused out loud.'
fields:
type: object
additionalProperties:
type: object
additionalProperties:
description: Any JSON value. The validator is `v.any()`.
description: 'Your own data per company, for personal pages and videos: `{ "boreo.fi": { demo: "https://...", offer: "...", price: 49 } }`. The key is a company''s domain or its name; the values are kept under the names you give them (a-z, 0-9, _; `demo` and any `*_url` must be https). Refused keys come back in `fieldsRefused`. Nothing is sent and nothing is invented.'
autoAdvance:
anyOf:
- type: boolean
- type: array
items:
type: string
enum:
- leads
- messages
description: 'Explicit grant to continue past the company list. A script CAN pass this, Autopilot is a legitimate caller, but it is never the default, and the grant is recorded on the run. Per-stage since #301: `["leads"]` grants contact lookup and stops before any message is written; `true` grants both. A script that only wants the contacts found should say so rather than granting everything, because message writing spends credits. Neither form can send. Sending stays behind `launchRun` and the approval gate.'
additionalProperties: false
required:
- projectId
- files
/v1/material/upload:
post:
operationId: material_upload
summary: POST /mcp/material/upload
description: 'Raw file bytes in, a `storageId` out. Send the file''s path in `X-Selda-Path`: that path is how Selda maps a file to a company. Then hand the ids to `material.import`.
The request body is the file itself, not JSON.
- Scope: `pipeline`
- A free sandbox key may call it'
tags:
- material
parameters:
- name: X-Selda-Path
in: header
required: true
description: The file's path inside your folder, for example `boreo/filterit/analysis.pdf`.
schema:
type: string
requestBody:
required: true
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
'200':
description: Stored.
content:
application/json:
schema:
type: object
required:
- value
- request_id
properties:
value:
type: object
properties:
storageId:
type: string
path:
type: string
sizeBytes:
type: number
mimeType:
type: string
request_id:
type: string
'400':
description: No `X-Selda-Path`, or an empty body.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing, expired or revoked key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: The key lacks the `pipeline` scope.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'413':
description: The file is over the 25 MB per-file limit.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-selda-rpc-endpoint: /mcp/material/upload
x-selda-scope: pipeline
x-selda-sandbox: allowed
x-selda-mcp-tools:
- selda_upload_material
components:
schemas:
Error:
type: object
required:
- error
- request_id
properties:
error:
type: object
required:
- type
- code
- message
- request_id
properties:
type:
type: string
description: The coarse class, for branching on.
code:
type: string
description: The specific machine-readable code.
message:
type: string
description: Sanitized. It never leaks internals.
request_id:
type: string
request_id:
type: string
description: Echoed in the `X-Request-Id` header.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A Selda API key. Created in Settings, stored hashed, shown once, revocable.