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

# Responses and errors

> The response envelope, HTTP status codes, validation errors and request IDs.

## Successful responses

Successful responses are JSON objects with `ok: true`. The payload, when there is one, is in `data`:

```json theme={null}
{
  "ok": true,
  "message": "Bookmark created!",
  "data": {
    "id": "bmk_...",
    "url": "https://example.com"
  }
}
```

Some actions return only `ok` and `message`. The SDKs resolve to `data` directly.

A few endpoints don't use JSON: [collection RSS feeds](https://docs.linkvite.io/api-reference/profiles/get-profile-bookmarks-as-rss-feed.md) return XML.

## Errors

Errors return `ok: false`, a message, and the request ID:

```json theme={null}
{
  "ok": false,
  "error": "Validation error",
  "errors": {
    "url": "required"
  },
  "request_id": "8a1b2c3d4e5f6789-IAD"
}
```

| Field | |
| - | - |
| `error` | Human-readable message |
| `errors` | For validation errors: field → problem |
| `request_id` | Identifies the request; also in the `X-Request-ID` header of every response |

## Status codes

| Status | Meaning |
| - | - |
| `200`, `201` | Success |
| `400` | Validation failed (see `errors`), or a malformed parameter |
| `401` | Missing, invalid or expired credentials |
| `402` | The action needs [Linkvite Pro](https://docs.linkvite.io/guides/plans.md) |
| `403` | Not allowed: an OAuth token without the needed [scope](https://docs.linkvite.io/developers/scopes.md), or no access to the collection |
| `404` | Not found, or not visible to you |
| `422` | The request body couldn't be parsed |
| `429` | [Rate limited](https://docs.linkvite.io/developers/rate-limits.md) |
| `5xx` | Server error; safe to retry idempotent requests with backoff |

> [!TIP]
>
> When you contact support about a failed request, include its `request_id`.

## In the SDKs

```javascript JavaScript theme={null}
import {LinkviteError} from '@linkvite/js';

try {
	await linkvite.bookmarks.create({url: ''});
} catch (err) {
	if (err instanceof LinkviteError) {
		console.log(err.status, err.errors, err.requestId);
	}
}
```

```go Go theme={null}
_, err := client.Bookmarks.Create(ctx, &linkvite.CreateBookmarkRequest{})
var e *linkvite.Error
if errors.As(err, &e) {
	log.Println(e.Status, e.Errors, e.RequestID)
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.