Getting started with Nifty API
1.0

Hello and welcome! We're excited to have you build your own integrations and Nifty apps with our REST API documentation.

The lefthand sidebar will allow you to navigate to the Authentication section as well as explore our Endpoints section. Each Endpoint has an example Request and Response to help you understand how to leverage the call.

We apply request rate limits per token to make sure the API runs efficiently for everyone.

GET: 200 requests per minute
POST: 50 requests per minute
PUT: 50 requests per minute
DELETE: 10 requests per minute

Get started in the Authentication section of the document. Please note that our API is available to customers on the Business Plan and above. Contact team@niftypm.com if you're a third party tool looking to partner and build an integration with Nifty.

You can try our API using Swagger.

This is the documentation for version 1.0 of the API. Last update on Dec 2, 2022.

Base URL
https://openapi.niftypm.com

Authentication

Bearer (http)

Send a bearer token (“JWT” Formatted) in the Authorization http header to authenticate with the API.


Generate Token

POST /oauth/token

This endpoint is used to generate refresh token using parameters client_id, code and client_secret.

If Grant type is "authorization_code" then request body must have two mandatory parameters, called "code" and "redirect_uri".

While generating new access token on expiry, request body must have grant type as "refresh_token" and mandatory parameter called "refresh_token".

Headers

  • The string Basic with your Client ID and Client Secret separated with colon (:), Base64-encoded. For example, Client_ID:Client_Secret Base64-encoded is Q2xpZW50X0lEOkNsaWVudF9TZWNyZXQ=.

Body Required

  • code string Required

    Code will be come from the authorize url call back redirect url.

  • refresh_token string Required

    Refresh Token

  • grant_type string Required

    Grant Type.

    Values are authorization_code or refresh_token.

  • redirect_uri string Required

    Redirect URI

Responses

  • 201 object

    Generates required refresh tokem and access token.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

POST /oauth/token
curl \
 -X POST https://openapi.niftypm.com/oauth/token \
 -H "Content-Type: application/json" \
 -H "authorization: string" \
 -d '{"code":"Pk6DnFY4q9Z1X7aOQATV5z4bxg1rjwH4","refresh_token":"string","grant_type":"authorization_code","redirect_uri":"string"}'
Request example
# Headers
authorization: string

# Payload
{
  "code": "Pk6DnFY4q9Z1X7aOQATV5z4bxg1rjwH4",
  "refresh_token": "string",
  "grant_type": "authorization_code",
  "redirect_uri": "string"
}
Response example (201)
{
  "access_token": "string",
  "token_type": "string",
  "refresh_token": "string",
  "expires_in": 42.0,
  "scope": "file"
}

Get Documents

GET /api/v1.0/docs

This endpoint fetch lsit of all the documents based on given query parameters.

Query parameters

Responses

GET /api/v1.0/docs
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/docs?project_id=string&task_id=string \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "access_type": "string",
      "type": "string",
      "subtype": "string",
      "external_id": "string",
      "content": {},
      "author": "string",
      "project_id": "string",
      "tasks": [
        "string"
      ],
      "archived": true,
      "members": [
        {
          "id": "string",
          "permission": "string",
          "is_author": true,
          "active": true,
          "last_seen": "2022-05-04T09:42:00+00:00",
          "last_edited": "2022-05-04T09:42:00+00:00"
        }
      ],
      "discussion_keys": [
        "string"
      ],
      "public_token": "string",
      "share_token": "string",
      "created_at": "2022-05-04T09:42:00+00:00",
      "comments": 42.0,
      "hasAccess": true,
      "labels": [
        "string"
      ],
      "folder": "string",
      "order": 42.0,
      "multipage": true,
      "parent_doc_id": "string"
    }
  ],
  "hasMore": false
}

Create document

POST /api/v1.0/docs

This endpoint creates a new document.

Body Required

Responses

  • 201 object

    The resource created successfully

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

POST /api/v1.0/docs
curl \
 -X POST https://openapi.niftypm.com/api/v1.0/docs \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","parent_doc_id":"string","project_id":"string","googleAccessToken":"string","type":"string","subtype":"string","private":true,"access_type":"public","content":{},"external_id":"string","folder_id":"string","folder_stack":["string"],"order":42.0}'
Request example
{
  "name": "string",
  "parent_doc_id": "string",
  "project_id": "string",
  "googleAccessToken": "string",
  "type": "string",
  "subtype": "string",
  "private": true,
  "access_type": "public",
  "content": {},
  "external_id": "string",
  "folder_id": "string",
  "folder_stack": [
    "string"
  ],
  "order": 42.0
}
Response example (201)
{
  "message": "string",
  "doc_id": "string",
  "folder": "string"
}

Get Personal Documents

GET /api/v1.0/docs/personal

This endpoint fetch lsit of all the personal documents based on given query parameters.

Query parameters

Responses

GET /api/v1.0/docs/personal
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/docs/personal \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "items": [
    {
      "id": "string",
      "name": "string",
      "access_type": "string",
      "type": "string",
      "subtype": "string",
      "external_id": "string",
      "content": {},
      "author": "string",
      "project_id": "string",
      "tasks": [
        "string"
      ],
      "archived": true,
      "members": [
        {
          "id": "string",
          "permission": "string",
          "is_author": true,
          "active": true,
          "last_seen": "2022-05-04T09:42:00+00:00",
          "last_edited": "2022-05-04T09:42:00+00:00"
        }
      ],
      "discussion_keys": [
        "string"
      ],
      "public_token": "string",
      "share_token": "string",
      "created_at": "2022-05-04T09:42:00+00:00",
      "comments": 42.0,
      "hasAccess": true,
      "labels": [
        "string"
      ],
      "folder": "string",
      "order": 42.0,
      "multipage": true,
      "parent_doc_id": "string"
    }
  ],
  "hasMore": false
}

Create Personal Document

POST /api/v1.0/docs/personal

This endpoint creates a new personal document based on given request data.

Body Required

Responses

  • 201 object

    The resource created successfully

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

POST /api/v1.0/docs/personal
curl \
 -X POST https://openapi.niftypm.com/api/v1.0/docs/personal \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","parent_doc_id":"string","project_id":"string","googleAccessToken":"string","type":"string","subtype":"string","private":true,"access_type":"public","content":{},"external_id":"string","folder_id":"string","folder_stack":["string"],"order":42.0}'
Request example
{
  "name": "string",
  "parent_doc_id": "string",
  "project_id": "string",
  "googleAccessToken": "string",
  "type": "string",
  "subtype": "string",
  "private": true,
  "access_type": "public",
  "content": {},
  "external_id": "string",
  "folder_id": "string",
  "folder_stack": [
    "string"
  ],
  "order": 42.0
}
Response example (201)
{
  "message": "string",
  "doc_id": "string"
}

Get Document

GET /api/v1.0/docs/{document_id}

This endpoint fetch a particular document based on document id.

Path parameters

Responses

GET /api/v1.0/docs/{document_id}
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/docs/{document_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "id": "string",
  "name": "string",
  "access_type": "string",
  "type": "string",
  "subtype": "string",
  "external_id": "string",
  "content": {},
  "author": "string",
  "project_id": "string",
  "tasks": [
    "string"
  ],
  "archived": true,
  "members": [
    {
      "id": "string",
      "permission": "string",
      "is_author": true,
      "active": true,
      "last_seen": "2022-05-04T09:42:00+00:00",
      "last_edited": "2022-05-04T09:42:00+00:00"
    }
  ],
  "discussion_keys": [
    "string"
  ],
  "public_token": "string",
  "share_token": "string",
  "created_at": "2022-05-04T09:42:00+00:00",
  "comments": 42.0,
  "hasAccess": true,
  "labels": [
    "string"
  ],
  "folder": "string",
  "order": 42.0,
  "multipage": true,
  "parent_doc_id": "string"
}

Update Document

PUT /api/v1.0/docs/{document_id}

This endpoint updates document using unique document id with given data.

Path parameters

Body Required

Responses

  • 200 object

    Success Response

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/docs/{document_id}
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/docs/{document_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","archived":true,"access_type":"public","force":true,"content":{},"folder_id":"string","folder_stack":["string"],"multipage":true,"order":42.0}'
Request example
{
  "name": "string",
  "archived": true,
  "access_type": "public",
  "force": true,
  "content": {},
  "folder_id": "string",
  "folder_stack": [
    "string"
  ],
  "multipage": true,
  "order": 42.0
}
Response example (200)
{
  "message": "string",
  "doc_id": "string"
}

Remove Document

DELETE /api/v1.0/docs/{document_id}

This endpoint removes a document using unique identifier id.

Path parameters

Responses

  • 204 object

    The record has been updated successfully.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 404

    The record doesn't exist.

  • 405

    The request method is known by the server but is not supported by the target resource.

DELETE /api/v1.0/docs/{document_id}
curl \
 -X DELETE https://openapi.niftypm.com/api/v1.0/docs/{document_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (204)
{
  "message": "string"
}

Move Document

PUT /api/v1.0/docs/{document_id}/move_to_project

This endpoint moves a document into another project folder.

Path parameters

Body Required

Responses

  • 200 object

    Success Response

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/docs/{document_id}/move_to_project
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/docs/{document_id}/move_to_project \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"folder_id":"string","folder_stack":"string","project_id":"string"}'
Request example
{
  "folder_id": "string",
  "folder_stack": "string",
  "project_id": "string"
}
Response example (200)
{
  "message": "string",
  "doc_id": "string"
}

Update Document Member

PUT /api/v1.0/docs/{document_id}/members

This endpoint updates document's members list

Path parameters

Body Required

Responses

  • 200 object

    Success Response

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/docs/{document_id}/members
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/docs/{document_id}/members \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"members":[{"id":"string","permission":"view"}],"folder_stack":["string"]}'
Request example
{
  "members": [
    {
      "id": "string",
      "permission": "view"
    }
  ],
  "folder_stack": [
    "string"
  ]
}
Response example (200)
{
  "message": "string",
  "added_members": [
    "string"
  ],
  "updated_members": [
    "string"
  ]
}

Remove Document Member

DELETE /api/v1.0/docs/{document_id}/members

This endpoint removes member from given document.

Path parameters

Body Required

  • members array[string] Required

    Document members

Responses

  • 204 object

    The record has been updated successfully.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 404

    The record doesn't exist.

  • 405

    The request method is known by the server but is not supported by the target resource.

DELETE /api/v1.0/docs/{document_id}/members
curl \
 -X DELETE https://openapi.niftypm.com/api/v1.0/docs/{document_id}/members \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"members":["string"]}'
Request example
{
  "members": [
    "string"
  ]
}
Response example (204)
{
  "message": "string",
  "members_id": [
    "string"
  ]
}

Update Document

POST /api/v1.0/docs/{document_id}/change

This endpoint update the document.

Path parameters

Responses

  • 201 object

    The resource created successfully

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

POST /api/v1.0/docs/{document_id}/change
curl \
 -X POST https://openapi.niftypm.com/api/v1.0/docs/{document_id}/change \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (201)
{
  "success": true
}

Update Document Labels

PUT /api/v1.0/docs/{document_id}/labels

This endpoint updates the labels for the document.

Path parameters

Body Required

Responses

  • 200 object

    Success Response

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/docs/{document_id}/labels
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/docs/{document_id}/labels \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"labels":["string"]}'
Request example
{
  "labels": [
    "string"
  ]
}
Response example (200)
{
  "message": "string",
  "labels": [
    "string"
  ]
}

Remove Document Labels

DELETE /api/v1.0/docs/{document_id}/labels

This endpoint removes labels from the document.

Path parameters

Body Required

Responses

  • 204 object

    The record has been updated successfully.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 404

    The record doesn't exist.

  • 405

    The request method is known by the server but is not supported by the target resource.

DELETE /api/v1.0/docs/{document_id}/labels
curl \
 -X DELETE https://openapi.niftypm.com/api/v1.0/docs/{document_id}/labels \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"labels":["string"]}'
Request example
{
  "labels": [
    "string"
  ]
}
Response example (204)
{
  "message": "string",
  "labels": [
    "string"
  ]
}

Get Files

GET /api/v1.0/files

This endpoint fetch list of files based on the given query parameters.

Query parameters

Responses

GET /api/v1.0/files
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/files?project_id=string&task_id=string&doc_id=string&user_id=string \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "hasMore": false,
  "files": [
    {
      "id": "string",
      "name": "string",
      "size": 42.0,
      "url": "string",
      "download": "string",
      "thumbnail": "string",
      "uploader": "string",
      "comments": 42.0,
      "created_at": "2022-05-04T09:42:00+00:00",
      "googleId": "string",
      "googleType": "string",
      "processed": true,
      "task": "string",
      "project_id": "string",
      "message": "string",
      "labels": [
        "string"
      ],
      "folder": "string",
      "folder_stack": [
        "string"
      ],
      "document": "string",
      "annotations_task_id": "string"
    }
  ]
}

Upload Files

POST /api/v1.0/files

This endpoint uploads multiples files.

Query parameters

Responses

POST /api/v1.0/files
curl \
 -X POST https://openapi.niftypm.com/api/v1.0/files?project_id=string&task_id=string&doc_id=string \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (201)
{
  "message": "string",
  "files": [
    {
      "id": "string",
      "name": "string",
      "size": 42.0,
      "url": "string",
      "download": "string",
      "thumbnail": "string",
      "uploader": "string",
      "comments": 42.0,
      "created_at": "2022-05-04T09:42:00+00:00",
      "googleId": "string",
      "googleType": "string",
      "processed": true,
      "task": "string",
      "project_id": "string",
      "message": "string",
      "labels": [
        "string"
      ],
      "folder": "string",
      "folder_stack": [
        "string"
      ],
      "document": "string",
      "annotations_task_id": "string"
    }
  ]
}

Get File

GET /api/v1.0/files/{file_id}

This endpoint fetch the details of the file based on unique file identified

Path parameters

Responses

GET /api/v1.0/files/{file_id}
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/files/{file_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "id": "string",
  "name": "string",
  "size": 42.0,
  "url": "string",
  "download": "string",
  "thumbnail": "string",
  "uploader": "string",
  "comments": 42.0,
  "created_at": "2022-05-04T09:42:00+00:00",
  "googleId": "string",
  "googleType": "string",
  "processed": true,
  "task": "string",
  "project_id": "string",
  "message": "string",
  "labels": [
    "string"
  ],
  "folder": "string",
  "folder_stack": [
    "string"
  ],
  "document": "string",
  "annotations_task_id": "string"
}

Update File

PUT /api/v1.0/files/{file_id}

This endpoint update the file details.

Path parameters

Body Required

Responses

  • 200 object

    Success Response

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/files/{file_id}
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/files/{file_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"folder_id":"string","folder_stack":["string"],"annotations_task_id":"string"}'
Request example
{
  "folder_id": "string",
  "folder_stack": [
    "string"
  ],
  "annotations_task_id": "string"
}
Response example (200)
{
  "message": "string",
  "file_id": "string"
}

Remove File

DELETE /api/v1.0/files/{file_id}

This endpoint removes the file using the unique file idetifier.

Path parameters

Responses

  • 200 object

    Success Response

    • message string Required

      Success message

    • id string Required

      Created Label ID

  • 204 object

    The record has been updated successfully.

    • message string Required

      Success message

    • id string Required

      Created Label ID

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 404

    The record doesn't exist.

  • 405

    The request method is known by the server but is not supported by the target resource.

DELETE /api/v1.0/files/{file_id}
curl \
 -X DELETE https://openapi.niftypm.com/api/v1.0/files/{file_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "message": "string",
  "id": "string"
}
Response example (204)
{
  "message": "string",
  "id": "string"
}

Copy File

POST /api/v1.0/files/{file_id}/copy

This endpoint creates a new copy of the file.

Path parameters

Body Required

  • task_id string Required

    Task ID associated with the file

  • message_id string Required

    Message ID associated with the file

  • project_id string Required

    Project ID associated with the file

Responses

  • 201

    The resource created successfully

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

POST /api/v1.0/files/{file_id}/copy
curl \
 -X POST https://openapi.niftypm.com/api/v1.0/files/{file_id}/copy \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"task_id":"string","message_id":"string","project_id":"string"}'
Request example
{
  "task_id": "string",
  "message_id": "string",
  "project_id": "string"
}

Add File Labels

PUT /api/v1.0/files/{file_id}/labels

This endpoint adds the labels for the file.

Path parameters

Body Required

Responses

  • 200 object

    Success Response

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/files/{file_id}/labels
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/files/{file_id}/labels \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"labels":["string"]}'
Request example
{
  "labels": [
    "string"
  ]
}
Response example (200)
{
  "message": "string",
  "labels": [
    "string"
  ]
}

Remove File Labels

DELETE /api/v1.0/files/{file_id}/labels

This endpoint remove the labels from the file.

Path parameters

Body Required

Responses

  • 200 object

    Success Response

  • 204 object

    The record has been updated successfully.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 404

    The record doesn't exist.

  • 405

    The request method is known by the server but is not supported by the target resource.

DELETE /api/v1.0/files/{file_id}/labels
curl \
 -X DELETE https://openapi.niftypm.com/api/v1.0/files/{file_id}/labels \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"labels":["string"]}'
Request example
{
  "labels": [
    "string"
  ]
}
Response example (200)
{
  "message": "string",
  "labels": [
    "string"
  ]
}
Response example (204)
{
  "message": "string",
  "labels": [
    "string"
  ]
}

Get Labels

GET /api/v1.0/labels

This endpoint fetch list of all the label based on given query parameters.

Query parameters

  • limit number

    No of records per page

  • offset number

    Record Offset

  • type string

    Label Type

    Values are others or member.

Responses

  • 200 object

    Success Response

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

GET /api/v1.0/labels
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/labels \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "hasMore": false,
  "items": [
    {
      "id": "string",
      "name": "string",
      "color": "string",
      "type": "string",
      "created_by": "string",
      "team": "string",
      "default": "string"
    }
  ]
}

Create Label

POST /api/v1.0/labels

This endpoint create a new label record.

Body Required

  • name string Required

    Name

  • color string Required

    Color

  • type string

    Type

    Values are others or member.

Responses

  • 201 object

    The resource created successfully

    • message string Required

      Success message

    • id string Required

      Label Record Unique ID

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

POST /api/v1.0/labels
curl \
 -X POST https://openapi.niftypm.com/api/v1.0/labels \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","color":"string","type":"others"}'
Request example
{
  "name": "string",
  "color": "string",
  "type": "others"
}
Response example (201)
{
  "message": "string",
  "id": "string"
}

Get Label

GET /api/v1.0/labels/{label_id}

This endpoint fetch the label details using unique label_id.

Responses

  • 200 object

    Success Response

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

GET /api/v1.0/labels/{label_id}
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/labels/{label_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "id": "string",
  "name": "string",
  "color": "string",
  "type": "string",
  "created_by": "string",
  "team": "string",
  "default": "string"
}

Update Label

PUT /api/v1.0/labels/{label_id}

This endpoint update the label details using unique label_id.

Body Required

Responses

  • 200 object

    Success Response

    • message string Required

      Success message

    • id string Required

      Label Record Unique ID

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/labels/{label_id}
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/labels/{label_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","color":"string"}'
Request example
{
  "name": "string",
  "color": "string"
}
Response example (200)
{
  "message": "string",
  "id": "string"
}

Remove Label

DELETE /api/v1.0/labels/{label_id}

This endpoint removes the label using unique label_id.

Responses

  • 200 object

    Success Response

    • message string Required

      Success message

    • id string Required

      Label Record Unique ID

  • 204 object

    The record has been updated successfully.

    • message string Required

      Success message

    • id string Required

      Label Record Unique ID

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 404

    The record doesn't exist.

  • 405

    The request method is known by the server but is not supported by the target resource.

DELETE /api/v1.0/labels/{label_id}
curl \
 -X DELETE https://openapi.niftypm.com/api/v1.0/labels/{label_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "message": "string",
  "id": "string"
}
Response example (204)
{
  "message": "string",
  "id": "string"
}

Get Messages

GET /api/v1.0/messags

This endpoint fetch the list of recent messages.

Query parameters

Responses

GET /api/v1.0/messags
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/messags \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "messages": [
    {
      "id": "string",
      "type": "string",
      "hide_link_preview": true,
      "subtype": "string",
      "text": "string",
      "url": "string",
      "chat": "string",
      "thread": "string",
      "task": "string",
      "file": "string",
      "document": "string",
      "entity_key": "string",
      "author": "string",
      "replies": 42.0,
      "repliers": [
        "string"
      ],
      "tagged": [
        "string"
      ],
      "seen_by": [
        "string"
      ],
      "hidden": [
        "string"
      ],
      "doc_attachment": "string",
      "attachments": [
        {
          "id": "string",
          "name": "string",
          "size": 42.0,
          "url": "string",
          "download": "string",
          "thumbnail": "string",
          "uploader": "string",
          "comments": 42.0,
          "created_at": "2022-05-04T09:42:00+00:00",
          "googleId": "string",
          "googleType": "string",
          "processed": true
        }
      ],
      "is_edited": true,
      "is_deleted": true,
      "created_at": "2022-05-04T09:42:00+00:00",
      "updated_at": "2022-05-04T09:42:00+00:00",
      "annotation_id": "string",
      "heardBy": [
        "string"
      ],
      "audio_duration": 42.0,
      "heard": true
    }
  ],
  "has_more": true
}

Create Message

POST /api/v1.0/messags

This endpoint creates a new message.

Body Required

Responses

  • 201 object

    The resource created successfully

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

POST /api/v1.0/messags
curl \
 -X POST https://openapi.niftypm.com/api/v1.0/messags \
 -H "Content-Type: application/json" \
 -d '{"type":"string","text":"string","url":"string","doc_attachment":"string","entity_key":"string","chat_id":"string","message_id":"string","task_id":"string","file_id":"string","doc_id":"string","task":{},"external_files":["string"],"nifty_files":["string"],"date":"2022-05-04T09:42:00+00:00","bot_name":"string","bot_avatar":"string","hidden":["string"],"emails":"string","annotation_id":"string","context_text":"string","audio_duration":"string"}'
Request example
{
  "type": "string",
  "text": "string",
  "url": "string",
  "doc_attachment": "string",
  "entity_key": "string",
  "chat_id": "string",
  "message_id": "string",
  "task_id": "string",
  "file_id": "string",
  "doc_id": "string",
  "task": {},
  "external_files": [
    "string"
  ],
  "nifty_files": [
    "string"
  ],
  "date": "2022-05-04T09:42:00+00:00",
  "bot_name": "string",
  "bot_avatar": "string",
  "hidden": [
    "string"
  ],
  "emails": "string",
  "annotation_id": "string",
  "context_text": "string",
  "audio_duration": "string"
}
Response example (201)
{
  "message": "string",
  "data": {}
}

Get Message

GET /api/v1.0/messags/{message_id}

This endpoint fetch more details about the message.

Responses

GET /api/v1.0/messags/{message_id}
curl \
 -X GET https://openapi.niftypm.com/api/v1.0/messags/{message_id} \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "id": "string",
  "type": "string",
  "hide_link_preview": true,
  "subtype": "string",
  "text": "string",
  "url": "string",
  "chat": "string",
  "thread": "string",
  "task": "string",
  "file": "string",
  "document": "string",
  "entity_key": "string",
  "author": "string",
  "replies": 42.0,
  "repliers": [
    "string"
  ],
  "tagged": [
    "string"
  ],
  "seen_by": [
    "string"
  ],
  "hidden": [
    "string"
  ],
  "doc_attachment": "string",
  "attachments": [
    {
      "id": "string",
      "name": "string",
      "size": 42.0,
      "url": "string",
      "download": "string",
      "thumbnail": "string",
      "uploader": "string",
      "comments": 42.0,
      "created_at": "2022-05-04T09:42:00+00:00",
      "googleId": "string",
      "googleType": "string",
      "processed": true
    }
  ],
  "is_edited": true,
  "is_deleted": true,
  "created_at": "2022-05-04T09:42:00+00:00",
  "updated_at": "2022-05-04T09:42:00+00:00",
  "annotation_id": "string",
  "heardBy": [
    "string"
  ],
  "audio_duration": 42.0,
  "heard": true
}

Update Message

PUT /api/v1.0/messags/{message_id}

This endpoint update the message.

Path parameters

Body Required

Responses

  • 200

    Success Response

  • 204

    The record doesn't exist.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 405

    The request method is known by the server but is not supported by the target resource.

PUT /api/v1.0/messags/{message_id}
curl \
 -X PUT https://openapi.niftypm.com/api/v1.0/messags/{message_id} \
 -H "Content-Type: application/json" \
 -d '{"text":"string","external_files":[{}],"hide_link_preview":true,"nifty_files":["string"]}'
Request example
{
  "text": "string",
  "external_files": [
    {}
  ],
  "hide_link_preview": true,
  "nifty_files": [
    "string"
  ]
}

Remove Message

DELETE /api/v1.0/messags/{message_id}

This endpoint removes the message.

Path parameters

Responses

  • 204 object

    The record has been updated successfully.

  • 401

    The client request has not been completed because it lacks valid authentication credentials for the requested resource.

  • 403

    The client does not have access rights to the content.

  • 404

    The record doesn't exist.

  • 405

    The request method is known by the server but is not supported by the target resource.

DELETE /api/v1.0/messags/{message_id}
curl \
 -X DELETE https://openapi.niftypm.com/api/v1.0/messags/{message_id}
Response example (204)
{
  "message_id": "string",
  "message": "string"
}

Mark Message seen

POST /api/v1.0/messags/{message_id}/see

This endpoint marks the message as seen by the member.

Path parameters

Responses

  • 201 object

    The resource created successfully