Skip to content

Update resources

Endpoints listed on this page require project tokens with the update ability. See Authentication for more details.

Full update (PUT)

PUT /v2/resources/{blueprint}/{id}

Replaces all attributes of the resource. All required fields must be provided.

Request body

FieldTypeRequiredDescription
attributesobjectYesComplete set of attributes for the resource
published_atstringNoISO 8601 date. Include to change publication date

Example

bash
curl -X PUT "https://api.diggama.com/v2/resources/posts/gKqv6dx6pBk9" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "attributes": {
      "title": "Updated title",
      "slug": "my-first-post",
      "content": "<p>Updated content</p>"
    }
  }'

Partial update (PATCH)

PATCH /v2/resources/{blueprint}/{id}

Updates only the provided attributes. Fields not included in the request are left unchanged. The attributes field itself is optional — you can send only published_at if needed.

Example

bash
curl -X PATCH "https://api.diggama.com/v2/resources/posts/gKqv6dx6pBk9" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "attributes": {
      "title": "Just update the title"
    }
  }'

Response — 200 OK

Both PUT and PATCH return the updated resource:

json
{
  "data": {
    "id": "gKqv6dx6pBk9",
    "type": "resource",
    "published_at": "2026-01-15T10:30:00+00:00",
    "created_at": "2026-01-10T08:00:00+00:00",
    "updated_at": "2026-02-07T14:00:00+00:00",
    "attributes": {
      "title": "Just update the title",
      "slug": "my-first-post",
      "content": "<p>Hello world</p>"
    },
    "relationships": {
      "blueprint": {
        "data": { "id": "posts", "type": "blueprint" }
      }
    }
  }
}

For updating multiple resources at once, see Bulk operations.

Diggama Documentation