> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.taktoria.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.taktoria.com/_mcp/server.

# Export

POST https://api.taktoria.com/api/v1/launches/{launchId}/artifacts/{type}/exports
Content-Type: application/json

Export the artifact to Notion, Confluence or Google Docs, as the
signed-in person, through their own account in the tool (connected
from Export on a launch artifact in LaunchCal): never a shared
account, so a workspace key is refused (`person_required`). The first
export makes a page (`destinationId` says where, from
`GET /docs-tools/{tool}/destinations`; Google Docs makes a new doc in
their Drive); a later one updates that same page, title and all,
unless `asNew`. When the earlier page cannot be reached with this
person's account, a new one is made where `destinationId` says, and
`outcome` is `replaced`. The link is kept on the artifact
(`exports`). Writing it changes the launch, so a Viewer of LaunchCal
is refused. Counts against `docs-export`. Needs `artifacts:write`.
An artifact with nothing written in it is `409 artifact_empty`, a
tool this deployment does not export to `409 docs_tool_unavailable`,
a tool the person has not connected `409 docs_not_connected`, a
connection the tool turned down `409 docs_reconnect`, a
`destinationId` that cannot take a page or that their account
cannot reach `409 docs_destination_invalid`, and a tool that did
not answer `502 upstream_error`.

Reference: https://docs.taktoria.com/api-reference/artifacts/export

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.taktoria.com/api/v1` (Production, default)
- `http://localhost:3000/api/v1` (Local)

## Request

### Path parameters

- `launchId` (string, required)
- `type` (enum, required)
  - Allowed values: `PRESS_RELEASE`, `DASHBOARD`, `LEARNINGS`

### Body (application/json)

This endpoint expects an ExportArtifactRequest.

- `tool` (enum, required)
  - Allowed values: `NOTION`, `CONFLUENCE`, `GOOGLE_DOCS`
- `destinationId` (string, optional) — Where a new page goes: a Notion page's or Confluence space's `id` from `GET /docs-tools/{tool}/destinations`. Not needed for Google Docs, nor to update the page an earlier export made.
- `title` (string, optional) — The page's title; by default the launch's name and the artifact's.
- `asNew` (boolean, optional) — Make a new page even when the earlier one could be updated.

## Response

### 200

- `outcome` (enum, required)
  - Allowed values: `created`, `updated`, `replaced`
- `export` (ArtifactExport, required) — Where an artifact was last exported to in one docs tool: a page or doc made with the exporter's own account there, which they own.
- `artifact` (LaunchArtifact, required) — A document attached to a launch: the press release written before the work starts, the dashboard watched during it, and the learnings captured after.

## Errors

### 403 Forbidden Error

Refused, and `error.code` says why. On an app's write endpoints, a signed-in session is refused `viewer_only` when the person is a Viewer of the app (they read it, and change nothing in it), and `seat_required` without a seat on it; a key is never either. Beyond those: `admin_required` when the change is an admin's (an app admin's for an app's admin powers, a workspace admin's for the workspace's settings), `forbidden` when the person may not change this one thing, `read_only_session` for a change only a key makes, `person_required` for what only a signed-in person does through their own account elsewhere (exporting a LaunchCal artifact to their docs tool), which a key cannot, `insufficient_scope` for a key without the scope, and `google_sign_in_required` for a session the workspace's Google rule turns away. Nothing was done.

- `error` (ErrorDetail, required)

### 404 Not Found Error

- `error` (ErrorDetail, required)

### 409 Conflict Error

The request conflicts with how things stand, and `error.code` says how: `conflict` in general, or an endpoint's own code (`draft`, `launched`, `steps_incomplete`, `ticketing_not_connected`, `docs_not_connected`, …), listed in its description and under Errors and pagination. Nothing was done.

- `error` (ErrorDetail, required)

### 422 Validation Error

- `error` (ErrorDetail, required)

### 429 Too Many Requests Error

Rate limited (`rate_limited`): the key, the signed-in person, the workspace or an expensive endpoint's own budget is used up for now. `Retry-After` says how many seconds to wait, and `details` names the `policy`, its `limit`, `windowSeconds` and `retryAfter`. Every answer to an authenticated request carries the IETF `RateLimit-Policy` and `RateLimit` headers, so a client can slow down before it gets this. Nothing was done; wait and send it again. See "Rate limits".

- `error` (ErrorDetail, required)

### 502 Upstream Error

A service Taktoria depends on (Stripe, Vercel for app domains, or a ticketing system such as Linear, Jira, GitHub, Asana or ClickUp, or a docs tool a person exports to, Notion, Confluence or Google Docs) turned the change down or could not be reached. Nothing was saved; try again.

- `error` (ErrorDetail, required)

### 429 Too Many Requests Error

Rate limited (`rate_limited`): the key, the signed-in person, the workspace or an expensive endpoint's own budget is used up for now. `Retry-After` says how many seconds to wait, and `details` names the `policy`, its `limit`, `windowSeconds` and `retryAfter`. Every answer to an authenticated request carries the IETF `RateLimit-Policy` and `RateLimit` headers, so a client can slow down before it gets this. Nothing was done; wait and send it again. See "Rate limits".

- `error` (ErrorDetail, required)

## Types

### ArtifactExport

Where an artifact was last exported to in one docs tool: a page or doc made with the exporter's own account there, which they own.

- `tool` (enum, required)
  - Allowed values: `NOTION`, `CONFLUENCE`, `GOOGLE_DOCS`
- `url` (string, required) — The page or doc in the tool.
- `title` (string, required)
- `exportedAt` (datetime, required)
- `location` (string, optional) — Where it went, as the tool names it (the parent page, the space).
- `exportedBy` (ArtifactExporter, optional) — Who exported it last; null once their account is gone.

### LaunchArtifact

A document attached to a launch: the press release written before the work starts, the dashboard watched during it, and the learnings captured after.

- `id` (string, required)
- `launchId` (string, required)
- `type` (enum, required)
  - Allowed values: `PRESS_RELEASE`, `DASHBOARD`, `LEARNINGS`
- `exports` (list of ArtifactExport, required) — Where it was last exported to, one per docs tool ("Opened in Notion").
- `createdAt` (datetime, required)
- `updatedAt` (datetime, required)
- `content` (string, optional) — Markdown body.
- `url` (string, optional) — External link, when the artifact lives in another tool.

### ErrorDetail

- `code` (string, required) — A stable machine-readable code such as `not_found`.
- `message` (string, required)
- `details` (any, optional)

### ArtifactExporter

- `id` (string, required)
- `name` (string, required)

## Examples

**Request**

```json
{
  "tool": "NOTION"
}
```

**Response**

```json
{
  "outcome": "created",
  "export": {
    "tool": "NOTION",
    "url": "url",
    "title": "title",
    "exportedAt": "2024-01-15T09:30:00Z",
    "location": "location",
    "exportedBy": {
      "id": "id",
      "name": "name"
    }
  },
  "artifact": {
    "id": "id",
    "launchId": "launchId",
    "type": "PRESS_RELEASE",
    "exports": [
      {
        "tool": "NOTION",
        "url": "url",
        "title": "title",
        "exportedAt": "2024-01-15T09:30:00Z",
        "location": "location",
        "exportedBy": {
          "id": "id",
          "name": "name"
        }
      },
      {
        "tool": "NOTION",
        "url": "url",
        "title": "title",
        "exportedAt": "2024-01-15T09:30:00Z",
        "location": "location",
        "exportedBy": {
          "id": "id",
          "name": "name"
        }
      }
    ],
    "createdAt": "2024-01-15T09:30:00Z",
    "updatedAt": "2024-01-15T09:30:00Z",
    "content": "content",
    "url": "url"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports"

payload = { "tool": "NOTION" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tool":"NOTION"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports"

	payload := strings.NewReader("{\n  \"tool\": \"NOTION\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tool\": \"NOTION\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tool\": \"NOTION\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports', [
  'body' => '{
  "tool": "NOTION"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tool\": \"NOTION\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["tool": "NOTION"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.taktoria.com/api/v1/launches/launchId/artifacts/PRESS_RELEASE/exports")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```