# 创建邀请链接的 API 端点已移至 /invites.json

**URL:** <https://meta.discourse.org/t/api-endpoint-to-create-invite-links-has-moved-to-invites-json/183027>\
**Category:** Feature\
**Tags:** rest-api\
**Created:** [2021 年3 月 10 日 15:15 UTC](https://meta.discourse.org/t/api-endpoint-to-create-invite-links-has-moved-to-invites-json/183027 "2021-03-10T15:15:58Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

作者： ![dan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dan/32/101549_2.png) [@dan](https://meta.discourse.org/u/dan)\
发布日期： [2021 年3 月 10 日 15:45 UTC](https://meta.discourse.org/t/api-endpoint-to-create-invite-links-has-moved-to-invites-json/183027/9 "2021-03-10T15:45:29Z")

</div>

在此添加此内容，仅用于提高可见性：

```plaintext
$ curl 'http://localhost:3000/invites.json' -X 'POST' \
  -H "Api-Key: d5fc02c5f4efaafacc82e4ff3410ae283d1c5da68ac43430d5133aaf4785593f" \
  -H "Api-Username: dan" \
  -H "Content-Type: application/json" \
  -d "{\"max_redemptions_allowed\":5}"
{"id":18,"link":"http://localhost:3000/invites/6f524dba4ced35ecae709a8614db3b05","redemption_count":0,"max_redemptions_allowed":5,"custom_message":null,"updated_at":"2021-03-10T15:44:44.259Z","expires_at":"2021-04-09T15:44:44.258Z","expired":false,"topics":[],"groups":[]}%                             

```

我将更新我们的 API 文档。感谢您指出这一点，对于造成的不便深表歉意。

---

_[View the full topic](https://meta.discourse.org/t/api-endpoint-to-create-invite-links-has-moved-to-invites-json/183027)._
