POST/boards/{boardId}/posts/{postId}/attachments

Adds an attachment to a post.

Note
For how to upload content using the API, see Upload or Download Files.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

board

HTTP Request

POSThttps://www.worksapis.com/v1.0/boards/{boardId}/posts/{postId}/attachments

Path Parameters

ParameterTypeDescription
boardId integer 

Board ID


required
example : 100
format : int64 
postId integer 

Post ID


required
example : 1
format : int64 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Request Body

PropertyTypeDescription
fileName string 

Attachment file name


required
minLength : 1
maxLength : 200 
fileSize integer 

Attachment file size (in bytes)


required
minimum : 1
maximum : 2147483648
format : int64 
contentType string 

content-type


required
writeOnly : true 

Request Example

example

1{2  "fileName": "ExampleFile.pdf",3  "fileSize": 10240000,4  "contentType": "application/pdf"5}

Response

HTTP 200

OK

PropertyTypeDescription
uploadUrl string 

Attachment upload URL


required
format : uri 

Response Example

example

1{2  "uploadUrl": "https://apis-storage.worksmobile.com/v1/openapi/home/files/v2-10107670-556109220.294627924"3}

HTTP 403

Forbidden