Media
Returns a one-time URL to PUT the file to (10 minutes), then call complete. Limits: image 16 MB (jpg, png), video 40 MB (mp4, mov, 3gp), voice 16 MB (ogg, m4a, wav, mp3), document 100 MB.
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
application/json- body
kind*MediaKind"image""video""voice""document"filename*string1 <= length <= 200Upload slot.
application/json- response
id*stringuuidupload_url*stringPUT the file body here (header Content-Type set), then call complete.
uriexpires_at*stringISO 8601 date-time with offset.
date-timemax_bytes*integerallowed_extensions*array<string>curl -X POST 'https://app.groupilot.com/api/v1/media/uploads' \ -H 'Content-Type: application/json' \ -d '{ "kind": "image", "filename": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "upload_url": "http://example.com", "expires_at": "2019-08-24T14:15:22Z", "max_bytes": 0, "allowed_extensions": [ "string" ]}Checks the uploaded file's type and size; a file outside the limits is deleted and refused.
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
id*stringuuidReady to use.
application/json- response
id*stringuuidkind*MediaKind"image""video""voice""document"media_url*stringUse it as media_url of a message.
uribytes*integercontent_type*stringcurl -X POST 'https://app.groupilot.com/api/v1/media/uploads/497f6eca-6276-4993-bfeb-53cbbbba6f08/complete'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "image", "media_url": "http://example.com", "bytes": 0, "content_type": "string"}Groupilot downloads the file (HTTPS, public host, 40 MB max) and stores it.
bearerAuthAuthorizationBearer <token>An API key created in Settings > Integrations (gp_live_…), or an OAuth access token.
application/json- body
kind*MediaKind"image""video""voice""document"url*stringurilength <= 2000filename?string1 <= length <= 200Stored.
application/json- response
id*stringuuidkind*MediaKind"image""video""voice""document"media_url*stringUse it as media_url of a message.
uribytes*integercontent_type*stringcurl -X POST 'https://app.groupilot.com/api/v1/media/import' \ -H 'Content-Type: application/json' \ -d '{ "kind": "image", "url": "http://example.com"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "image", "media_url": "http://example.com", "bytes": 0, "content_type": "string"}