About

This documentation explains the specifications of Qiita API v2.

Request

Requires secure connections with TLS to access the all endpoints of our API, without exception. Use qiita.com host to access to the public Qiita data, otherwise use *.qiita.com to access to Qitia:Team data.

Parameters

Accepts GET, POST, PUT, PATCH, and DELETE HTTP methods. On GET request, include parameters as URI query parameters. On the other requests, include them into the request body in JSON format.

Rate limit

Rate limit requests from clients to protect the health of the service and maintain high service quality for other clients. The remaining number of request tokens with each request is in response header. The limitation count per hour of authenticated request is 1000, and 60 is on non-authenticated request per its IP address.

Teams using single sign-on

For a security reason, currently teams allowing only single sign-on authentication can be accessed via API when use only team access token.

Status code

The response status code can be 200, 201, 204, 400, 401, 403, 404, and 500. In successful cases, we use 200 for GET or PATCH requests, 201 for POST request, and 204 for PUT and DELETE requests.

Data format

Requires JSON format for communication with Qiita API v2. If you include any JSON data into your request body, put Content-Type request header with application/json. Note that the API doesn't send any response body on 204 response (successful cases to PUT or DELETE request). Date-time is rendered in ISO8601 format.

GET /api/v2/items?page=1&per_page=20 HTTP/1.1

Error response

If any error is occurred, it returns an error response including a machine-readable error type, and a human-readable error message.

{
  "message": "Not found",
  "type": "not_found"
}

Pagination

At some endpoints, the entire data is not returned. Instead, you can specify page (from 1 to 100, default: 1) and per_page (from 1 to 100, default: 20) parameters. At this kind of endpoints, the response includes Link header in its response header. The Link header include some links to the first, next, prev, and last pages.

Link: <https://qiita.com/api/v2/users?page=1>; rel="first",
      <https://qiita.com/api/v2/users?page=1>; rel="prev",
      <https://qiita.com/api/v2/users?page=3>; rel="next",
      <https://qiita.com/api/v2/users?page=6>; rel="last"

The response includes Total-Count header too:

Total-Count: 6

JSON Schema

The API provides a JSON Schema that describes what resources are provided via the API, what properties they have, how they are represented, and what operations they support. You can access the JSON Schema using the following URL:

Auth

Requires an access token at some endpoints such as Qiita Team or non-GET requests. You can generate access token via the OAuth 2.0 authorization flow or /settings/applications page.

Access token

Access token can be put on Authorization request header like this:

Authorization: Bearer 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd

Scope

An access token is associated with some scopes.
Scopes are specified by the application you are authorizing to,
and you can confirm which types of scopes are required at the authorization page.

read_qiita       - Allow to read data associated to the authenticated user on Qiita
read_qiita_team  - Allow to read data on Qiita Team
write_qiita      - Allow to write data on Qiita
write_qiita_team - Allow to write data on Qiita Team

GET /api/v2/oauth/authorize

The authorize page has been deprecated since Jun 5 2020 if you use read_qiita_team or write_qiita_team. Please use the team_authorize page.

This section is for application developers. To let a user generate an access token via your application, you need to show the authorization page for your application. After a user authorized accesses via your application, the user is redirected to the URL that you registered on the application registration form. In this time, the code URL query parameter (and state parameter if needed) is included into the URL. Your application can generate an access token by sending a request to POST /api/v2/access_tokens with this code parameter.

  • client_id
    • The ID of your API client
    • Example: "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d"
  • scope
    • Space-separated scope names
    • Example: "read_qiita write_qiita_team"
  • state
    • Optional state parameter to protect CSRF
    • Example: "bb17785d811bb1913ef54b0a7657de780defaa2d"
GET /api/v2/oauth/authorize?client_id=a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d&scope=read_qiita+write_qiita_team&state=bb17785d811bb1913ef54b0a7657de780defaa2d HTTP/1.1
Host: qiita.com
HTTP/1.1 200
Content-Type: text/html

...

GET /api/v2/oauth/team_authorize

This section is for application developers. To let a user generate an team access token via your application, you need to show the authorization page for your application. After a user authorized accesses via your application, the user is redirected to the URL that you registered on the application registration form. In this time, the code URL query parameter (and state parameter if needed) is included into the URL. Your application can generate an access token by sending a request to POST /api/v2/team_access_tokens with this code parameter. Only available on Qiita Team.

  • client_id
    • The ID of your API client
    • Example: "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d"
  • scope
    • Space-separated scope names, only avilable read_qiita_team and write_qiita_team
    • Example: "read_qiita_team write_qiita_team"
  • state
    • Optional state parameter to protect CSRF
    • Example: "bb17785d811bb1913ef54b0a7657de780defaa2d"
GET /api/v2/oauth/team_authorize?client_id=a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d&scope=read_qiita_team+write_qiita_team&state=bb17785d811bb1913ef54b0a7657de780defaa2d HTTP/1.1
Host: team_name.qiita.com
HTTP/1.1 200
Content-Type: text/html

...

Access token

Access token for Qiita API v2

  • client_id
    • An unique ID to identify a registered client
    • Example: "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
  • scopes
    • Authorized action scopes of the access token
    • Type: array
  • token
    • Access token identifier string
    • Example: "ea5d0a593b2655e9568f144fb1826342292f5c6b7d406fda00577b8d1530d8a5"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/

POST /api/v2/access_tokens

Create a new access token.

  • client_id
    required
    • An unique ID to identify a registered client
    • Example: "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
  • client_secret
    required
    • A secret key to authenticate a registered API client
    • Example: "01fc259c31fe39e72c8ef911c3432a33d51e9337ff34c4fac86c491a0d37251f"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
  • code
    required
    • A temporary secret code to exchange with an access token
    • Example: "fefef5f067171f247fb415e38cb0631797b82f4141dcdee66db846c3ade57a03"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
POST /api/v2/access_tokens HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "client_id": "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d",
  "client_secret": "01fc259c31fe39e72c8ef911c3432a33d51e9337ff34c4fac86c491a0d37251f",
  "code": "fefef5f067171f247fb415e38cb0631797b82f4141dcdee66db846c3ade57a03"
}
HTTP/1.1 201
Content-Type: application/json

{
  "client_id": "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d",
  "scopes": [
    "read_qiita"
  ],
  "token": "ea5d0a593b2655e9568f144fb1826342292f5c6b7d406fda00577b8d1530d8a5"
}

DELETE /api/v2/access_tokens/:access_token

Deactivate an access token.

DELETE /api/v2/access_tokens/:access_token HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Action on item

It represents actions (number of views/comments/emoji reactions) to an article on Qiita Team, and is valid only on Qiita Team.

  • comments
    • Type: array
  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • id
    • An unique item ID
    • Example: "c686397e4a0f4f11683d"
    • Type: string
    • Pattern: /^[0-9a-f]{20}$/
  • page_views_count
    • The number of views.
    • Example: 100
    • Type: integer
  • reactions
    • Type: array
  • title
    • The title of this item
    • Example: "Example title"
    • Type: string
  • url
    • The URL of this item
    • Example: "https://qiita.com/Qiita/items/c686397e4a0f4f11683d"
    • Type: string
  • updated_at
    • Date-time when this data was updated
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • user_id
    • Posted user id
    • Example: "team_member"
    • Type: string

GET /api/v2/items/reactions

Returns article reactions in descending order of the date and time the article was created.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
  • query
    • Search query
    • Example: "created:>=2020-01 created:<=2020-12"
    • Type: string
GET /api/v2/items/reactions?page=1&per_page=20&query=created%3A%3E%3D2020-01+created%3A%3C%3D2020-12 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "comments": [
      {
        "created_at": "2000-01-01T00:00:00+00:00",
        "id": "3391f50c35f953abfc4f",
        "reactions": [
          {
            "created_at": "2000-01-01T00:00:00+00:00",
            "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
            "name": "+1",
            "user_id": "team_member"
          }
        ],
        "updated_at": "2000-01-01T00:00:00+00:00",
        "user_id": "team_member"
      }
    ],
    "created_at": "2000-01-01T00:00:00+00:00",
    "id": "c686397e4a0f4f11683d",
    "page_views_count": 100,
    "reactions": [
      {
        "created_at": "2000-01-01T00:00:00+00:00",
        "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
        "name": "+1",
        "user_id": "team_member"
      }
    ],
    "title": "Example title",
    "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
    "updated_at": "2000-01-01T00:00:00+00:00",
    "user_id": "team_member"
  }
]

Authenticated user

An user currently authenticated by a given access token. This resources has more detailed information than normal User resource.

  • description
    • self-description
    • Example: "Hello, world."
    • Type: null, string
  • facebook_id
    • Facebook ID
    • Example: "qiita"
    • Type: null, string
  • followees_count
    • Followees count
    • Example: 100
    • Type: integer
  • followers_count
    • Followers count
    • Example: 200
    • Type: integer
  • github_login_name
    • GitHub ID
    • Example: "qiitan"
    • Type: null, string
  • id
    • User ID
    • Example: "qiita"
    • Type: string
  • items_count
    • How many items a user posted on qiita.com (Items on Qiita Team are not included)
    • Example: 300
    • Type: integer
  • linkedin_id
    • LinkedIn ID
    • Example: "qiita"
    • Type: null, string
  • location
    • Location
    • Example: "Tokyo, Japan"
    • Type: null, string
  • name
    • Customized user name
    • Example: "Qiita キータ"
    • Type: null, string
  • organization
    • Organization which a user belongs to
    • Example: "Qiita Inc."
    • Type: null, string
  • permanent_id
    • Unique integer ID
    • Example: 1
    • Type: integer
  • profile_image_url
    • Profile image URL
    • Example: "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439"
    • Type: string
  • team_only
    • A flag whether this user is configured as team-only
    • Example: false
    • Type: boolean
  • twitter_screen_name
    • Twitter screen name
    • Example: "qiita"
    • Type: null, string
  • website_url
    • Website URL
    • Example: "https://qiita.com"
    • Type: null, string
  • image_monthly_upload_limit
    • Monthly image upload limit
    • Example: 1048576
    • Type: integer
  • image_monthly_upload_remaining
    • Monthly remaining image upload size
    • Example: 524288
    • Type: integer

GET /api/v2/authenticated_user

Get a user associated to the current access token.

GET /api/v2/authenticated_user HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "description": "Hello, world.",
  "facebook_id": "qiita",
  "followees_count": 100,
  "followers_count": 200,
  "github_login_name": "qiitan",
  "id": "qiita",
  "items_count": 300,
  "linkedin_id": "qiita",
  "location": "Tokyo, Japan",
  "name": "Qiita キータ",
  "organization": "Qiita Inc.",
  "permanent_id": 1,
  "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
  "team_only": false,
  "twitter_screen_name": "qiita",
  "website_url": "https://qiita.com",
  "image_monthly_upload_limit": 1048576,
  "image_monthly_upload_remaining": 524288
}

Comment

A comment posted on an item or a project. A comment on a project is available only on Qiita Team.

  • body
    • Comment body in Markdown
    • Example: "# Example"
    • Type: string
  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • id
    • Comment unique ID
    • Example: "3391f50c35f953abfc4f"
    • Type: string
    • Pattern: /^[0-9a-f]{20}$/
  • rendered_body
    • Comment body in HTML
    • Example: "<h1>Example</h1>"
    • Type: string
  • updated_at
    • Date-time when this data was updated
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • user
    • A Qiita user (a.k.a. account)

DELETE /api/v2/comments/:comment_id

Delete a comment.

DELETE /api/v2/comments/:comment_id HTTP/1.1
Host: api.example.com
HTTP/1.1 204

GET /api/v2/comments/:comment_id

Get a comment.

GET /api/v2/comments/:comment_id HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "body": "# Example",
  "created_at": "2000-01-01T00:00:00+00:00",
  "id": "3391f50c35f953abfc4f",
  "rendered_body": "<h1>Example</h1>",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

PATCH /api/v2/comments/:comment_id

Update a comment.

  • body
    required
    • Comment body in Markdown
    • Example: "# Example"
    • Type: string
PATCH /api/v2/comments/:comment_id HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "# Example"
}
HTTP/1.1 200
Content-Type: application/json

{
  "body": "# Example",
  "created_at": "2000-01-01T00:00:00+00:00",
  "id": "3391f50c35f953abfc4f",
  "rendered_body": "<h1>Example</h1>",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

GET /api/v2/items/:item_id/comments

List comments on an item in newest order.

GET /api/v2/items/:item_id/comments HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "body": "# Example",
    "created_at": "2000-01-01T00:00:00+00:00",
    "id": "3391f50c35f953abfc4f",
    "rendered_body": "<h1>Example</h1>",
    "updated_at": "2000-01-01T00:00:00+00:00",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    }
  }
]

POST /api/v2/items/:item_id/comments

Post a comment on an item.

  • body
    required
    • Comment body in Markdown
    • Example: "# Example"
    • Type: string
POST /api/v2/items/:item_id/comments HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "# Example"
}
HTTP/1.1 201
Content-Type: application/json

{
  "body": "# Example",
  "created_at": "2000-01-01T00:00:00+00:00",
  "id": "3391f50c35f953abfc4f",
  "rendered_body": "<h1>Example</h1>",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

POST /api/v2/items/:item_id/imported_comments

Create a comment by a specific user (only available on Qiita Team. administrative privileges required).

  • body
    required
    • Comment body in Markdown
    • Example: "# Example"
    • Type: string
  • user_id
    required
    • User ID
    • Example: "qiita"
    • Type: string
  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • updated_at
    • Date-time when this data was updated
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
POST /api/v2/items/:item_id/imported_comments HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "# Example",
  "user_id": "qiita",
  "created_at": "2000-01-01T00:00:00+00:00",
  "updated_at": "2000-01-01T00:00:00+00:00"
}
HTTP/1.1 201
Content-Type: application/json

{
  "body": "# Example",
  "created_at": "2000-01-01T00:00:00+00:00",
  "id": "3391f50c35f953abfc4f",
  "rendered_body": "<h1>Example</h1>",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

DELETE /api/v2/comments/:comment_id/thank

DELETE /api/v2/comments/:comment_id/thank has been abolished since Nov 4 2020.

PUT /api/v2/comments/:comment_id/thank

PUT /api/v2/comments/:comment_id/thank has been abolished since Nov 4 2020.

GET /api/v2/projects/:project_id/comments

GET /api/v2/projects/:project_id/comments has been abolished since Oct 1 2022.

POST /api/v2/projects/:project_id/comments

POST /api/v2/projects/:project_id/comments has been abolished since Oct 1 2022.

POST /api/v2/projects/:project_id/imported_comments

POST /api/v2/projects/:project_id/imported_comments has been abolished since Oct 1 2022.

Emoji reaction

An emoji reaction on Qiita Team (only availabble on Qiita Team).

  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • image_url
    • An emoji image URL
    • Example: "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png"
    • Type: null, string
  • name
    • A unique emoji name
    • Example: "+1"
    • Type: string
  • user
    • A Qiita user (a.k.a. account)

POST /api/v2/comments/:comment_id/reactions

Add an emoji reaction to a comment.

  • name
    required
    • A unique emoji name
    • Example: "+1"
    • Type: string
POST /api/v2/comments/:comment_id/reactions HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "name": "+1"
}
HTTP/1.1 201
Content-Type: application/json

{
  "created_at": "2000-01-01T00:00:00+00:00",
  "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
  "name": "+1",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

POST /api/v2/items/:item_id/reactions

Add an emoji reaction to an item.

  • name
    required
    • A unique emoji name
    • Example: "+1"
    • Type: string
POST /api/v2/items/:item_id/reactions HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "name": "+1"
}
HTTP/1.1 201
Content-Type: application/json

{
  "created_at": "2000-01-01T00:00:00+00:00",
  "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
  "name": "+1",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

DELETE /api/v2/comments/:comment_id/reactions/:reaction_name

Delete an emoji reaction from a comment.

DELETE /api/v2/comments/:comment_id/reactions/:reaction_name HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "created_at": "2000-01-01T00:00:00+00:00",
  "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
  "name": "+1",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

DELETE /api/v2/items/:item_id/reactions/:reaction_name

Delete an emoji reaction from an item.

DELETE /api/v2/items/:item_id/reactions/:reaction_name HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "created_at": "2000-01-01T00:00:00+00:00",
  "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
  "name": "+1",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
}

GET /api/v2/comments/:comment_id/reactions

List emoji reactions of an comment in recently-created order.

GET /api/v2/comments/:comment_id/reactions HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "created_at": "2000-01-01T00:00:00+00:00",
    "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
    "name": "+1",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    }
  }
]

GET /api/v2/items/:item_id/reactions

List emoji reactions of an item in recently-created order.

GET /api/v2/items/:item_id/reactions HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "created_at": "2000-01-01T00:00:00+00:00",
    "image_url": "https://cdn.qiita.com/emoji/twemoji/unicode/1f44d.png",
    "name": "+1",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    }
  }
]

GET /api/v2/projects/:project_id/reactions

GET /api/v2/projects/:project_id/reactions has been abolished since Oct 1 2022.

POST /api/v2/projects/:project_id/reactions

POST /api/v2/projects/:project_id/reactions has been abolished since Oct 1 2022.

DELETE /api/v2/projects/:project_id/reactions/:reaction_name

DELETE /api/v2/projects/:project_id/reactions/:reaction_name has been abolished since Oct 1 2022.

Expanded template

You can preview the expanded result of a given template. This is available only on Qiita Team.

  • expanded_body
    • An item body where variables are expanded
    • Example: "Weekly MTG on 2000/01/01"
    • Type: string
  • expanded_tags
    • A list of tags where variables are expanded
    • Example: [{"name"=>"MTG/2000/01/01", "versions"=>["0.0.1"]}]
    • Type: array
  • expanded_title
    • An item title where variables are expanded
    • Example: "Weekly MTG on 2015/06/03"
    • Type: string

POST /api/v2/expanded_templates

Get a template where its variables are expanded.

  • body
    required
    • The body of this template
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
  • tags
    required
    • A list of tags
    • Example: [{"name"=>"MTG/%{Year}/%{month}/%{day}", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    required
    • A template title where variables are to be expanded
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
POST /api/v2/expanded_templates HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "Weekly MTG on %{Year}/%{month}/%{day}",
  "tags": [
    {
      "name": "MTG/%{Year}/%{month}/%{day}",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Weekly MTG on %{Year}/%{month}/%{day}"
}
HTTP/1.1 201
Content-Type: application/json

{
  "expanded_body": "Weekly MTG on 2000/01/01",
  "expanded_tags": [
    {
      "name": "MTG/2000/01/01",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "expanded_title": "Weekly MTG on 2015/06/03"
}

Group

Represents a group on Qiita Team

  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • description
    • A group description.
    • Example: "This group is for developers."
    • Type: string
  • name
    • Group name for display.
    • Example: "Dev"
    • Type: string
  • private
    • A flag to tell which this group is private or public.
    • Example: false
    • Type: boolean
  • updated_at
    • Date-time when this data was updated
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • url_name
    • Unique name on a team.
    • Example: "dev"
    • Type: string

GET /api/v2/groups

List groups.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/groups?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  }
]

GET /api/v2/groups/:url_name

Get a group.

GET /api/v2/groups/:url_name HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "created_at": "2000-01-01T00:00:00+00:00",
  "description": "This group is for developers.",
  "name": "Dev",
  "private": false,
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url_name": "dev"
}

POST /api/v2/groups

Create a group.

  • url_name
    required
    • Unique name on a team.
    • Example: "dev"
    • Type: string
  • name
    required
    • Group name for display.
    • Example: "Dev"
    • Type: string
  • description
    • Represents a group on Qiita Team
    • Example: "This group is for developers."
    • Type: string
  • private
    required
    • A flag to tell which this group is private or public.
    • Example: false
    • Type: boolean
POST /api/v2/groups HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "url_name": "dev",
  "name": "Dev",
  "description": "This group is for developers.",
  "private": false
}
HTTP/1.1 201
Content-Type: application/json

{
  "created_at": "2000-01-01T00:00:00+00:00",
  "description": "This group is for developers.",
  "name": "Dev",
  "private": false,
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url_name": "dev"
}

PATCH /api/v2/groups/:url_name

Update a group.

  • name
    • Group name for display.
    • Example: "Dev"
    • Type: string
  • description
    • Represents a group on Qiita Team
    • Example: "This group is for developers."
    • Type: string
  • private
    • A flag to tell which this group is private or public.
    • Example: false
    • Type: boolean
PATCH /api/v2/groups/:url_name HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "name": "Dev",
  "description": "This group is for developers.",
  "private": false
}
HTTP/1.1 200
Content-Type: application/json

{
  "created_at": "2000-01-01T00:00:00+00:00",
  "description": "This group is for developers.",
  "name": "Dev",
  "private": false,
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url_name": "dev"
}

DELETE /api/v2/groups/:url_name

Delete a group

DELETE /api/v2/groups/:url_name HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Group member

Represents a group member on Qiita Team

  • id
    • User ID
    • Example: "qiita"
    • Type: string
  • name
    • User name in the team
    • Example: "Qiita キータ"
    • Type: string
  • email
    • Email address of the member(return empty string when you are neither admin nor owner in team)
    • Example: "example@example.com"
    • Type: string

GET /api/v2/groups/:url_name/members

List members in group.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/groups/:url_name/members?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "id": "qiita",
    "name": "Qiita キータ",
    "email": "example@example.com"
  }
]

GET /api/v2/groups/:url_name/members/:user_id

Get a member in group.

GET /api/v2/groups/:url_name/members/:user_id HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "id": "qiita",
  "name": "Qiita キータ",
  "email": "example@example.com"
}

POST /api/v2/groups/:url_name/members

Add a member in group.

  • identities
    required
    • List of user ID or email address in the team
    • Example: ["Qiita", "Qiitan"]
    • Type: array
POST /api/v2/groups/:url_name/members HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "identities": [
    "Qiita",
    "Qiitan"
  ]
}
HTTP/1.1 201
Content-Type: application/json

{
  "id": "qiita",
  "name": "Qiita キータ",
  "email": "example@example.com"
}

DELETE /api/v2/groups/:url_name/members

Delete a member in group.

  • identities
    required
    • List of user ID or email address in the team
    • Example: ["Qiita", "Qiitan"]
    • Type: array
DELETE /api/v2/groups/:url_name/members HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Invited member

Represents members who are invited to on Qiita Team (only available on Qiita Team. administrative privileges required).

  • email
    • Email address of the invited member
    • Example: "example@example.com"
    • Type: string
  • url
    • Invitation URL. The expiration date is one day.
    • Example: "https://team-name.qiita.com/registration/confirm?id=3&token=456c84ae60070161a36c08c9e710050abe5852cc"
    • Type: string

GET api/v2/team_invitations

Return list of invited members

GET api/v2/team_invitations HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "email": "example@example.com",
    "url": "https://team-name.qiita.com/registration/confirm?id=3&token=456c84ae60070161a36c08c9e710050abe5852cc"
  }
]

POST api/v2/team_invitations

Invite a member to the team

POST api/v2/team_invitations HTTP/1.1
Host: api.example.com
HTTP/1.1 201
Content-Type: application/json

{
  "email": "example@example.com",
  "url": "https://team-name.qiita.com/registration/confirm?id=3&token=456c84ae60070161a36c08c9e710050abe5852cc"
}

DELETE api/v2/team_invitations/:email

Revoke the invitation

DELETE api/v2/team_invitations/:email HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Item

Represents an item posted from a user

  • rendered_body
    • Item body in HTML
    • Example: "<h1>Example</h1>"
    • Type: string
  • body
    • Item body in Markdown
    • Example: "# Example"
    • Type: string
  • coediting
    • A flag whether this item is co-edit mode (only available on Qiita Team)
    • Example: false
    • Type: boolean
  • comments_count
    • Comments count
    • Example: 100
    • Type: integer
  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • group
    • Represents a group on Qiita Team
  • id
    • An unique item ID
    • Example: "c686397e4a0f4f11683d"
    • Type: string
    • Pattern: /^[0-9a-f]{20}$/
  • likes_count
    • Likes count (only available on Qiita)
    • Example: 100
    • Type: integer
  • private
    • A flag whether this item is private (only available on Qiita)
    • Example: false
    • Type: boolean
  • reactions_count
    • Emoji reactions count (only availabble on Qiita Team)
    • Example: 100
    • Type: integer
  • stocks_count
    • Stocks count
    • Example: 100
    • Type: integer
  • tags
    • A list of tags
    • Example: [{"name"=>"Ruby", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    • The title of this item
    • Example: "Example title"
    • Type: string
  • updated_at
    • Date-time when this data was updated
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • url
    • The URL of this item
    • Example: "https://qiita.com/Qiita/items/c686397e4a0f4f11683d"
    • Type: string
  • user
    • A Qiita user (a.k.a. account)
  • page_views_count
    • The number of views.
    • Example: 100
    • Type: null, integer
  • team_membership
    • A Qiita Team member.
  • organization_url_name
    • Represents url_name of Organization of this item.
    • Example: "qiita-inc"
    • Type: string, null
  • slide
    • A flag whether this item has slide mode enabled
    • Example: false
    • Type: boolean

GET /api/v2/authenticated_user/items

List the authenticated user's items in newest order

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/authenticated_user/items?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "rendered_body": "<h1>Example</h1>",
    "body": "# Example",
    "coediting": false,
    "comments_count": 100,
    "created_at": "2000-01-01T00:00:00+00:00",
    "group": {
      "created_at": "2000-01-01T00:00:00+00:00",
      "description": "This group is for developers.",
      "name": "Dev",
      "private": false,
      "updated_at": "2000-01-01T00:00:00+00:00",
      "url_name": "dev"
    },
    "id": "c686397e4a0f4f11683d",
    "likes_count": 100,
    "private": false,
    "reactions_count": 100,
    "stocks_count": 100,
    "tags": [
      {
        "name": "Ruby",
        "versions": [
          "0.0.1"
        ]
      }
    ],
    "title": "Example title",
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    },
    "page_views_count": 100,
    "team_membership": {
      "name": "Qiita キータ"
    },
    "organization_url_name": "qiita-inc",
    "slide": false
  }
]

GET /api/v2/items

List items.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
  • query
    • Search query
    • Example: "qiita user:Qiita"
    • Type: string
GET /api/v2/items?page=1&per_page=20&query=qiita+user%3AQiita HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "rendered_body": "<h1>Example</h1>",
    "body": "# Example",
    "coediting": false,
    "comments_count": 100,
    "created_at": "2000-01-01T00:00:00+00:00",
    "group": {
      "created_at": "2000-01-01T00:00:00+00:00",
      "description": "This group is for developers.",
      "name": "Dev",
      "private": false,
      "updated_at": "2000-01-01T00:00:00+00:00",
      "url_name": "dev"
    },
    "id": "c686397e4a0f4f11683d",
    "likes_count": 100,
    "private": false,
    "reactions_count": 100,
    "stocks_count": 100,
    "tags": [
      {
        "name": "Ruby",
        "versions": [
          "0.0.1"
        ]
      }
    ],
    "title": "Example title",
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    },
    "page_views_count": 100,
    "team_membership": {
      "name": "Qiita キータ"
    },
    "organization_url_name": "qiita-inc",
    "slide": false
  }
]

POST /api/v2/items

Create an item.

  • body
    required
    • Item body in Markdown
    • Example: "# Example"
    • Type: string
  • coediting
    • A flag whether this item is co-edit mode (only available on Qiita Team)
    • Example: false
    • Type: boolean
  • group_url_name
    • A group's url_name on which share this item (pass null to make public; only available on Qiita Team)
    • Example: "dev"
    • Type: null, string
  • private
    • A flag whether this item is private (only available on Qiita)
    • Example: false
    • Type: boolean
  • tags
    required
    • A list of tags
    • Example: [{"name"=>"Ruby", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    required
    • The title of this item
    • Example: "Example title"
    • Type: string
  • tweet
    • A flag to post a tweet (only availabble if Twitter integration is enabled)
    • Example: false
    • Type: boolean
  • organization_url_name
    • Represents url_name of Organization of this item.
    • Example: "qiita-inc"
    • Type: string, null
  • slide
    • A flag whether this item has slide mode enabled
    • Example: false
    • Type: boolean
POST /api/v2/items HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "# Example",
  "coediting": false,
  "group_url_name": "dev",
  "private": false,
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "tweet": false,
  "organization_url_name": "qiita-inc",
  "slide": false
}
HTTP/1.1 201
Content-Type: application/json

{
  "rendered_body": "<h1>Example</h1>",
  "body": "# Example",
  "coediting": false,
  "comments_count": 100,
  "created_at": "2000-01-01T00:00:00+00:00",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "id": "c686397e4a0f4f11683d",
  "likes_count": 100,
  "private": false,
  "reactions_count": 100,
  "stocks_count": 100,
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  },
  "page_views_count": 100,
  "team_membership": {
    "name": "Qiita キータ"
  },
  "organization_url_name": "qiita-inc",
  "slide": false
}

DELETE /api/v2/items/:item_id

Delete an item.

DELETE /api/v2/items/:item_id HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "rendered_body": "<h1>Example</h1>",
  "body": "# Example",
  "coediting": false,
  "comments_count": 100,
  "created_at": "2000-01-01T00:00:00+00:00",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "id": "c686397e4a0f4f11683d",
  "likes_count": 100,
  "private": false,
  "reactions_count": 100,
  "stocks_count": 100,
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  },
  "page_views_count": 100,
  "team_membership": {
    "name": "Qiita キータ"
  },
  "organization_url_name": "qiita-inc",
  "slide": false
}

GET /api/v2/items/:item_id

Get an item.

GET /api/v2/items/:item_id HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "rendered_body": "<h1>Example</h1>",
  "body": "# Example",
  "coediting": false,
  "comments_count": 100,
  "created_at": "2000-01-01T00:00:00+00:00",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "id": "c686397e4a0f4f11683d",
  "likes_count": 100,
  "private": false,
  "reactions_count": 100,
  "stocks_count": 100,
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  },
  "page_views_count": 100,
  "team_membership": {
    "name": "Qiita キータ"
  },
  "organization_url_name": "qiita-inc",
  "slide": false
}

PATCH /api/v2/items/:item_id

Update an item.

  • body
    required
    • Item body in Markdown
    • Example: "# Example"
    • Type: string
  • coediting
    • A flag whether this item is co-edit mode (only available on Qiita Team)
    • Example: false
    • Type: boolean
  • group_url_name
    • A group's url_name on which share this item (pass null to make public; only available on Qiita Team)
    • Example: "dev"
    • Type: null, string
  • private
    • A flag whether this item is private (only available on Qiita)
    • Example: false
    • Type: boolean
  • tags
    • A list of tags
    • Example: [{"name"=>"Ruby", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    required
    • The title of this item
    • Example: "Example title"
    • Type: string
  • organization_url_name
    • Represents url_name of Organization of this item.
    • Example: "qiita-inc"
    • Type: string, null
  • slide
    • A flag whether this item has slide mode enabled
    • Example: false
    • Type: boolean
PATCH /api/v2/items/:item_id HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "# Example",
  "coediting": false,
  "group_url_name": "dev",
  "private": false,
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "organization_url_name": "qiita-inc",
  "slide": false
}
HTTP/1.1 200
Content-Type: application/json

{
  "rendered_body": "<h1>Example</h1>",
  "body": "# Example",
  "coediting": false,
  "comments_count": 100,
  "created_at": "2000-01-01T00:00:00+00:00",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "id": "c686397e4a0f4f11683d",
  "likes_count": 100,
  "private": false,
  "reactions_count": 100,
  "stocks_count": 100,
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  },
  "page_views_count": 100,
  "team_membership": {
    "name": "Qiita キータ"
  },
  "organization_url_name": "qiita-inc",
  "slide": false
}

POST /api/v2/imported_items

Create an item by a specific user (only available on Qiita Team. administrative privileges required).

  • body
    required
    • Item body in Markdown
    • Example: "# Example"
    • Type: string
  • coediting
    • A flag whether this item is co-edit mode (only available on Qiita Team)
    • Example: false
    • Type: boolean
  • group_url_name
    • A group's url_name on which share this item (pass null to make public; only available on Qiita Team)
    • Example: "dev"
    • Type: null, string
  • tags
    required
    • A list of tags
    • Example: [{"name"=>"Ruby", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    required
    • The title of this item
    • Example: "Example title"
    • Type: string
  • user_id
    required
    • User ID
    • Example: "qiita"
    • Type: string
  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • updated_at
    • Date-time when this data was updated
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
POST /api/v2/imported_items HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "# Example",
  "coediting": false,
  "group_url_name": "dev",
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "user_id": "qiita",
  "created_at": "2000-01-01T00:00:00+00:00",
  "updated_at": "2000-01-01T00:00:00+00:00"
}
HTTP/1.1 201
Content-Type: application/json

{
  "rendered_body": "<h1>Example</h1>",
  "body": "# Example",
  "coediting": false,
  "comments_count": 100,
  "created_at": "2000-01-01T00:00:00+00:00",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "id": "c686397e4a0f4f11683d",
  "likes_count": 100,
  "private": false,
  "reactions_count": 100,
  "stocks_count": 100,
  "tags": [
    {
      "name": "Ruby",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Example title",
  "updated_at": "2000-01-01T00:00:00+00:00",
  "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
  "user": {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  },
  "page_views_count": 100,
  "team_membership": {
    "name": "Qiita キータ"
  },
  "organization_url_name": "qiita-inc",
  "slide": false
}

DELETE /api/v2/items/:item_id/like

The Like API on Qiita Team has been abolished since Nov 4 2020. Please use the Emoji reaction API instead. Unlike an item.

DELETE /api/v2/items/:item_id/like HTTP/1.1
Host: api.example.com
HTTP/1.1 204

PUT /api/v2/items/:item_id/like

The Like API on Qiita Team has been abolished since Nov 4 2020. Please use the Emoji reaction API instead. Like an item

PUT /api/v2/items/:item_id/like HTTP/1.1
Host: api.example.com
HTTP/1.1 204

PUT /api/v2/items/:item_id/stock

Stock an item.

PUT /api/v2/items/:item_id/stock HTTP/1.1
Host: api.example.com
HTTP/1.1 204

DELETE /api/v2/items/:item_id/stock

Unstock an item.

DELETE /api/v2/items/:item_id/stock HTTP/1.1
Host: api.example.com
HTTP/1.1 204

GET /api/v2/items/:item_id/stock

Check if you stocked an item.

GET /api/v2/items/:item_id/stock HTTP/1.1
Host: api.example.com
HTTP/1.1 204

GET /api/v2/items/:item_id/like

The Like API on Qiita Team has been abolished since Nov 4 2020. Please use the Emoji reaction API instead. Check if you liked an item.

GET /api/v2/items/:item_id/like HTTP/1.1
Host: api.example.com
HTTP/1.1 204

PUT /api/v2/items/:item_id/stock

Stock an item.

PUT /api/v2/items/:item_id/stock HTTP/1.1
Host: api.example.com
HTTP/1.1 204

GET /api/v2/tags/:tag_id/items

List tagged items in recently-tagged order.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/tags/:tag_id/items?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "rendered_body": "<h1>Example</h1>",
    "body": "# Example",
    "coediting": false,
    "comments_count": 100,
    "created_at": "2000-01-01T00:00:00+00:00",
    "group": {
      "created_at": "2000-01-01T00:00:00+00:00",
      "description": "This group is for developers.",
      "name": "Dev",
      "private": false,
      "updated_at": "2000-01-01T00:00:00+00:00",
      "url_name": "dev"
    },
    "id": "c686397e4a0f4f11683d",
    "likes_count": 100,
    "private": false,
    "reactions_count": 100,
    "stocks_count": 100,
    "tags": [
      {
        "name": "Ruby",
        "versions": [
          "0.0.1"
        ]
      }
    ],
    "title": "Example title",
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    },
    "page_views_count": 100,
    "team_membership": {
      "name": "Qiita キータ"
    },
    "organization_url_name": "qiita-inc",
    "slide": false
  }
]

GET /api/v2/users/:user_id/items

List a user's items in newest order.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/users/:user_id/items?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "rendered_body": "<h1>Example</h1>",
    "body": "# Example",
    "coediting": false,
    "comments_count": 100,
    "created_at": "2000-01-01T00:00:00+00:00",
    "group": {
      "created_at": "2000-01-01T00:00:00+00:00",
      "description": "This group is for developers.",
      "name": "Dev",
      "private": false,
      "updated_at": "2000-01-01T00:00:00+00:00",
      "url_name": "dev"
    },
    "id": "c686397e4a0f4f11683d",
    "likes_count": 100,
    "private": false,
    "reactions_count": 100,
    "stocks_count": 100,
    "tags": [
      {
        "name": "Ruby",
        "versions": [
          "0.0.1"
        ]
      }
    ],
    "title": "Example title",
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    },
    "page_views_count": 100,
    "team_membership": {
      "name": "Qiita キータ"
    },
    "organization_url_name": "qiita-inc",
    "slide": false
  }
]

GET /api/v2/users/:user_id/stocks

List a user's stocked items in recently-stocked order.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/users/:user_id/stocks?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "rendered_body": "<h1>Example</h1>",
    "body": "# Example",
    "coediting": false,
    "comments_count": 100,
    "created_at": "2000-01-01T00:00:00+00:00",
    "group": {
      "created_at": "2000-01-01T00:00:00+00:00",
      "description": "This group is for developers.",
      "name": "Dev",
      "private": false,
      "updated_at": "2000-01-01T00:00:00+00:00",
      "url_name": "dev"
    },
    "id": "c686397e4a0f4f11683d",
    "likes_count": 100,
    "private": false,
    "reactions_count": 100,
    "stocks_count": 100,
    "tags": [
      {
        "name": "Ruby",
        "versions": [
          "0.0.1"
        ]
      }
    ],
    "title": "Example title",
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url": "https://qiita.com/Qiita/items/c686397e4a0f4f11683d",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    },
    "page_views_count": 100,
    "team_membership": {
      "name": "Qiita キータ"
    },
    "organization_url_name": "qiita-inc",
    "slide": false
  }
]

Like

The Like API on Qiita Team has been abolished since Nov 4 2020. Please use the Emoji reaction API instead. Represents a like to an item.

  • created_at
    • Date-time when this data was created
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
    • Format: date-time
  • user
    • A Qiita user (a.k.a. account)

GET /api/v2/items/:item_id/likes

List likes in newest order.

GET /api/v2/items/:item_id/likes HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "created_at": "2000-01-01T00:00:00+00:00",
    "user": {
      "description": "Hello, world.",
      "facebook_id": "qiita",
      "followees_count": 100,
      "followers_count": 200,
      "github_login_name": "qiitan",
      "id": "qiita",
      "items_count": 300,
      "linkedin_id": "qiita",
      "location": "Tokyo, Japan",
      "name": "Qiita キータ",
      "organization": "Qiita Inc.",
      "permanent_id": 1,
      "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
      "team_only": false,
      "twitter_screen_name": "qiita",
      "website_url": "https://qiita.com"
    }
  }
]

Project

Project function has been abolished since Oct 1 2022.

GET /api/v2/projects

GET /api/v2/projects has been abolished since Oct 1 2022.

POST /api/v2/projects

POST /api/v2/projects has been abolished since Oct 1 2022.

DELETE /api/v2/projects/:project_id

DELETE /api/v2/projects/:project_id has been abolished since Oct 1 2022.

GET /api/v2/projects/:project_id

GET /api/v2/projects/:project_id has been abolished since Oct 1 2022.

PATCH /api/v2/projects/:project_id

PATCH /api/v2/projects/:project_id has been abolished since Oct 1 2022.

POST /api/v2/imported_projects

POST /api/v2/imported_projects has been abolished since Oct 1 2022.

Remove team member

Removes the specified user from the team (you and the team owner cannot be removed with this API).

DELETE /api/v2/remove_team_member/:user_id

DELETE /api/v2/remove_team_member/:user_id HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Tag

A tag attached to an item

  • followers_count
    • Followes count
    • Example: 100
    • Type: integer
  • icon_url
    • Tag Icon URL
    • Example: "https://s3-ap-northeast-1.amazonaws.com/qiita-tag-image/9de6a11d330f5694820082438f88ccf4a1b289b2/medium.jpg"
    • Type: null, string
  • id
    • Tag name
    • Example: "qiita"
    • Type: string
  • items_count
    • Items count
    • Example: 200
    • Type: integer

GET /api/v2/tags

List tags in newest order.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
  • sort
    • Sort order ("count" and "name" are available)
    • Example: "count"
    • Type: string
GET /api/v2/tags?page=1&per_page=20&sort=count HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "followers_count": 100,
    "icon_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-tag-image/9de6a11d330f5694820082438f88ccf4a1b289b2/medium.jpg",
    "id": "qiita",
    "items_count": 200
  }
]

GET /api/v2/tags/:tag_id

Get a tag.

GET /api/v2/tags/:tag_id HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "followers_count": 100,
  "icon_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-tag-image/9de6a11d330f5694820082438f88ccf4a1b289b2/medium.jpg",
  "id": "qiita",
  "items_count": 200
}

GET /api/v2/users/:user_id/following_tags

List tags a user is following to in recently-tagged order.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/users/:user_id/following_tags?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "followers_count": 100,
    "icon_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-tag-image/9de6a11d330f5694820082438f88ccf4a1b289b2/medium.jpg",
    "id": "qiita",
    "items_count": 200
  }
]

DELETE /api/v2/tags/:tag_id/following

Unfollow a tag.

DELETE /api/v2/tags/:tag_id/following HTTP/1.1
Host: api.example.com
HTTP/1.1 204

GET /api/v2/tags/:tag_id/following

Check if you are following a tag or not.

GET /api/v2/tags/:tag_id/following HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "followers_count": 100,
  "icon_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-tag-image/9de6a11d330f5694820082438f88ccf4a1b289b2/medium.jpg",
  "id": "qiita",
  "items_count": 200
}

PUT /api/v2/tags/:tag_id/following

Follow a tag.

PUT /api/v2/tags/:tag_id/following HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Tagging

Represents an association between an item and a tag.

  • name
    • Tag name
    • Example: "qiita"
    • Type: string
  • versions
    • Example: ["0.0.1"]
    • Type: array

POST /api/v2/items/:item_id/taggings

Add a tag to an item (only available on Qiita Team)

  • name
    required
    • Tag name
    • Example: "qiita"
    • Type: string
  • versions
    • Example: ["0.0.1"]
    • Type: array
POST /api/v2/items/:item_id/taggings HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "name": "qiita",
  "versions": [
    "0.0.1"
  ]
}
HTTP/1.1 201
Content-Type: application/json

{
  "name": "qiita",
  "versions": [
    "0.0.1"
  ]
}

DELETE /api/v2/items/:item_id/taggings/:tagging_id

Remove a tag from an item (only available on Qiita Team)

DELETE /api/v2/items/:item_id/taggings/:tagging_id HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Team

Represents a team on Qiita Team (only available on Qiita Team).

  • active
    • A flag whether this team is active or not
    • Example: true
    • Type: boolean
  • id
    • A unique team ID
    • Example: "qiita-inc"
    • Type: string
  • name
    • The team name configured for this team
    • Example: "Qiita Inc."
    • Type: string

GET /api/v2/teams

List teams the user belongs to in newest order.

GET /api/v2/teams HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "active": true,
    "id": "qiita-inc",
    "name": "Qiita Inc."
  }
]

Team access token

Access token for Qiita API v2 (only available on Qiita Team).

  • client_id
    • An unique ID to identify a registered client
    • Example: "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
  • scopes
    • Authorized action scopes of the team access token
    • Type: array
  • token
    • Team access token identifier string
    • Example: "ea5d0a593b2655e9568f144fb1826342292f5c6b7d406fda00577b8d1530d8a5"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/

POST /api/v2/team_access_tokens

Create a new team access token.

  • client_id
    required
    • An unique ID to identify a registered client
    • Example: "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
  • client_secret
    required
    • A secret key to authenticate a registered API client
    • Example: "01fc259c31fe39e72c8ef911c3432a33d51e9337ff34c4fac86c491a0d37251f"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
  • code
    required
    • A temporary secret code to exchange with a team access token
    • Example: "fefef5f067171f247fb415e38cb0631797b82f4141dcdee66db846c3ade57a03"
    • Type: string
    • Pattern: /^[0-9a-f]{40}$/
POST /api/v2/team_access_tokens HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "client_id": "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d",
  "client_secret": "01fc259c31fe39e72c8ef911c3432a33d51e9337ff34c4fac86c491a0d37251f",
  "code": "fefef5f067171f247fb415e38cb0631797b82f4141dcdee66db846c3ade57a03"
}
HTTP/1.1 201
Content-Type: application/json

{
  "client_id": "a91f0396a0968ff593eafdd194e3d17d32c41b1da7b25e873b42e9058058cd9d",
  "scopes": [
    "read_qiita_team"
  ],
  "token": "ea5d0a593b2655e9568f144fb1826342292f5c6b7d406fda00577b8d1530d8a5"
}

DELETE /api/v2/team_access_tokens/:team_access_token

Deactivate a team access token.

DELETE /api/v2/team_access_tokens/:team_access_token HTTP/1.1
Host: api.example.com
HTTP/1.1 204

Team member

Represents a member in team (only available on Qiita Team).

  • description
    • Self introduction
    • Example: "Qiitaの公式アカウントです。"
    • Type: string
  • email
    • Email address of the member (return empty string when you are neither admin nor owner in team)
    • Example: "example@example.com"
    • Type: string
  • id
    • User ID
    • Example: "Qiita"
    • Type: string
  • last_accessed_at
    • Date-time when this member was accessed (return empty string when you are neither admin nor owner in team)
    • Example: "2000-01-01T00:00:00+00:00"
    • Type: string
  • name
    • User name in the team
    • Example: "Qiita キータ"
    • Type: string

GET /api/v2/team_memberships

List members in team.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/team_memberships?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "description": "Qiitaの公式アカウントです。",
    "email": "example@example.com",
    "id": "Qiita",
    "last_accessed_at": "2000-01-01T00:00:00+00:00",
    "name": "Qiita キータ"
  }
]

Template

Represents a template for generating an item boilerplate (only available on Qiita Team).

  • body
    • The body of this template
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
  • id
    • A unique template ID
    • Example: 1
    • Type: integer
  • name
    • A template name
    • Example: "Weekly MTG"
    • Type: string
  • expanded_body
    • An item body where variables are expanded
    • Example: "Weekly MTG on 2000/01/01"
    • Type: string
  • expanded_tags
    • A list of tags where variables are expanded
    • Example: [{"name"=>"MTG/2000/01/01", "versions"=>["0.0.1"]}]
    • Type: array
  • expanded_title
    • An item title where variables are expanded
    • Example: "Weekly MTG on 2015/06/03"
    • Type: string
  • group
    • Represents a group on Qiita Team
  • tags
    • A list of tags
    • Example: [{"name"=>"MTG/%{Year}/%{month}/%{day}", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    • A template title where variables are to be expanded
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
  • coedit
    • Co-editing mode.
    • Example: true
    • Type: boolean

GET /api/v2/templates

List templates in a team.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/templates?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "body": "Weekly MTG on %{Year}/%{month}/%{day}",
    "id": 1,
    "name": "Weekly MTG",
    "expanded_body": "Weekly MTG on 2000/01/01",
    "expanded_tags": [
      {
        "name": "MTG/2000/01/01",
        "versions": [
          "0.0.1"
        ]
      }
    ],
    "expanded_title": "Weekly MTG on 2015/06/03",
    "group": {
      "created_at": "2000-01-01T00:00:00+00:00",
      "description": "This group is for developers.",
      "name": "Dev",
      "private": false,
      "updated_at": "2000-01-01T00:00:00+00:00",
      "url_name": "dev"
    },
    "tags": [
      {
        "name": "MTG/%{Year}/%{month}/%{day}",
        "versions": [
          "0.0.1"
        ]
      }
    ],
    "title": "Weekly MTG on %{Year}/%{month}/%{day}",
    "coedit": true
  }
]

DELETE /api/v2/templates/:template_id

Delete a template.

DELETE /api/v2/templates/:template_id HTTP/1.1
Host: api.example.com
HTTP/1.1 204

GET /api/v2/templates/:template_id

Get a template.

GET /api/v2/templates/:template_id HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "body": "Weekly MTG on %{Year}/%{month}/%{day}",
  "id": 1,
  "name": "Weekly MTG",
  "expanded_body": "Weekly MTG on 2000/01/01",
  "expanded_tags": [
    {
      "name": "MTG/2000/01/01",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "expanded_title": "Weekly MTG on 2015/06/03",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "tags": [
    {
      "name": "MTG/%{Year}/%{month}/%{day}",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Weekly MTG on %{Year}/%{month}/%{day}",
  "coedit": true
}

POST /api/v2/templates

Create a new template.

  • body
    required
    • The body of this template
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
  • name
    required
    • A template name
    • Example: "Weekly MTG"
    • Type: string
  • tags
    required
    • A list of tags
    • Example: [{"name"=>"MTG/%{Year}/%{month}/%{day}", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    required
    • A template title where variables are to be expanded
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
  • coedit
    • Co-editing mode.
    • Example: true
    • Type: boolean
  • group_url_name
    • A group's url_name on which share item using this template (pass null to make public).
    • Example: "dev"
    • Type: string, null
POST /api/v2/templates HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "Weekly MTG on %{Year}/%{month}/%{day}",
  "name": "Weekly MTG",
  "tags": [
    {
      "name": "MTG/%{Year}/%{month}/%{day}",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Weekly MTG on %{Year}/%{month}/%{day}",
  "coedit": true,
  "group_url_name": "dev"
}
HTTP/1.1 201
Content-Type: application/json

{
  "body": "Weekly MTG on %{Year}/%{month}/%{day}",
  "id": 1,
  "name": "Weekly MTG",
  "expanded_body": "Weekly MTG on 2000/01/01",
  "expanded_tags": [
    {
      "name": "MTG/2000/01/01",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "expanded_title": "Weekly MTG on 2015/06/03",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "tags": [
    {
      "name": "MTG/%{Year}/%{month}/%{day}",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Weekly MTG on %{Year}/%{month}/%{day}",
  "coedit": true
}

PATCH /api/v2/templates/:template_id

Update a template.

  • body
    required
    • The body of this template
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
  • name
    required
    • A template name
    • Example: "Weekly MTG"
    • Type: string
  • tags
    required
    • A list of tags
    • Example: [{"name"=>"MTG/%{Year}/%{month}/%{day}", "versions"=>["0.0.1"]}]
    • Type: array
  • title
    required
    • A template title where variables are to be expanded
    • Example: "Weekly MTG on %{Year}/%{month}/%{day}"
    • Type: string
  • coedit
    • Co-editing mode.
    • Example: true
    • Type: boolean
  • group_url_name
    • A group's url_name on which share item using this template (pass null to make public).
    • Example: "dev"
    • Type: string, null
PATCH /api/v2/templates/:template_id HTTP/1.1
Content-Type: application/json
Host: api.example.com

{
  "body": "Weekly MTG on %{Year}/%{month}/%{day}",
  "name": "Weekly MTG",
  "tags": [
    {
      "name": "MTG/%{Year}/%{month}/%{day}",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Weekly MTG on %{Year}/%{month}/%{day}",
  "coedit": true,
  "group_url_name": "dev"
}
HTTP/1.1 200
Content-Type: application/json

{
  "body": "Weekly MTG on %{Year}/%{month}/%{day}",
  "id": 1,
  "name": "Weekly MTG",
  "expanded_body": "Weekly MTG on 2000/01/01",
  "expanded_tags": [
    {
      "name": "MTG/2000/01/01",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "expanded_title": "Weekly MTG on 2015/06/03",
  "group": {
    "created_at": "2000-01-01T00:00:00+00:00",
    "description": "This group is for developers.",
    "name": "Dev",
    "private": false,
    "updated_at": "2000-01-01T00:00:00+00:00",
    "url_name": "dev"
  },
  "tags": [
    {
      "name": "MTG/%{Year}/%{month}/%{day}",
      "versions": [
        "0.0.1"
      ]
    }
  ],
  "title": "Weekly MTG on %{Year}/%{month}/%{day}",
  "coedit": true
}

User

A Qiita user (a.k.a. account)

  • description
    • self-description
    • Example: "Hello, world."
    • Type: null, string
  • facebook_id
    • Facebook ID
    • Example: "qiita"
    • Type: null, string
  • followees_count
    • Followees count
    • Example: 100
    • Type: integer
  • followers_count
    • Followers count
    • Example: 200
    • Type: integer
  • github_login_name
    • GitHub ID
    • Example: "qiitan"
    • Type: null, string
  • id
    • User ID
    • Example: "qiita"
    • Type: string
  • items_count
    • How many items a user posted on qiita.com (Items on Qiita Team are not included)
    • Example: 300
    • Type: integer
  • linkedin_id
    • LinkedIn ID
    • Example: "qiita"
    • Type: null, string
  • location
    • Location
    • Example: "Tokyo, Japan"
    • Type: null, string
  • name
    • Customized user name
    • Example: "Qiita キータ"
    • Type: null, string
  • organization
    • Organization which a user belongs to
    • Example: "Qiita Inc."
    • Type: null, string
  • permanent_id
    • Unique integer ID
    • Example: 1
    • Type: integer
  • profile_image_url
    • Profile image URL
    • Example: "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439"
    • Type: string
  • team_only
    • A flag whether this user is configured as team-only
    • Example: false
    • Type: boolean
  • twitter_screen_name
    • Twitter screen name
    • Example: "qiita"
    • Type: null, string
  • website_url
    • Website URL
    • Example: "https://qiita.com"
    • Type: null, string

GET /api/v2/items/:item_id/stockers

List users who stocked an item in recent-stocked order.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/items/:item_id/stockers?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
]

GET /api/v2/users

List users in newest order.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/users?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
]

GET /api/v2/users/:user_id

Get a user.

GET /api/v2/users/:user_id HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "description": "Hello, world.",
  "facebook_id": "qiita",
  "followees_count": 100,
  "followers_count": 200,
  "github_login_name": "qiitan",
  "id": "qiita",
  "items_count": 300,
  "linkedin_id": "qiita",
  "location": "Tokyo, Japan",
  "name": "Qiita キータ",
  "organization": "Qiita Inc.",
  "permanent_id": 1,
  "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
  "team_only": false,
  "twitter_screen_name": "qiita",
  "website_url": "https://qiita.com"
}

GET /api/v2/users/:user_id/followees

List users a user is following.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/users/:user_id/followees?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
]

GET /api/v2/users/:user_id/followers

List users who are following a user.

  • page
    • Page number (from 1 to 100)
    • Example: 1
    • Type: string
    • Pattern: /^[0-9]+$/
  • per_page
    • Records count per page (from 1 to 100)
    • Example: 20
    • Type: string
    • Pattern: /^[0-9]+$/
GET /api/v2/users/:user_id/followers?page=1&per_page=20 HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

[
  {
    "description": "Hello, world.",
    "facebook_id": "qiita",
    "followees_count": 100,
    "followers_count": 200,
    "github_login_name": "qiitan",
    "id": "qiita",
    "items_count": 300,
    "linkedin_id": "qiita",
    "location": "Tokyo, Japan",
    "name": "Qiita キータ",
    "organization": "Qiita Inc.",
    "permanent_id": 1,
    "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
    "team_only": false,
    "twitter_screen_name": "qiita",
    "website_url": "https://qiita.com"
  }
]

DELETE /api/v2/users/:user_id/following

Unfollow a user.

DELETE /api/v2/users/:user_id/following HTTP/1.1
Host: api.example.com
HTTP/1.1 204

GET /api/v2/users/:user_id/following

Check if the current user is following a user.

GET /api/v2/users/:user_id/following HTTP/1.1
Host: api.example.com
HTTP/1.1 200
Content-Type: application/json

{
  "description": "Hello, world.",
  "facebook_id": "qiita",
  "followees_count": 100,
  "followers_count": 200,
  "github_login_name": "qiitan",
  "id": "qiita",
  "items_count": 300,
  "linkedin_id": "qiita",
  "location": "Tokyo, Japan",
  "name": "Qiita キータ",
  "organization": "Qiita Inc.",
  "permanent_id": 1,
  "profile_image_url": "https://s3-ap-northeast-1.amazonaws.com/qiita-image-store/0/88/ccf90b557a406157dbb9d2d7e543dae384dbb561/large.png?1575443439",
  "team_only": false,
  "twitter_screen_name": "qiita",
  "website_url": "https://qiita.com"
}

PUT /api/v2/users/:user_id/following

Follow a user.

PUT /api/v2/users/:user_id/following HTTP/1.1
Host: api.example.com
HTTP/1.1 204