# Submit from your app

Send requests from your own feedback form, on any platform, into Signals.

Your own feedback form can send each request to Frostbyte. It works from a desktop or mobile app, a game, or a form on your website, and each request lands in [User Signals](https://getfrostbyte.dev/docs/signals) like a [portal](https://getfrostbyte.dev/docs/feedback-portal-overview) post.

**When to use it.** Use it when you already have a feedback form, or want one that looks like the rest of your product. If you'd rather not build one, the [feedback widget](https://getfrostbyte.dev/docs/embed-widget) is a ready-made button for your site, on Indie and Studio.

## Get your submit URL

1. Open **User Signals → Portal settings** and go to the **Connect** tab.
2. Choose **Your own form**. The **Endpoint** tab shows your submit URL: your portal's address with `/submit` on the end, such as `https://rollcall.getfrostbyte.dev/submit`.
3. Copy the JavaScript, Swift or curl example and send a test request.
4. Check it arrives in User Signals, then wire the same request into your form.

![The Connect tab with Your own form chosen: the types the plan accepts, then JavaScript, Swift, curl and Endpoint examples with Copy code.](https://getfrostbyte.dev/images/docs/portal-app-submit.webp "The examples already use your submit URL. Pick JavaScript, Swift, curl or Endpoint.")

If you change your portal's address in **Domains**, the submit URL changes with it. Copy it again and update your app.

## Send a request

POST JSON to the submit URL. There's no key or sign-in: the URL is enough.

**curl**

```bash
curl -X POST https://rollcall.getfrostbyte.dev/submit \
  -H "Content-Type: application/json" \
  -d '{"type":"bug","title":"Camera opens sideways on iPad","submitterEmail":"jordan@example.com"}'
```

**Swift**

```swift
var request = URLRequest(url: URL(string: "https://rollcall.getfrostbyte.dev/submit")!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try JSONEncoder().encode([
    "type": "bug",
    "title": title,
    "description": details,
    "submitterEmail": email,
    "userAgent": "RollCall 1.1.0 (iPadOS 18.1)",
])
let (data, response) = try await URLSession.shared.data(for: request)
if (response as? HTTPURLResponse)?.statusCode != 200 {
    // data is JSON with a "message" to show the person
}
```

**JavaScript**

```js
const res = await fetch("https://rollcall.getfrostbyte.dev/submit", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ type: "bug", title, description, submitterEmail: email }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.message);
```

A form on any website can call it from the browser. It accepts requests from any origin and your page can read the response. Leave out cookies and credentials: it needs neither.

## Fields

| Field | Required | What it does |
|---|---|---|
| `type` | Yes | `bug` on every plan. `feature` and `feedback` need Indie or Studio. Each type must be on in **Portal settings → General**. |
| `title` | Yes | Up to 200 characters. Shows on your public portal. |
| `description` | No | Up to 5,000 characters. Shows on your public portal. |
| `submitterEmail` | No | Lets you reply, and lets the person get the "shipped" email when their request is released. Private. |
| `submitterName` | No | Up to 100 characters. Shows as **Reported by** on the signal. Private. |
| `identityToken` | No | A [signed user identity](https://getfrostbyte.dev/docs/feedback-portal-signed-in-users). Replaces `submitterEmail` and `submitterName`. A bad or expired token returns `400` with `IDENTITY_INVALID`. Needs Studio with **Signed-in users** on; otherwise it's ignored. |
| `stepsToReproduce` | No, bugs only | Up to 5,000 characters. Private. |
| `userAgent` | No, bugs only | Up to 400 characters. Your app's name, version and OS work well here. Private. |
| `pageUrl` | No, bugs only | An `https://` or `http://` address, such as the screen's web URL. Private. |

To attach screenshots, send `multipart/form-data` with the same fields and up to 3 files named `files`, 2 MB each: JPG, PNG, WebP, PDF, TXT or CSV.

## Responses

A successful request returns `200` with `{"ok": true}`. Errors return JSON with a `message` you can show the person, apart from a `404` on a wrong address.

| Status | Means |
|---|---|
| `400` | A field is missing, too long or invalid, that type is off, or there are more than 3 files. `field` names the field when one is at fault. |
| `403` | `code` is `PLAN_FEATURE_LOCKED` when the type needs Indie, or `PORTAL_PAUSED` when User Signals is turned off. |
| `404` | The address is wrong or the portal is turned off. |
| `413` or `422` | An attachment is too big or isn't an allowed type. |
| `429` | Too many submissions. Wait the number of seconds in the `Retry-After` header when it's sent, otherwise try later. |
| `503` | Try again shortly. When `field` is `files`, attachments aren't available: send without them. |
| `500` | Something went wrong, such as an attachment that couldn't be stored. Try again. |

## Things to note

- **Titles and descriptions are public.** They show on your portal as soon as they arrive. Names, emails, steps, `userAgent` and `pageUrl` stay private. To take a post down, set it to **Hidden** in Signals.
- **Send from the person's device, not your server.** Each IP address can send 10 requests an hour, counted across every Frostbyte portal, and each submit URL takes 60 an hour. Up to 5 a day come from one email address, or from one IP address when there's no email. If your server relays every request, they all share its limit.
- **Don't send a field named `website`.** It catches spam bots: a request that includes it returns `200` but is dropped.
- **Use the `https` address.** Plain `http` requests get a redirect, which browsers block and curl doesn't follow, so nothing arrives.

## Related

- [Signals](https://getfrostbyte.dev/docs/signals): review what your app sends.
- [Widget](https://getfrostbyte.dev/docs/embed-widget): a ready-made feedback button for your website.
- [Feedback Portal](https://getfrostbyte.dev/docs/feedback-portal-overview): the public page your requests appear on.
- [Plans & limits](https://getfrostbyte.dev/docs/plans-and-limits): which types each plan accepts.
