I'm unable to set multiple tags through the API

I’m able to post, set author, and publishing date, but only one tag goes through. Could someone help me to spot my mistake? I can’t find anything wrong. Thxxx!

You can see my json content in the output of cell 5 here:

Here’s the relevant cut of the json:

{“posts”: [{“title”: “TEST1026-01”, “authors”: [“wassim.bendella@akasha.world”], “tags”: [“TagTest1”, “TagTest2”, “TagTest3”], “status”: “draft”, “published_at”: “2021-02-05T00:00:00.000Z”, “html”: "

Ethereum World is about to hatch, and we hope it will flourish. The AKASHA team is therefore growing to fully support it!

"}]}

Had the same problem a few days ago and it took me a while to figure it out.

The tags array expects an object like this:

{
    title: TITLE
    html: CONTENT,
    tags: [
      {
          name: TAGNAME,
          description: TAGDESCRIPTION
      },
    ],
    status: STATUS,
}

The tag description is optional, but you will need the name.

Here is an example of how I use this pattern in one of my projects.

Edit: just realised, I am actually just pushing a single tag – so my experience might be a bit different. I did, however, have problems with the “shorter” version of just adding a string and got it to work by using the object mentioned above.

1 Like