Attachments

Create an attachment

Changed on

Creating an attachment object creates a database record and returns the inputs needed to generate a signed url and upload the file from the client to cloud storage.

post/attachments.create

Request

  • Base URL
    https://app.getoutline.com/api
  • URL
    https://app.getoutline.com/api/attachments.create
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://app.getoutline.com/oauth/authorize
      Token URL: https://app.getoutline.com/oauth/token scopes: read, write

Request body

namestring required

Name of the file attachment.

documentIdstring uuid

Identifier for the associated document, if any.

contentTypestring required

MIME type of the file attachment.

sizeinteger required

Size of the file attachment in bytes.

Example request

{
  "name": "image.png",
  "contentType": "image/png"
}

Response

OK

Example response

{
  "data": {
    "attachment": {
      "contentType": "image/png"
    }
  }
}

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • breaking

      the response property // became nullable for the status

    • breaking

      the // response's property type changed from number to string for status

    • info

      added the optional property // to the response with the status