{"info":{"_postman_id":"1a0c8ed0-6203-4728-b898-917d4d6c264f","name":"API documentation","description":"<html><head></head><body><h2 id=\"overview\">Overview</h2>\n<p>This API provides a set of HTTPS endpoints to interact with your account on Choppity.com. Currently only a few important endpoints exist. More endpoints will be added over time. <a href=\"https://choppity.com/contact\">Contact us</a> to request a specific new endpoint to be added to the API.</p>\n<h2 id=\"getting-started\"><strong>Getting started</strong></h2>\n<p>To start using the API:</p>\n<ul>\n<li><p>You must use a valid API Key to send requests to the API endpoints. You can get your API key from <a href=\"https://choppity.com/account\">your account page</a>. You must be a paying Choppity customer to use the API.</p>\n</li>\n<li><p>The API has rate and usage limits.</p>\n</li>\n<li><p>The API only responds to HTTPS-secured communications.</p>\n</li>\n<li><p>The API returns request responses in JSON format. When an API request returns an error, it is sent in the JSON response as an error key.</p>\n</li>\n<li><p>Many of the requests are long running. Therefore, instead of sending a response straight away, the API will send a POST request to a webhook url provided by you once the request has been completed. You can also optionally supply a header which will be used in the POST request (this can be used for authentication for example).</p>\n</li>\n</ul>\n<p><em><strong>NOTE:</strong></em> The example code snippets provided in this documentation always show a request method of \"GET\". This should be replaced with the appropriate request method e.g. \"POST\".</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>The Choppity API uses the 'Authorization' header for authentication. Every request must include a header with the name \"Authorization' and the value 'Key YOUR_API_KEY'.</p>\n<h3 id=\"authentication-error-response\">Authentication error response</h3>\n<p>If an API key is missing, malformed, or invalid, or if you attempt to access a resource you don't own (e.g. a project or a template) you will receive a HTTP 401 Unauthorized response code.</p>\n<h2 id=\"status-codes\">Status codes</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Code</th>\n<th>Status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK</td>\n<td>Request was successful.</td>\n</tr>\n<tr>\n<td>400</td>\n<td>Bad request</td>\n<td>The request failed due to an invalid request.</td>\n</tr>\n<tr>\n<td>401</td>\n<td>Unauthorized</td>\n<td>Missing or invalid API key.</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not found</td>\n<td>The requested resource doesn’t exist.</td>\n</tr>\n<tr>\n<td>429</td>\n<td>Too many requests</td>\n<td>Too many requests were sent to the API.</td>\n</tr>\n<tr>\n<td>500</td>\n<td>Server error</td>\n<td>Something went wrong on Choppity's end.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"template-ids\">Template IDs</h2>\n<p>For certain API requests, it is possible to supply a <code>templateId</code> parameter. To find the IDs for your templates, open a project, click the templates button in the header, click the 3 vertical dots, and then click \"View API IDs\". Use the image below as reference.</p>\n<img src=\"https://choppity-resources.s3.eu-west-2.amazonaws.com/docs/templateIds.png\">\n\n<h3 id=\"need-some-help\"><strong>Need some help?</strong></h3>\n<p>Please contact Aaron, our CTO (email: <a href=\"https://mailto:aaron@choppity.com\">aaron@choppity.com</a>), he's always happy to help!</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"33432036","collectionId":"1a0c8ed0-6203-4728-b898-917d4d6c264f","publishedId":"2sA3XPBhNX","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"6329BC"},"publishDate":"2024-06-12T15:53:18.000Z"},"item":[{"name":"Asset","item":[{"name":"Create an asset","event":[{"listen":"test","script":{"id":"538c0b6c-b66e-4f94-8068-f565303bfbbd","exec":[""],"type":"text/javascript","packages":{}}}],"id":"4c34b32a-dccc-49a6-bd85-5f7170ac13e6","request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"url\": \"https://choppity-resources.s3.eu-west-2.amazonaws.com/docs/example.mp4\",\r\n    \"name\": \"Example video\",\r\n    \"type\": \"video\",\r\n    \"templateId\": \"abc-123\",\r\n    \"languageCode\": \"en\",\r\n    \"webhook\": {\r\n        \"url\":\"https://example.com/choppity-webhook\",\r\n        \"header\":{\r\n            \"name\": \"webhook-secret\",\r\n            \"value\": \"webhook-secret-value\"\r\n        }\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.choppity.com/v1/asset","description":"<p>Create an asset. Post a video url and Choppity will analyse the video and generate projects automatically. The response will be sent as a POST request to the provided webhook url.</p>\n","urlObject":{"path":["asset"],"host":["https://api.choppity.com/v1"],"query":[],"variable":[]}},"response":[{"id":"d5491a31-d9b4-4fef-82a2-dbda2e80cead","name":"Webhook Response","originalRequest":{"method":"GET","header":[],"url":""},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":{"content":"","type":"text/plain"}}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"statusCode\": 200,\n    \"type\": \"asset\",\n    \"id\": \"asset-id-123\",\n    \"projects\":[\"project-id-123\", \"project-id-124\"]\n}"},{"id":"9bdf36e2-434b-49dc-93fa-3f8b62559491","name":"Success","originalRequest":{"method":"GET","header":[],"url":""},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"asset-id-123\"\n}"}],"_postman_id":"4c34b32a-dccc-49a6-bd85-5f7170ac13e6"}],"id":"438f2fef-821d-41c1-b6ae-19c43b2d2860","description":"<p>The <code>/asset</code> endpoints allows management of assets in Choppity.</p>\n","_postman_id":"438f2fef-821d-41c1-b6ae-19c43b2d2860"},{"name":"Render","item":[{"name":"Render a project","event":[{"listen":"test","script":{"id":"538c0b6c-b66e-4f94-8068-f565303bfbbd","exec":[""],"type":"text/javascript","packages":{}}}],"id":"1beb3555-1e52-4065-8d66-7653983042aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"webhook\": {\r\n        \"url\":\"https://example.com/choppity-webhook\",\r\n        \"header\":{\r\n            \"name\": \"webhook-secret\",\r\n            \"value\": \"webhook-secret-value\"\r\n        }\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"https://api.choppity.com/v1/render/:pid","description":"<p>Renders a project with the given <code>pid</code> (project id) to an mp4 video file. The response contains a url to an mp4 file hosted by Choppity. The response will be sent as a POST request to the provided webhook url. The mp4 file expires after 24 hours.</p>\n","urlObject":{"path":["render",":pid"],"host":["https://api.choppity.com/v1"],"query":[],"variable":[{"type":"any","value":"","key":"pid"}]}},"response":[{"id":"d234f685-340c-48a8-8d61-32402639d654","name":"Webhook Response","originalRequest":{"method":"GET","header":[],"url":""},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json","description":{"content":"","type":"text/plain"}}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"statusCode\": 200,\n    \"type\": \"render\",\n    \"id\": \"project-id-123\",\n    \"url\": \"https://choppity.../render/example.mp4\"\n}"},{"id":"cdd1bcd1-4b57-4a9a-baa0-2475193acf36","name":"Success","originalRequest":{"method":"GET","header":[],"url":""},"status":"OK","code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"1beb3555-1e52-4065-8d66-7653983042aa"}],"id":"2f6b4bd9-1390-4e86-90d9-8df5509d3aa7","description":"<p>The <code>/render</code> endpoint enables rendering a project to an mp4 file.</p>\n","_postman_id":"2f6b4bd9-1390-4e86-90d9-8df5509d3aa7"}],"event":[{"listen":"prerequest","script":{"id":"b8bbfdb5-8043-41ee-a9f1-095319c78858","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"26b726b3-ff7a-42c6-91fd-941593b50b8d","type":"text/javascript","exec":[""]}}],"variable":[{"key":"url","value":"https://api.choppity.com/v1"}]}