Upload an incident attachment
Uploads one incident attachment and returns its stored filename, media type, size and identifier.
POST https://app.upfour.io/v1/incidents/{incidentID}/attachments
Parameters
| Field | Type | Description |
|---|---|---|
incidentID required | uuid | path parameter |
Body
filefilerequired
Returns
A successful request returns 201 with application/json.
Response fields 1 top-level fields
| Field | Type | Description | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | IncidentAttachment | ||||||||||||||||||||||||||||
IncidentAttachment · 8 fields
| |||||||||||||||||||||||||||||
Errors
Only the errors this operation can return. Every error uses the same envelope.
| Status | Code | Meaning |
|---|---|---|
| 400 | attachment_empty | The attachment file is empty. When: Uploading an incident attachment of zero bytes. Fix: Upload a file that has content. Stable codes next to the English message: attachment_empty (the file has no content), attachment_type_unsupported (only images, PDF, text, CSV and JSON can be attached), upload_no_file (the form has no file part), upload_invalid (the multipart form could not be read). |
| 413 | attachment_too_large | The attachment is over the size limit. When: Uploading an incident attachment larger than the limit; details.max_bytes gives it. Fix: Compress or split the file below details.max_bytes. attachment_too_large: the file is larger than 10 MB (error.details.max_bytes). A proxy in front of the API may answer 413 with a plain HTML body and no code. |
| 400 | attachment_type_unsupported | The attachment's file type is not accepted. When: Uploading an incident attachment whose MIME type is not on the allowed list. Fix: Upload a file of an allowed type. |
| 400 | bad_request | The request is malformed or fails validation. |
| 402 | billing_action_unavailable | The Company's billing state does not allow this action. When: A metered or limited action while the billing state, such as paused or without credit, blocks it; details holds the action and billing_state. Fix: Top up the credit or change the plan, then retry. |
| 404 | not_found | The requested resource does not exist or is outside the caller's scope. |
| 403 | permission_denied | The credentials do not permit this action. |
| 503 | quota_gate_unavailable | The limit check itself failed, so the action was not carried out. When: The quota service could not decide while the request ran. Fix: Retry in a moment; nothing was changed. |
| 403 / 429 | quota_limit_reached | A usage or inventory limit of the Company was reached. When: Counters and concurrency limits answer 429 with Retry-After, inventory and capacity limits answer 403; details holds purpose, limit and window. Fix: On 429 wait Retry-After seconds; on 403 free something up, request a higher limit where details.raise_request is true, or buy an extension. |
| 200 / 410 / 413 / 422 | request_failed | The request could not be completed. |
| 503 | service_unavailable | The service or a required dependency is temporarily unavailable. |
| 400 | upload_invalid | The upload could not be read as a multipart form. When: A body that is not a valid multipart form, or whose file cannot be parsed. Fix: Send a well-formed multipart/form-data request. |
| 400 | upload_no_file | The multipart request has no file part. When: An upload request without a file field. Fix: Send the file as multipart/form-data in the field the operation names. |
Every call can also return unauthorized (401), rate_limit_exceeded (429) or internal_error (500 / 502). See Responses and errors.