API Reference
Resources API
Create, read, update, and delete resources in your workspace.
List resources
GET /v1/resourcesQuery parameters
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by resource type |
limit | integer | Results per page (default: 20, max: 100) |
cursor | string | Pagination cursor from previous response |
Response
{
"data": [
{
"id": "res_01j...",
"type": "contact",
"fields": {
"email": "jane@example.com",
"name": "Jane Doe"
},
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
],
"meta": {
"nextCursor": "cursor_...",
"hasMore": true
}
}Get resource
GET /v1/resources/:idResponse
{
"data": {
"id": "res_01j...",
"type": "contact",
"fields": { ... },
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
}Create resource
POST /v1/resourcesBody
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Resource type |
fields | object | Yes | Key-value pairs for the resource |
Request
curl -X POST https://api.amarsia.com/v1/resources \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"type": "contact",
"fields": {
"email": "jane@example.com",
"name": "Jane Doe"
}
}'Response: 201 Created
{
"data": {
"id": "res_01j...",
"type": "contact",
"fields": {
"email": "jane@example.com",
"name": "Jane Doe"
},
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z"
}
}Update resource
Performs a partial update — only the fields you include are changed.
PATCH /v1/resources/:idBody
| Field | Type | Required | Description |
|---|---|---|---|
fields | object | Yes | Fields to update |
Delete resource
DELETE /v1/resources/:idResponse: 204 No Content