Skip to main content
PATCH
/
api
/
resources
/
{id}
Update Resource
curl --request PATCH \
  --url https://api.example.com/api/resources/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "status": "<string>"
}
'
{
  "data": {
    "resource": {
      "id": 1,
      "project_id": 4,
      "name": "checkout-flow.docx",
      "description": null,
      "status": "uploaded",
      "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "size_bytes": 245000,
      "created_by": "user-id",
      "created_at": "2026-03-20T10:30:00Z",
      "updated_at": "2026-03-20T10:30:01Z"
    }
  }
}
Updates a resource. Use this to:
  • Confirm an upload by setting status to "uploaded" (step 3 of the upload flow)
  • Rename a resource
  • Add a description

Request

Authorization
string
required
Bearer token for authentication. Format: Bearer <your-api-key>
id
number
required
The resource ID.
name
string
New name for the resource.
description
string
Description for the resource.
status
string
Set to "uploaded" to confirm a pending upload.

Response

data.resource
object
The updated resource object.
{
  "data": {
    "resource": {
      "id": 1,
      "project_id": 4,
      "name": "checkout-flow.docx",
      "description": null,
      "status": "uploaded",
      "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "size_bytes": 245000,
      "created_by": "user-id",
      "created_at": "2026-03-20T10:30:00Z",
      "updated_at": "2026-03-20T10:30:01Z"
    }
  }
}

Confirm upload

curl -X PATCH \
  https://dash.empirical.run/api/resources/1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY" \
  -d '{"status": "uploaded"}'

Rename

curl -X PATCH \
  https://dash.empirical.run/api/resources/1 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY" \
  -d '{"name": "checkout-flow-v2.docx"}'