{"_id":"58c6abd26ce7c11b0026fdbd","user":"54870d54f907080b00fc49cd","parentDoc":null,"project":"54870ea47810260b001c36ab","version":{"_id":"54870ea57810260b001c36ae","project":"54870ea47810260b001c36ab","__v":17,"createdAt":"2014-12-09T15:00:53.237Z","releaseDate":"2014-12-09T15:00:53.237Z","categories":["54870ea57810260b001c36af","5487116f7810260b001c36b5","548711797810260b001c36b6","548711807810260b001c36b7","548713127810260b001c36bd","548713247810260b001c36be","548713aa7810260b001c36c0","548713c2f907080b00fc49d5","548713eef907080b00fc49d9","54871a0db3441a1f00f20d78","54871b15b3441a1f00f20d7e","54871cbeb3441a1f00f20d87","548817fac178b40b00aa2eec","558a6dd975eaf50d004e4bf5","558a6e37dbe5b63700f8d1fe","56795d8c07bf6a0d0083ee9e","583e9d764ced340f00b05a5c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":3,"category":{"_id":"558a6dd975eaf50d004e4bf5","version":"54870ea57810260b001c36ae","pages":["558a6e098d30cb2300873e1a","558a6e88dbe5b63700f8d201","558a6e9275eaf50d004e4bfa","558a6e9a8d30cb2300873e1c","558a79f2dbe5b63700f8d23f","5592abfb6bf22f170075b823","55a65e4580c8a30d00b32618","55ba22f804775a2f006280aa","55ba2648b3612925009d66f0","56045138e416560d00fa6484","560452e4e5102a0d0070f965","560455090c78b00d0039b18b","56176873a410c90d00c612aa","56176a014d9e4a17002a0e05","5628d38e0653060d00a2f7d9","5628d5d748742a0d0047456d","56a669cffb12a40d006c4826"],"__v":17,"project":"54870ea47810260b001c36ab","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-24T08:44:09.019Z","from_sync":false,"order":4,"slug":"api","title":"API"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-03-13T14:25:22.678Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","results":{"codes":[{"status":200,"language":"json","code":"\t{ site: 1000, doc: 'doc_file_name' }","name":""},{"status":422,"language":"json","code":"{ error: \"Doc name can't be blank\" }\n{ error: \"Doc has to be provided as a base64 string\" }","name":""},{"code":"{ error: \"Couldn't find project to attach the document\" }","language":"json","status":404},{"status":401,"language":"text","code":""}]},"settings":"","examples":{"codes":[]},"auth":"required","params":[{"_id":"58c6abd26ce7c11b0026fdbf","ref":"","in":"path","required":true,"desc":"Your project id or your own client_internal_unique_id. The site will be search first by client_internal_unique_id and if not found will be search by id.","default":"","type":"int","name":"site_id"},{"_id":"58c6b05ba0f8c81b00718a84","ref":"","in":"body","required":true,"desc":"Your authentication token.","default":"","type":"string","name":"auth_token"},{"_id":"58c6adf9cd7bf7250083a653","ref":"","in":"body","required":true,"desc":"Your doc name","default":"","type":"string","name":"doc_name"},{"_id":"58c6abd26ce7c11b0026fdbe","ref":"","in":"body","required":true,"desc":"Base64 encoded file string.","default":"","type":"string","name":"doc_content"}],"url":"/sites/:site_id/doc"},"isReference":false,"order":18,"body":"----------------------------\n## Important!\n----------------------------\n\nNote: unfortunately, it is not possible to try out a PDF creation in this page, since the Base64 encoding string is too big to try out over here.\n\nIt should be possible however to try it out in your own programming language, encoding the file first as Base64.\n\nYou can also try it with the Chroome extension: \"*Restlet Client*\"\n\nPlease contact support if you have further questions on this.","excerpt":"","slug":"creating-a-doc-for-a-project","type":"endpoint","title":"Creating a doc for a project"}

postCreating a doc for a project


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

site_id:
required
integer
Your project id or your own client_internal_unique_id. The site will be search first by client_internal_unique_id and if not found will be search by id.

Body Params

auth_token:
required
string
Your authentication token.
doc_name:
required
string
Your doc name
doc_content:
required
string
Base64 encoded file string.

Result Format


Documentation

---------------------------- ## Important! ---------------------------- Note: unfortunately, it is not possible to try out a PDF creation in this page, since the Base64 encoding string is too big to try out over here. It should be possible however to try it out in your own programming language, encoding the file first as Base64. You can also try it with the Chroome extension: "*Restlet Client*" Please contact support if you have further questions on this.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}