Upload Attachments
POST /tm/v1/uploads
Operation id: uploadAttachments
Description
Securely upload binary files directly to the server. Returns an array of resource_ids valid for 24 hours. These resource_ids are referenced in the POST /tm/v1/projects payload.
Required permission: projects:create
Parameters
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string (uuid) | Yes | Prevents duplicate creations on network retries. Resubmitting the same key + payload returns the original 201 response. Keys expire after 24 hours. |
X-Request-Id | string (uuid) | No | Client-generated correlation ID for distributed tracing. Echoed in the response. |
Security
- ApiKeyAuth (apiKey)
- API key passed in the
apikeyrequest header.
- API key passed in the
Responses
201 — Upload successful.
| Header | Description |
|---|---|
X-Request-Id | Echoed correlation ID from the request. |
Content type: application/json
400 — Validation error. Required fields missing, invalid dates, or malformed JSON.
Content type: application/json
401 — Missing or invalid authentication.
Content type: application/json
403 — Authenticated but insufficient permissions.
Content type: application/json
413 — File size exceeds the 25 MB limit or total upload exceeds server capacity.
Content type: application/json
429 — Request quota exceeded.
| Header | Description |
|---|---|
Retry-After | Seconds until the client may retry. |
Content type: application/json
500 — An unexpected server error occurred.
Content type: application/json
503 — The service is temporarily unavailable.
| Header | Description |
|---|---|
Retry-After | Estimated seconds until the service recovers. |
Content type: application/json
Request body
Required: Yes
multipart/form-data
Schema
| Property | Type | Required | Description |
|---|---|---|---|
files | array | Yes | Array of files. Max 10 files per request, max 25 MB each. |
{
"type": "object",
"required": [
"files"
],
"properties": {
"files": {
"type": "array",
"description": "Array of files. Max 10 files per request, max 25 MB each.",
"items": {
"type": "string",
"format": "binary"
}
}
}
}
Response models
201 — Upload successful.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
object | string | No | |
expires_at | string (date-time) | No | When the uploaded resource_ids expire (ISO 8601 UTC). |
items | array | No |
{
"type": "object",
"properties": {
"object": {
"type": "string",
"enum": [
"list"
]
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "When the uploaded resource_ids expire (ISO 8601 UTC)."
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"resource_id": {
"type": "string",
"description": "Temporary ID to reference this file in the project creation payload."
},
"original_filename": {
"type": "string"
},
"mime_type": {
"type": "string",
"description": "Detected MIME type (e.g., \"application/pdf\", \"image/png\")."
},
"size_bytes": {
"type": "integer"
}
}
}
}
}
}
400 — Validation error. Required fields missing, invalid dates, or malformed JSON.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"description": "High-level error category."
},
"code": {
"type": "string",
"description": "Machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable message."
},
"param": {
"type": "string",
"description": "The specific field that caused the error (dot-notation path)."
},
"doc_url": {
"type": "string",
"format": "uri"
},
"errors": {
"type": "array",
"description": "Present when multiple fields have errors (batch validation).",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"param": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"error": {
"type": "validation_error",
"code": "invalid_parameter",
"message": "One or more request parameters are invalid.",
"errors": [
{
"code": "required",
"param": "title",
"message": "The 'title' field is required."
},
{
"code": "invalid_format",
"param": "schedule.finish_at",
"message": "Must be a valid ISO 8601 UTC date-time."
}
]
}
}
401 — Missing or invalid authentication.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"description": "High-level error category."
},
"code": {
"type": "string",
"description": "Machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable message."
},
"param": {
"type": "string",
"description": "The specific field that caused the error (dot-notation path)."
},
"doc_url": {
"type": "string",
"format": "uri"
},
"errors": {
"type": "array",
"description": "Present when multiple fields have errors (batch validation).",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"param": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "API key is missing or invalid in the 'apikey' request header."
}
}
403 — Authenticated but insufficient permissions.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"description": "High-level error category."
},
"code": {
"type": "string",
"description": "Machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable message."
},
"param": {
"type": "string",
"description": "The specific field that caused the error (dot-notation path)."
},
"doc_url": {
"type": "string",
"format": "uri"
},
"errors": {
"type": "array",
"description": "Present when multiple fields have errors (batch validation).",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"param": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"error": {
"type": "authorization_error",
"code": "access_denied",
"message": "You do not have permission to perform this action."
}
}
413 — File size exceeds the 25 MB limit or total upload exceeds server capacity.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"description": "High-level error category."
},
"code": {
"type": "string",
"description": "Machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable message."
},
"param": {
"type": "string",
"description": "The specific field that caused the error (dot-notation path)."
},
"doc_url": {
"type": "string",
"format": "uri"
},
"errors": {
"type": "array",
"description": "Present when multiple fields have errors (batch validation).",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"param": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"error": {
"type": "validation_error",
"code": "payload_too_large",
"message": "One or more files exceed the 25 MB size limit."
}
}
429 — Request quota exceeded.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"description": "High-level error category."
},
"code": {
"type": "string",
"description": "Machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable message."
},
"param": {
"type": "string",
"description": "The specific field that caused the error (dot-notation path)."
},
"doc_url": {
"type": "string",
"format": "uri"
},
"errors": {
"type": "array",
"description": "Present when multiple fields have errors (batch validation).",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"param": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Too many requests. Please try again later."
}
}
500 — An unexpected server error occurred.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"description": "High-level error category."
},
"code": {
"type": "string",
"description": "Machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable message."
},
"param": {
"type": "string",
"description": "The specific field that caused the error (dot-notation path)."
},
"doc_url": {
"type": "string",
"format": "uri"
},
"errors": {
"type": "array",
"description": "Present when multiple fields have errors (batch validation).",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"param": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"error": {
"type": "server_error",
"code": "internal_error",
"message": "An unexpected error occurred while processing the request."
}
}
503 — The service is temporarily unavailable.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
error | object | Yes |
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"description": "High-level error category."
},
"code": {
"type": "string",
"description": "Machine-readable error code."
},
"message": {
"type": "string",
"description": "Human-readable message."
},
"param": {
"type": "string",
"description": "The specific field that caused the error (dot-notation path)."
},
"doc_url": {
"type": "string",
"format": "uri"
},
"errors": {
"type": "array",
"description": "Present when multiple fields have errors (batch validation).",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"param": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
Example:
{
"error": {
"type": "server_error",
"code": "service_unavailable",
"message": "The service is temporarily unavailable. Please try again later."
}
}