Recent searches


No recent searches

Trying to Post using the APIs



Posted Sep 29, 2022

We are trying to download articles from one Zendesk instance and post into another instance. Ee are getting an "Record not found" error when trying to create an article
Our curl request is as follows:

curl https://viewthespacehelp.zendesk.com/api/v2/help_center/sections/9204304998683/articles.json \
  -d @article.json \
  -H "Content-Type: application/json" -H "Authorization: Basic *******************" \
  -X POST  Our article.json looks like
{
    "article": {
        "title": "How to: Set up Notifications",
        "body": "<body>\n<h2>Notifications let you stay updated on everything important going on within your building.</h2>\n<p class=\"wysiwyg-text-align-center\"><iframe allowfullscreen=\"\" frameborder=\"0\" height=\"315\" src=\"//fast.wistia.com/embed/iframe/va2leooo69\" width=\"560\"></iframe></p>\n<h2>Configuring Notifications</h2>\n<ul>\n<li>\n<strong>Channel Settings:\u00a0</strong>Go to <strong>Channel Settings</strong> link under the <strong>Profile</strong> tab.</li>\n<li>\n<strong>Notification Type:</strong> Enable or disable notification types for each subscribed channel.</li>\n</ul>\n<h2>Notification methods</h2>\n<p><img alt=\"Sandbox_notifications.png\" src=\"https://help.joinlane.com/hc/article_attachments/4409222691469/Sandbox_notifications.png\"/></p>\n<ul>\n<li>\n<strong>Email:\u00a0</strong>Receive the latest communications straight to your inbox. From content, building notices, user interactions, and other platform notifications.</li>\n<li>\n<strong>Push: </strong>You can receive in-app push notifications on your mobile device through the app. (iOS + Android)</li>\n<li>\n<strong>SMS:\u00a0</strong>Receive notifications via a simple text message.</li>\n</ul>\n<h2>Notification sources:</h2>\n<ul>\n<li>\n<strong>Content: </strong>Posts and Notices can be set to send notifications. These are controlled per channel, from the channel settings screen and can come in the form of emails, push notifications, and SMS messages.</li>\n<li>\n<strong>Workflows:</strong> Workflows are rules that can be set up for how posts or pages behave, when interacted with. These can include things like sending an email to the post's owner or creator when somebody interacts with it, or sending an update when a user changes or cancels information.\u00a0</li>\n</ul>\n<hr/>\n<p class=\"wysiwyg-text-align-center\">If you have gone through these steps and have questions, feel free to reach out to our Support Team:\u00a0<a class=\"c-link\" data-sk=\"tooltip_parent\" data-stringify-link=\"mailto:\" rel=\"noopener noreferrer\" target=\"_blank\"></a>. We happily stand by to lend a hand!</p></body>",
        "locale": "en-us",
        "draft": "true",
        "permission_group_id": "1231674",
        "user_segment_id": "null"
    },
    "notify_subscribers": "false"
}

We verified all ids look correct. Can you please help us figuring this issue out?


0

3

3 comments

image avatar

Tipene Hughes

Zendesk Developer Advocacy

Hey Rafi,
 
Everything looks good with the request. Can you double check that the URL you're sending the request to matches the help center brand that you're wanting to move the article under?
 
Feel free to reach out with any questions!
 
Tipene

0


Hi Rafi Syed,

Did you happen to figure out your issue?

I'm getting the same error using zenpy and have verified the section, user_segment_id, and permission_group_id are valid, per the create article section in the Zendesk API Reference.

zenpy.lib.exception.RecordNotFoundException: {"error": "RecordNotFound", "description": "Not found"}

Edit: I created a new issue in zenpy here: https://github.com/facetoe/zenpy/issues/527

0


I had the same issue and after troubleshooting it looks like op had the same root cause:

"user_segment_id": "null"

should be

"user_segment_id": null

(no quotation marks around null)

This fixed it for me straight away

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post