# Submissions

> Creators' videos and posts, and reviewing them.

Source: https://www.onlucra.com/docs/api-submissions

A submission is a creator's video in a program. In an organic program it's also linked to the post where it went live, and Lucra measures that post's views.

## Submit work

First [upload the video](https://www.onlucra.com/docs/api-files) with `purpose=submission`. Then submit it, acting as the creator:

```ts
await lucra.as("crtr_026UYfiw1Y6OvUpuKWiOpeL").submissions.create({
  body: {
    program: "prog_00lhuAJjQgdtNt5WnqTBc95",
    file: "file_03d3QVSYynIFwgmYzYd7opT",
    note: "First cut",
  },
})
```

- In an organic program, add `postUrl`: the Instagram or TikTok post the video went live as.
- To resubmit after a revision request, send `revisionOf` with the original `sub_…` ID.
- Submitting accepts any agreements the brand requires for submissions.

## Review

Set `status` to `approved`, `rejected` or `revision_requested`. Add a `note` the creator sees:

```ts
await lucra.submissions.update({
  path: { id: "sub_14XA4WGiSOmaVI3B4QLm4Fs" },
  body: { status: "revision_requested", note: "Trim the intro to three seconds." },
})
```

An approved video can run as an [ad](https://www.onlucra.com/docs/api-ads).

A post in an organic program is approved or rejected once its measurement ends; approving it pays the creator on its measured views. Then release the payment with `{ "payment": "approved" }`. Only the brand's owners and admins, or its own key, can do that.

## Brand videos

A brand can add its own finished video to its library: upload it with `purpose=ad_creative`, then create a submission with `{ "file", "name" }` and no `program`.

## Endpoints

- `GET /v1/submissions` (read, SDK `lucra.submissions.list`): List submissions
- `GET /v1/submissions/:id` (read, SDK `lucra.submissions.retrieve`): Get a submission
- `POST /v1/submissions` (write, SDK `lucra.submissions.create`): Submit work as a creator, or add a brand's own video, or an existing TikTok post to boost, to its library
- `PATCH /v1/submissions/:id` (write, SDK `lucra.submissions.update`): Review, tag, file or archive a submission, or approve paying for a post; as its creator, withdraw it
