Using the Desk APIPro
Categories, articles, search, and image uploads for help-center migrations.
Authenticate with your credential in the Authorization header:
Authorization: Bearer odsk_live_...
Articles belong to a category. Create or list categories first, then create articles with categoryId or categorySlug (optionally createCategoryIfMissing: true).
A typical migration workflow:
- 1. Create categories (
POST /api/v1/categories) or reuse existing ones - 2. Upload screenshots (
POST /api/v1/assets) and embed the returned URL in HTML - 3. Bulk upsert drafts with
POST /api/v1/articles/bulk(or create one-by-one); usedryRun: trueto validate first - 4. Search including drafts with
GET /api/v1/search?q=...&status=all - 5. Publish when ready (or set
status: "published"/publish: truein bulk if you have Publisher)
Categories:
GET /api/v1/categories— listPOST /api/v1/categories— create{ "title": "Billing", "description": "..." }GET /api/v1/categories/:id— get onePATCH /api/v1/categories/:id— rename, description, status, sortOrderPATCH /api/v1/categories— reorder{ "order": ["cat_1", "cat_2"] }DELETE /api/v1/categories/:id— delete if empty (Publisher)
Articles:
GET /api/v1/articles?status=draft&limit=50&offset=0— list with pagination (status, categoryId, q, sort)GET /api/v1/articles/:id— includesadminUrl,previewUrl,publicUrlPOST /api/v1/articles— create draft (categoryIdorcategorySlug)POST /api/v1/articles/bulk— upsert up to 50 articles by slug (dryRunsupported)PATCH /api/v1/articles/:id— update fields includingslug(old slug kept as an alias when published)POST /api/v1/articles/:id/publish/.../archive
Search & assets:
GET /api/v1/search?q=query&status=all— search drafts and published (defaultall)POST /api/v1/assets— multipart image upload (file, optionalarticleId); returnsurlfor bodyHtml
Support reasons (contact form topics):
GET /api/v1/support-reasons— nested dropdown tree + flatticketCategoriesPUT /api/v1/support-reasons— replace tree ({ "supportReasons": [ ... ] })- Each reason supports
label,instructions,allowTicket,articleIds/articleSlugs, and nestedchildren
Errors return JSON like { "error": { "code": "VALIDATION_ERROR", "message": "..." } }.
Writer can create/update categories, articles, and support reasons. Publisher can publish, archive, upload assets, and delete empty categories. See the Developers page for curl examples.
Was this article helpful?
