Attachments

Create an attachment key

Changed on

Create an attachment key. Allows attachments to be uploaded separately from the related content.

post/attachments/new-key

Request

Request body multipart/form-data

typestring required

The content type of the attachment. Default types include post, conversation_message. Add-ons may add more.

contextstring[]

Key-value pairs representing the context of the attachment. This will vary depending on content type and the action being taken. See relevant actions for further details.

attachmentstring binary

The first attachment to be associated with the new key.

Response

OK

keystring

The attachment key created. This should be used to upload additional files or to associate uploaded attachments with other content.

Changes

    • breaking

      request body became required

    • breaking

      removed the media type application/json from the request body

    • breaking

      removed the media type application/x-www-form-urlencoded from the request body

    • info

      api operation id post_attachments_new_key removed and replaced with postAttachmentsNewKey

    • info

      the endpoint scheme security XF-Api-Key was added to the API

    • info

      the endpoint scheme security XF-OAuth2 was added to the API

    • info

      added the new optional header request parameter XF-Api-User to all path's operations

    • info

      added the new optional query request parameter api_bypass_permissions to all path's operations

    • info

      added the media type multipart/form-data to the request body

    • breaking

      removed the media type multipart/form-data from the request body

    • warning

      the optional response header XF-Latest-Api-Version removed for the status 200

    • warning

      the optional response header XF-Request-User removed for the status 200

    • warning

      the optional response header XF-Request-User-Extras removed for the status 200

    • warning

      the optional response header XF-Used-Api-Version removed for the status 200

    • info

      api operation id postAttachmentsNewKey removed and replaced with post_attachments_new_key

    • info

      the endpoint scheme security XF-Api-Key was removed from the API

    • info

      the endpoint scheme security XF-OAuth2 was removed from the API

    • info

      request body became optional

    • info

      added the media type application/json to the request body

    • info

      added the media type application/x-www-form-urlencoded to the request body