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

# Resources API endpoints

> REST API reference for ErynoaGroup Resources. Create, list, retrieve, update, and delete resources via GET, POST, PUT, and DELETE endpoints.

Resources are the primary objects in ErynoaGroup. Use these endpoints to create, retrieve, update, and delete resources in your workspace.

## List resources

Retrieve a paginated list of all resources in your workspace.

```
GET /v1/resources
```

**Query parameters:**

<ParamField query="status" type="string">
  Filter by resource status. One of: `active`, `inactive`, `archived`.
</ParamField>

<ParamField query="per_page" type="integer">
  Number of results per page. Default: `20`. Maximum: `100`.
</ParamField>

<ParamField query="cursor" type="string">
  Pagination cursor from a previous response's `links.next` URL.
</ParamField>

<ParamField query="sort" type="string">
  Sort field. Prefix with `-` for descending. Example: `-created_at`.
</ParamField>

**Example request:**

```bash theme={null}
curl -X GET "https://api.erynoa.group/v1/resources?status=active&per_page=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Example response:**

```json theme={null}
{
  "data": [
    {
      "id": "res_01HX4K9Z2QBZJMFR5T6VWYP8D",
      "type": "resource",
      "status": "active",
      "name": "My Resource",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": { "total": 1, "page": 1, "per_page": 10 },
  "links": { "next": null, "prev": null }
}
```

***

## Get a resource

Retrieve a single resource by its ID.

```
GET /v1/resources/{id}
```

**Path parameters:**

<ParamField path="id" type="string" required>
  The unique identifier of the resource (e.g., `res_01HX4K9Z2QBZJMFR5T6VWYP8D`).
</ParamField>

**Example request:**

```bash theme={null}
curl -X GET https://api.erynoa.group/v1/resources/res_01HX4K9Z2QBZJMFR5T6VWYP8D \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Example response:**

```json theme={null}
{
  "data": {
    "id": "res_01HX4K9Z2QBZJMFR5T6VWYP8D",
    "type": "resource",
    "status": "active",
    "name": "My Resource",
    "metadata": {},
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

***

## Create a resource

Create a new resource in your workspace.

```
POST /v1/resources
```

**Request body:**

<ParamField body="name" type="string" required>
  A human-readable name for the resource. Maximum 255 characters.
</ParamField>

<ParamField body="type" type="string">
  Resource type. One of: `standard`, `advanced`. Defaults to `standard`.
</ParamField>

<ParamField body="metadata" type="object">
  Up to 50 key-value pairs of custom metadata. Keys and values must be strings.
</ParamField>

**Example request:**

```bash theme={null}
curl -X POST https://api.erynoa.group/v1/resources \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-my-resource-001" \
  -d '{
    "name": "My New Resource",
    "type": "standard",
    "metadata": {
      "customer_id": "cust_789",
      "region": "us-east-1"
    }
  }'
```

**Response:** `201 Created`

```json theme={null}
{
  "data": {
    "id": "res_01HX9P3NXVQMJRFT8K2BWYC7E",
    "type": "resource",
    "status": "active",
    "name": "My New Resource",
    "metadata": {
      "customer_id": "cust_789",
      "region": "us-east-1"
    },
    "created_at": "2024-01-15T11:00:00Z",
    "updated_at": "2024-01-15T11:00:00Z"
  }
}
```

***

## Update a resource

Update an existing resource's attributes.

```
PATCH /v1/resources/{id}
```

**Path parameters:**

<ParamField path="id" type="string" required>
  The unique identifier of the resource to update.
</ParamField>

**Request body:** (all fields optional — only include fields you want to update)

<ParamField body="name" type="string">
  Updated name for the resource.
</ParamField>

<ParamField body="status" type="string">
  Updated status. One of: `active`, `inactive`, `archived`.
</ParamField>

<ParamField body="metadata" type="object">
  Updated metadata. This fully replaces the existing metadata object.
</ParamField>

**Example request:**

```bash theme={null}
curl -X PATCH https://api.erynoa.group/v1/resources/res_01HX4K9Z2QBZJMFR5T6VWYP8D \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "inactive"}'
```

***

## Delete a resource

Permanently delete a resource. This action cannot be undone.

```
DELETE /v1/resources/{id}
```

<Warning>
  Deleting a resource is permanent. Associated data is removed and cannot be recovered.
</Warning>

**Path parameters:**

<ParamField path="id" type="string" required>
  The unique identifier of the resource to delete.
</ParamField>

**Example request:**

```bash theme={null}
curl -X DELETE https://api.erynoa.group/v1/resources/res_01HX4K9Z2QBZJMFR5T6VWYP8D \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Response:** `204 No Content`
