> ## Documentation Index
> Fetch the complete documentation index at: https://docs.feedspace.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses

> The status codes the Feedspace API returns, the shape of each response body, and what to do about them.

Every response is JSON, including errors. You will never receive an HTML error page, so you can parse the body without checking the content type first.

## Status Codes

| Code  | Meaning                                                                 | What to do                                                                                                                                           |
| ----- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200` | The request succeeded.                                                  | Read the `data` key.                                                                                                                                 |
| `401` | The credentials were missing, malformed, or wrong.                      | Check your API Key and Secret Key, and that they are Base64 encoded as `api_key:secret_key`.                                                         |
| `403` | The credentials are valid, but this account may not perform the action. | The plan may not include the feature, or the account's role may not allow it.                                                                        |
| `404` | The record does not exist, or belongs to another workspace.             | Check the identifier. See [Identifiers](#identifiers) below, since passing the wrong kind of ID is the most common cause.                            |
| `405` | The path is valid, but not for the HTTP method you used.                | Usually a `POST` sent to an endpoint that expects `PUT`. Use the method shown on the endpoint's page. See [Method not allowed](#method-not-allowed). |
| `422` | The request body failed validation.                                     | Read `errors` to see which field failed.                                                                                                             |
| `500` | Something went wrong on our side.                                       | Retry the request. If it keeps failing, contact support with the time of the request.                                                                |

Every endpoint in this reference can return the codes above. Creates return `200`, not `201`.

One endpoint adds a code specific to what it does:

| Code  | Where                                                                      | Meaning                                                           |
| ----- | -------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| `400` | [Web Link import](/api-reference/ImportReviews/SelfImport/import-web-link) | The link could not be imported. The reason is under `data.error`. |

This is noted on the endpoint's own page.

## Successful Responses

The payload is always under `data`.

```json theme={null}
{
  "data": { }
}
```

Write operations add a human-readable `message`:

```json theme={null}
{
  "message": "Review Form Created Successfully",
  "data": { }
}
```

Some list endpoints return extra top-level keys alongside `data` that the Feedspace dashboard uses for its own display logic. Ignore any key you do not recognise, and do not treat a new one as a breaking change.

<Warning>
  The text, video, and audio review imports return `200` even when the import fails. In that case the body is `{ "data": { "error": "Failed to store reviews." } }` instead of the imported review, so check for `data.error` rather than relying on the status code alone.
</Warning>

## Error Responses

Every error carries a `message` you can show or log.

```json theme={null}
{
  "message": "Review not found."
}
```

### Validation errors

A `422` adds an `errors` object keyed by field name, where each value is an array of messages for that field:

```json theme={null}
{
  "message": "The name field is required.",
  "errors": {
    "name": ["The name field is required."]
  }
}
```

### Method not allowed

A `405` means the path is valid but the HTTP method is not. The message names the accepted methods, and they are also returned in the `Allow` response header:

```json theme={null}
{
  "message": "The POST method is not supported for this route. Supported methods: GET, HEAD, PUT, DELETE."
}
```

The usual cause is updating with the wrong verb. Updating a form is `PUT /forms/{unique_form_id}`, so a `POST` to that path returns `405`.

Note that the review edit endpoints are the opposite: because they accept file uploads, they are called as `POST` with a `_method=PUT` form field, as shown on each of those pages. That same `_method=PUT` field also works on any other update endpoint if your client cannot send a real `PUT`.

### Permission errors

A `403` includes additional boolean flags that the Feedspace dashboard uses to decide which prompt to show the signed-in user. Integrations can ignore them and read `message`.

### Not found

`404` messages name the record type, for example `Review not found.`, `Form not found.`, `Page not found.` or `Workspace not found.`.

A `404` does not always mean the record is gone. Because every request is scoped to one workspace, a record that exists in a different workspace is reported as not found. If you are certain the record exists, confirm you are using the credentials for the workspace that owns it.

## Identifiers

Most `404` responses come from sending the wrong kind of identifier. Feedspace records carry both a numeric `id` and a separate string identifier, and only the string form is accepted:

| Record       | Send this                    | Not this     |
| ------------ | ---------------------------- | ------------ |
| Review form  | `unique_form_id`             | `id`         |
| Page         | `unique_page_id`             | `id`         |
| Review label | the 26-character `id` string | a numeric id |

Reviews are the exception: they are addressed by their numeric `id`, together with the review type in the path, for example `/feeds/text/{id}`.
