Invites

Invite entity
NAMETYPEDESCRIPTION

id

int

Unique ID for the image.

namespace_id

int

ID of the namespace the invite was sent for.

invitee_id

int

ID of the user who received the invite.

inviter_id

int

ID of the user who sent the invite.

url

string

The API URL for the invite entity itself.

invitee

object

The user who received the invite.

inviter

object

The user who sent the invite.

namespace

object

The namespace the invite was for.

ENTITIES

List invites

List the invites for the currently authenticated user. This requires the invite:read permission for the user.

Returns

This will return a list of invites.

GET /invites
$ curl -X GET \
	-H "Authorization: Bearer 1a2b3c4d5f" \
	https://api.djinn-ci.com/invites

Create invites

This will create an invite for the currently authenticated user. This requires the invite:write permission.

Parameters
NAMETYPEREQUIREDDESCRIPTION

handle

string

Yes

The username of email of the user to invite.

Returns

Returns the sent invite. It returns an error if any of the parameters are invalid, or if an internal error occurs.

POST /n/:username/:path/-/invites
$ curl -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 1a2b3c4d5f" \
	-d '{"handle": "you"}' \
	https://api.djinn-ci.com/n/me/djinn/-/invites

$ curl -X POST \
	-H "Content-Type: application/json" \
	-H "Authorization: Bearer 1a2b3c4d5f" \
	-d '{"handle": "you@example.com"}' \
	https://api.djinn-ci.com/n/me/djinn/-/invites

Accept invite

This will accept the invite by the given :id. This requires the invite:write permission.

Returns

Returns the accepted invite, with only the namespace, inviter, and invitee fields.

PATCH /invites/:id
$ curl -X PATCH \
	-H "Authorization: Bearer 1a2b3c4d5f" \
	https://api.djinn-ci.com/invites/1

Reject invite

This will reject the invite by the given :id. This requires the invite:delete permission. Either the invitee or inviter can reject the invite.

Returns

This returns no content in the response body.

DELETE /invites/:id
$ curl -X DELETE \
	-H "Authorization: Bearer 1a2b3c4d5f" \
	https://api.djinn-ci.com/invites/1