Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsCreate Task Photo Upload Grant
Search the full API reference Esc to close

Create Task Photo Upload Grant

Tasks · REST API reference

Get support
POST/v1/tasks/{task_id}/photos
Start the upload of one photo of a task. Answers 201 with where to send the file and the photo's id.

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request POST \
  --url 'https://api.staging.facily.ai/v1/tasks/<TASK_ID>/photos' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "declared_size_bytes": 0,
  "document_type": "string",
  "mime_type": "string",
  "title": "string",
  "unit_id": "00000000-0000-4000-8000-000000000001"
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

task_idpath · stringrequired

Format: uuid

Request body

application/json · Required

declared_size_bytesintegerrequired

The file's size in bytes, at most 10,485,760 (10 MB).

document_typestringrequired

The photo's type: task_photo_proof for a photo that shows the work was done, task_photo_reference for any other photo. A work order also takes task_photo_before and task_photo_after, and an after photo counts toward completing it as a proof photo does. An inspection also takes task_photo_finding, one for each finding, sent with that finding's unit_id.

mime_typestringrequired

The file's type: image/jpeg, image/png or image/webp.

titlestring | null

A label for the photo, such as its file name, up to 255 characters. Blank means none.

Max length: 255

Show title schema
string | null

A label for the photo, such as its file name, up to 255 characters. Blank means none.

Variant 1: string
string
Variant 2: null
null
unit_idstring | null

For a task_photo_finding photo, the unit of the inspection finding it belongs to; required there and refused with any other type.

Format: uuid

Show unit_id schema
string | null

For a task_photo_finding photo, the unit of the inspection finding it belongs to; required there and refused with any other type.

Variant 1: string
string
Variant 2: null
null

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

201Successful Response
JSON · generated example
{
  "data": {
    "document_id": "00000000-0000-4000-8000-000000000001",
    "expires_at": "2026-10-29T12:00:00Z",
    "fields": {},
    "upload_url": "string"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataTaskPhotoUploadGrantResponserequired

Where the browser uploads the photo, and the photo's id to confirm it with.

Show data schema
document_idstringrequired

The photo's id. Send it to the confirm route once the file is uploaded.

Format: uuid

expires_atstringrequired

When the upload form stops being accepted, 5 minutes after the grant.

Format: date-time

fieldsobjectrequired

The signed form fields to post before the file.

upload_urlstringrequired

Where the browser posts the file, as a multipart form with fields.

metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll tasks operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Create Task Photo Upload Grant | Facily Developers