POST /api/v1/forward/resources/registry
Registers an existing resource by ID. This endpoint has upsert semantics: first registration returns 201 Created, while subsequent registration updates return 200 OK.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Content-Type | Yes | application/json |
Idempotency-Key | No | Optional idempotency key for unsafe requests. |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Resource type. Supported values: skill, file, vault, environment. |
resource | object | Yes | Resource object. Only resource.id is used. |
resource.id | string | Yes | Resource ID, such as skill_... or file_.... |
Example request
Example response
HTTP 201 CreatedResponse fields
| Field | Type | Description |
|---|---|---|
id | string | Forward Resource ID. Directly matches the resource ID. |
type | string | Resource type. |
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Missing or unsupported type, missing resource.id, or malformed body. |
| 401 | authentication_error | PAT invalid or expired. |
| 403 | permission_error | Caller has no access to the resource. |
| 404 | not_found_error | Resource does not exist, or declared type does not match actual resource type. |
Notes
- Create or update the resource through the resource API before registering it with Forward.