Skip to content

Add a source to a mission

POST
/v1/missions/{id}/sources
curl --request POST \
--url https://beta-api.plune.ai/v1/missions/example/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "openapi", "ref": "https://shop.example.com/openapi.json", "title": "Shop API", "version": "2026-11-01" }'

A link the testing reads: a page (url), an API description (openapi), a repository (repo) or a ticket (ticket), with a title and the version read. At most 100 sources a mission (409).

id
required
string

The mission’s id

Media type application/json
object
kind
required
string
Allowed values: url openapi repo ticket
ref
required

The link; http or https only

string format: uri
<= 2048 characters
title

What the source is, as a person names it

string
>= 1 characters <= 200 characters
version

The version read

string
>= 1 characters <= 200 characters
Example
{
"kind": "openapi",
"ref": "https://shop.example.com/openapi.json",
"title": "Shop API",
"version": "2026-11-01"
}

The source

Media type application/json
object
id
required
string
kind
required

A link of four kinds, added by POST /v1/missions/{id}/sources; or file, uploaded by POST /v1/missions/{id}/files

string
Allowed values: file url openapi repo ticket
ref
required

The link; a file source’s file name

string
title
required
string
nullable
version
required

The source’s version as its owner names it: a commit, a tag, a document’s revision, an ETag

string
nullable
addedBy
required

The user who added it: the person, or the person whose token the agent used

string
createdAt
required
string format: date-time
bytes

A file source only: its size in UTF-8 bytes

integer
mediaType

A file source only: its type, read off its name

string
Allowed values: text/plain text/markdown application/json
Example
{
"id": "6f1c2b3a-0000-4000-8000-000000002189",
"kind": "openapi",
"ref": "https://shop.example.com/openapi.json",
"title": "Shop API",
"version": "2026-11-01",
"addedBy": "6f1c2b3a-0000-4000-8000-0000000000a2",
"createdAt": "2026-11-04T09:05:00.000Z"
}

Invalid JSON or body

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid token or session

You are in the project as a reader, or the token is read-only

No such mission in your project

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

The mission holds the most sources it can

Media type application/json
object
error
required
string
Example
{
"error": "a mission holds at most 100 sources: take one off first"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over