{"__v":1,"_id":"58640f552e42bc0f00fbdcf4","category":{"__v":0,"_id":"57f53fb368a53b2000e03f0f","project":"5588b8a2f6c18d0d005bba03","version":"5588b8a2f6c18d0d005bba06","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-10-05T18:00:19.547Z","from_sync":false,"order":0,"slug":"api","title":"REST API"},"parentDoc":null,"project":"5588b8a2f6c18d0d005bba03","user":"5588b847f6c18d0d005bba01","version":{"__v":14,"_id":"5588b8a2f6c18d0d005bba06","project":"5588b8a2f6c18d0d005bba03","createdAt":"2015-06-23T01:38:42.696Z","releaseDate":"2015-06-23T01:38:42.696Z","categories":["5588b8a3f6c18d0d005bba07","5588e9689cfea70d00371df3","5588f5921163180d00b64704","561598b121e9110d0078025a","5616f1c9d170d00d00189306","5616f5c3a410c90d00c6121e","561803dcf8c9632100ac7592","563667280441020d0000e9eb","5642570d9417b40d00c0fcd3","57bf5f02efe0050e00d50bd5","57f53fb368a53b2000e03f0f","57f55187440418170086325a","582e3afa72fd270f0006926d","5841faa973967b0f004b4a2b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-28T19:15:33.474Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"curl","code":"curl -XPOST -H 'X-API-Token: <your token>' -H \"Content-type: application/json\" -d '{\n  title: \"My test snippet\",\n  source: \"<div>My snippet</div>\"\n}' https://api.mixmax.com/v1/snippettags/586346d00000000000000000/snippets"}]},"method":"post","results":{"codes":[{"status":200,"language":"json","code":"{\n  _id: \"586346d00000000000000000\",\n  userId: \"586346d00000000000000000\",\n  createdAt: 1478122191866,\n  savedAt: 1478122199067,\n  title: \"My test snippet\",\n  source: \"<div>My snippet</div>\",\n  name: \"\",\n  shared: []\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"58640253e024922500d366e8","ref":"","in":"path","required":true,"desc":"Snippet tag _id","default":"","type":"string","name":"id"},{"_id":"58652dd481b5450f001e410d","ref":"","in":"body","required":false,"desc":"If this is a new snippet, do not pass an id. If it is an existing snippet, pass the existing snippet id.","default":"Snippet id","type":"string","name":"_id"},{"_id":"5864068b0355f31900380478","ref":"","in":"body","required":false,"desc":"(Optional) Snippet title (will be ignored if id is passed).","default":"","type":"string","name":"title"},{"_id":"5864068b0355f31900380476","ref":"","in":"body","required":false,"desc":"(Optional) Snippet source (will be ignored if id is passed).","default":"","type":"string","name":"source"}],"url":"/v1/snippettags/:id/snippets"},"isReference":true,"order":73,"body":"For response format, see [/snippets](doc:snippets)","excerpt":"Adds a snippet to a snippet tag, creating the snippet if necessary.","slug":"snippettags-id-snippets-post","type":"endpoint","title":"/snippettags/:id/snippets"}

post/snippettags/:id/snippets

Adds a snippet to a snippet tag, creating the snippet if necessary.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
string
Snippet tag _id

Body Params

_id:
stringSnippet id
If this is a new snippet, do not pass an id. If it is an existing snippet, pass the existing snippet id.
title:
string
(Optional) Snippet title (will be ignored if id is passed).
source:
string
(Optional) Snippet source (will be ignored if id is passed).

Examples


Result Format


Documentation

For response format, see [/snippets](doc:snippets)

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 }}