API Documentation

Invitations /api/invitations

OrganisedMinds has an invitation system in which you can invite people to people or workspaces.

In the first case a following relationship is established. See GET /api/me/follows and GET /api/me/followings to find your followers and followings

In the second case you invite someone to become a workspace member.

That means invitations are meant for a user, sent from a from_user and invites the user to something, where the to in the first case is also the from_user (are you still with us?)

Get a list of invitations

GET /api/invitations

Example output

[
  {
     "pending?" : true,
     "created_at" : "2013-12-05T13:49:11Z",
     "to" : {
        "workspace" : {
           "owner" : {
              "user_since" : "2013-12-04T13:21:55Z",
              "email" : "jane.doe@example.com",
              "avatar" : {
                 "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
                 "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
              },
              "id" : "4985984a",
              "name_or_email" : "Jane Doe",
              "last_name" : "Doe",
              "first_name" : "Jane"
           },
           "created_at" : "2013-12-05T13:49:10Z",
           "name" : "1",
           "type" : "SharedWorkspace",
           "id" : 13,
           "description" : "",
           "links" : [
              {
                 "rel" : "inbox",
                 "href" : "/api/workspaces/13/inbox"
              },
              {
                 "rel" : "stacks",
                 "href" : "/api/workspaces/13/stacks"
              },
              {
                 "rel" : "outboxes",
                 "href" : "/api/workspaces/13/outboxes"
              }
           ]
        }
     },
     "accepted?" : false,
     "user" : {
        "user_since" : "2013-12-05T10:02:29Z",
        "email" : "info@organisedminds.com",
        "avatar" : {
           "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
           "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
        },
        "id" : "0e831e95cc54",
        "name_or_email" : "Tester The Great",
        "last_name" : "The Great",
        "first_name" : "Tester"
     },
     "id" : 4,
     "declined?" : false,
     "from_user" : {
        "user_since" : "2013-12-04T13:21:55Z",
        "email" : "jane.doe@example.com",
        "avatar" : {
           "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
           "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
        },
        "id" : "4985984a",
        "name_or_email" : "Jane Doe",
        "last_name" : "Doe",
        "first_name" : "Jane"
     }
  },
  // ...
]

Get a single invitation

Fetch a single invitation. You can only obtain invitations directed at you, or created by you.

GET /api/invitations/:id

Example output

{
   "pending?" : true,
   "created_at" : "2013-12-05T13:49:11Z",
   "to" : {
      "workspace" : {
         "owner" : {
            "user_since" : "2013-12-04T13:21:55Z",
            "email" : "jane.doe@example.com",
            "avatar" : {
               "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
               "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
            },
            "id" : "4985984a",
            "name_or_email" : "Jane Doe",
            "last_name" : "Doe",
            "first_name" : "Jane"
         },
         "created_at" : "2013-12-05T13:49:10Z",
         "name" : "1",
         "type" : "SharedWorkspace",
         "id" : 13,
         "description" : "",
         "links" : [
            {
               "rel" : "inbox",
               "href" : "/api/workspaces/13/inbox"
            },
            {
               "rel" : "stacks",
               "href" : "/api/workspaces/13/stacks"
            },
            {
               "rel" : "outboxes",
               "href" : "/api/workspaces/13/outboxes"
            }
         ]
      }
   },
   "accepted?" : false,
   "user" : {
      "user_since" : "2013-12-05T10:02:29Z",
      "email" : "info@organisedminds.com",
      "avatar" : {
         "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
         "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
      },
      "id" : "0e831e95cc54",
      "name_or_email" : "Tester The Great",
      "last_name" : "The Great",
      "first_name" : "Tester"
   },
   "id" : 4,
   "declined?" : false,
   "from_user" : {
      "user_since" : "2013-12-04T13:21:55Z",
      "email" : "jane.doe@example.com",
      "avatar" : {
         "thumb_url" : "https://app.organisedminds.com/assets/app/no-profile.jpg",
         "url" : "https://app.organisedminds.com/assets/app/no-profile.jpg"
      },
      "id" : "4985984a",
      "name_or_email" : "Jane Doe",
      "last_name" : "Doe",
      "first_name" : "Jane"
   }
}

Get pending invitations

Get all pending invitations

GET /api/invitations/pending

Example output

See all invitations

Get all outgoing invitations

Get all invitations you have sent

GET /api/invitations/outgoing

Example output

See all invitations

Get all incoming invitations

Get all invitations coming your way.

GET /api/invitations/incoming

Example output

See all invitations

Get all pending outgoing invitations

Get a list of invitations you have sent that have not been acted up-on.

GET /api/invitations/outgoing/pending

Example output

See all invitations

Get all pending incoming invitations

Get a list of invitations you have still to accept (or decline)

GET /api/invitations/incoming/pending

Example output

See all invitations

Delete an invitation

You can only delete a pending, outgoing invitation

DELETE /api/invitations/:id

Returns Status: 204 on success

Accept an invitation

PUT /api/invitations/:id/accept

Returns the updates invitation

Decline an invitation

PUT /api/invitations/:id/decline

Returns the updates invitation

comments powered by Disqus