Skip to content

Reserve an attachment on any ticket (admin)

POST
/api/v1/admin/tickets/{ticketID}/attachments
curl --request POST \
--url https://api.aetherplatform.cloud/api/v1/admin/tickets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "filename": "example", "content_type": "example", "size_bytes": 1 }'

Provider-side equivalent of the tenant presign-upload: reserves a pending attachment on any ticket (the ticket’s org is resolved for the metadata row) and returns a presigned PUT URL. Same allowlist/size limits and 503-when-unconfigured behavior. Confirm by referencing the attachment_id in attachment_ids on a provider reply. Requires the platform-admin realm role.

ticketID
required
string format: uuid

Support ticket UUID.

Media typeapplication/json
object
filename
required
string
content_type
required

Must be on the server allowlist (images, application/pdf, text/plain, application/json, yaml, gzip, tar). Other types are rejected (422).

string
size_bytes
required

File size in bytes; must be in (0, 26214400] (25 MiB).

integer format: int64
Examplegenerated
{
"filename": "example",
"content_type": "example",
"size_bytes": 1
}

Attachment reserved; upload URL issued.

Media typeapplication/json
object
attachment_id
required

Reference this id in a message’s attachment_ids to confirm the upload.

string format: uuid
upload_url
required

Short-lived presigned PUT URL; upload bytes directly here with the matching Content-Type.

string format: uri
Examplegenerated
{
"attachment_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"upload_url": "https://example.com"
}

Malformed request — e.g. an invalid path UUID or an unparseable JSON body.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable error code.

string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable error code.

string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}
}

The credential was accepted but lacks the required role or access (e.g. a non-platform-admin calling an /api/v1/admin endpoint).

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable error code.

string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}
}

The requested resource was not found.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable error code.

string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}
}

Request validation failed.

Media typeapplication/json
object
error
required
object
code
required

A stable, machine-readable error code.

string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"code": "example",
"message": "example"
}
]
}
}

Attachment storage is not configured.