トピックを作成

メソッド

POST

URL

https://typetalk.com/api/v1/topics

スコープ

topic.write

フォームパラメーター

名前 説明
name 文字列 トピック名(最大64文字)
spaceKey 文字列 組織キー
description (任意) 文字列 トピックの説明文(最大2000文字)
addAccountIds[0], addAccountIds[1] … (任意) 数値 アカウントID(組織のメンバーのみ)
addGroupIds[0], addGroupIds[1] … (任意) 数値 グループID

レスポンスの例

{
  "topic": {
    "id": 223,
    "name": "Test topic",
    "description": "",
    "suggestion": "Test topic",
    "isDirectMessage": false,
    "lastPostedAt": null,
    "createdAt": "2016-12-21T10:12:14Z",
    "updatedAt": "2016-12-21T10:12:14Z"
  },
  "mySpace": {
    "space": {
      "key": "abcdefghij",
      "name": "Joe Tech Inc.",
      "enabled": true,
      "imageUrl": "https://apps.nulab.com/spaces/abcdefghij/photo/large"
    },
    "myRole": "ADMIN",
    "isPaymentAdmin": true,
    "myPlan": {
      "plan": {
        "key": "typetalk.free",
        "name": "Free Plan",
        "limitNumberOfUsers": 10,
        "limitTotalAttachmentSize": 1073741824
      },
      "enabled": true,
      "trial": null,
      "numberOfUsers": 7,
      "totalAttachmentSize": 0,
      "createdAt": "2016-01-10T02:32:29Z",
      "updatedAt": "2016-01-20T02:32:29Z"
    }
  },
  "teams": [],
  "groups": [
    {
      "group": {
        "id": 1100,
        "key": "groupkey01",
        "name": "Joe Tech Inc. All",
        "suggestion": "Joe Tech Inc. All",
        "imageUrl": "https://apps.nulab.com/spaces/abcdefghij/groups/groupkey01/photo/medium",
        "createdAt": "2014-06-10T02:32:29Z",
        "updatedAt": "2014-06-10T02:32:29Z"
      },
      "memberCount": 4
    }
  ],
  "accounts": [
    {
      "id": 106,
      "name": "chelseab",
      "fullName": "ChelseaB",
      "suggestion": "ChelseaB",
      "imageUrl": "https://typetalk.com/accounts/106/profile_image.png?t=1404095549000",
      "isBot": false,
      "createdAt": "2014-06-30T02:32:29Z",
      "updatedAt": "2014-06-30T02:32:29Z"
    }
  ],
  "invitingAccounts": [],
  "invites": [],
  "accountsForApi": [],
  "integrations": [],
  "remainingInvitations": null
}

レスポンスのフォーマットは全てJSONです。GETメソッドはETagに対応しているので、If-None-Match ヘッダを付けて送ると、変更がない場合は304を返します。日付のフォーマットは ISO 8601 で、UTC です。 (例 : 2014-01-09T06:20:08Z )