Create Attachment
CreateAttachment creates an attachment from inline content.
Query Parameters
Optional. The ID to use for the attachment. If empty, a unique ID is generated. Format: ^a-zA-Z0-9?$
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Attachment is a file uploaded by a user, optionally linked to a memo.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/attachments" \ -H "Content-Type: application/json" \ -d '{ "filename": "string", "type": "string" }'{ "name": "string", "creator": "string", "filename": "string", "type": "string", "content": "string", "externalLink": "string", "motionMedia": { "family": "MOTION_MEDIA_FAMILY_UNSPECIFIED", "role": "MOTION_MEDIA_ROLE_UNSPECIFIED", "groupId": "string", "presentationTimestampUs": "string", "hasEmbeddedVideo": true }, "mediaMetadata": { "width": 0, "height": 0, "photo": { "captureTime": { "localDateTime": "string", "utcOffset": "string" }, "location": { "latitude": 0.1, "longitude": 0.1, "altitudeMeters": 0.1 }, "sourceExifOrientation": 0, "cameraMake": "string", "cameraModel": "string", "lensModel": "string", "fNumber": 0.1, "exposureTimeSeconds": 0.1, "iso": 0, "focalLengthMm": 0.1 }, "video": { "durationSeconds": 0.1 } }, "memo": "string", "size": "string", "createTime": "2019-08-24T14:15:22Z"}