Skip to main content
The write endpoints change your data in the same way as the app. Followers get the same notifications, for example when you add a shared wish to a shared list.

Create

POST /api/v1/wishlists creates a wishlist. POST /api/v1/wishlists/{wishlistId}/wishes adds a wish. The response is the new item with its id, and the status is 201.
  • A new wishlist is always private (draft). To share it, see Share.
  • A new wish is shared (published) unless you send "status": "draft". A shared wish is visible only when its list is shared.
  • An archived wishlist takes no new wishes. Unarchive it in the app first.
  • Onio sets id, createdAt and updatedAt. Do not send them.

Change

PATCH changes only the fields you send. Send null to clear an optional field, for example "notes": null.
  • The API rejects unknown fields with 400. This includes a wishlist’s status. To change it, use Share.
  • If someone is getting the wish, they see the change. The API never tells you whether someone is getting a wish.
  • The last write wins. A PATCH overwrites the fields it sends, also when the app changed them a moment before.

Delete

DELETE answers 204 with no body.
  • Deleting a wishlist also deletes its wishes. Its share link stops working.
  • A deleted wish cannot be restored. Onio also removes its uploaded image.
To restore a deleted wishlist, write to hello@onio.app within 30 days.

Share

POST /api/v1/wishlists/{wishlistId}/share shares a wishlist. It needs the wishlists:share scope. The response holds the share link, and the status is 200.
  • The wishlist becomes shared (published). Anyone with the link can view it.
  • If the wishlist already has a link, you get the same link again.
  • People who already follow the wishlist see its wishes again.
DELETE /api/v1/wishlists/{wishlistId}/share stops sharing. It answers 204 with no body.
  • The link stops working, and the wishlist becomes private (draft).
  • Followers stay, but they no longer see the wishes.
  • If you share the wishlist again, it gets a new link.
Both requests are safe to repeat. An archived wishlist cannot be shared or unshared: the API answers 409. Unarchive it in the app first. The API cannot archive or unarchive a list.

Conflicts

Each write is checked against changes from the app and from other tools. When your data changes during a write, Onio tries again on its own. If it still fails, the API answers 409. Wait a moment and send the request again. 409 also means that you tried to add a wish to an archived wishlist, or to share or unshare one. Do not retry that one.