invitations Resource

Overview

An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. An invitation consists of the following fields:

Field Description
groups One or more of the account's groups that the person was invited to.
invited by The user profile of the user issuing the invitation.
utc_sent_on A UTC value representing when the invitation was issued.
email The external email on the invite

GET a list of pending invitations

Gets a list of pending invitations on a team or individual account. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

Parameter Required Description
accountname Yes The name of an individual or team account.
GET https://api.bitbucket.org/1.0/users/{accountname}
  Click here to expand...

The call returns an array of invitations.

[
    {
        "groups": [
            "buserbb/testgroup"
        ],
        "invited_by": {
            "username": "buserbb",
            "first_name": "B",
            "last_name": "userbb",
            "is_team": false,
            "avatar": "https://secure.gravatar.com/avatar/b677e1e3bf1c781f852b288fd4b68480?d=identicon&s=32",
            "resource_uri": "/1.0/users/buserbb"
        },
        "utc_sent_on": "2012-07-19 16:22:51+00:00",
        "email": "joe789@yahoo.com"
    },
    {
        "groups": [
            "buserbb/testgroup",
            "buserbb/newgroup"
        ],
        "invited_by": {
            "username": "buserbb",
            "first_name": "B",
            "last_name": "userbb",
            "is_team": false,
            "avatar": "https://secure.gravatar.com/avatar/b677e1e3bf1c781f852b288fd4b68480?d=identicon&s=32",
            "resource_uri": "/1.0/users/buserbb"
        },
        "utc_sent_on": "2012-07-19 16:20:04+00:00",
        "email": "sally_jones@gmail.com"
    }
]

GET pending invitations for a particular email address

Gets any pending invitations on a team or individual account for a particular email address. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

Parameter Required Description
accountname Yes The name of an individual or team account.
email_address Yes The email address to get.
GET https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}
  Click here to expand...
{
    "groups": [
        "buserbb/testgroup",
        "buserbb/newgroup"
    ],
    "invited_by": {
        "username": "buserbb",
        "first_name": "B",
        "last_name": "userbb",
        "is_team": false,
        "avatar": "https://secure.gravatar.com/avatar/b677e1e3bf1c781f852b288fd4b68480?d=identicon&s=32",
        "resource_uri": "/1.0/users/buserbb"
    },
    "utc_sent_on": "2012-07-19 16:20:04+00:00",
    "email": "sally_jones@gmail.com"
}

GET a pending invitation for group membership

Tests whether there is a pending invitation for a particular email on account's group. An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

Parameter Required? Description
accountname Yes The name of an individual or team account.
group_owner Yes The name of an individual or team account that owns the group.
group_slug Yes An identifier for the group. The  slug  is an identifier constructed by the Bitbucket service. Bitbucket creates a  slug  by converting spaces to dashes and making all text lower case.
email_address Yes Name of the email address to delete.
GET https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}/{group_owner}/{group_slug} 
  Click here to expand...

This call returns OK if a invitation exists.

OK

Otherwise, it returns Not Found.

Not found

Issue an invitation to a group.

Issues an invitation to the specified account group. An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call does not check validate the email address.

When making this call, you must provide a Content-Length header even if the length is 0 (zero). This call takes the following parameters:

Parameter Required? Description
accountname Yes The name of an individual or team account.
group_owner Yes The name of an individual or team account that owns the group.
group_slug Yes An identifier for the group. The  slug  is an identifier constructed by the Bitbucket service. Bitbucket creates a  slug  by converting spaces to dashes and making all text lower case.
email_address Yes Name of the email address to delete.
PUT https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}/{group_owner}/{group_slug}
  Click here to expand...

This call returns OK if the invitation succeeds.

OK

Otherwise, it returns Not Found if specified group_slug does not exist.

Not found

DELETE pending invitations by email address

Deletes any pending invitations on a team or individual account for a particular email address. An invitation is a request sent to an external email address to participate one or more of an account's groups. If a email is invited on multiple groups, the invitation is removed from all groups. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

Parameter Required? Description
accountname Yes The name of an individual or team account.
email_address Yes Name of the email address to delete.
DELETE https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}

Upon success, this call returns 204 NO CONTENT.

DELETE pending invitation by group 

Deletes a pending invitation for a particular email on account's group. An invitation is a request sent to an external email address to participate one or more of an account's groups. Any user with admin access to the account can invite someone to a group. This call requires authorization and the caller must have administrative rights on the account. This call takes the following parameters:

Parameter Required? Description
accountname Yes The name of an individual or team account.
group_owner Yes The name of an individual or team account that owns the group.
group_slug Yes An identifier for the group. The  slug  is an identifier constructed by the Bitbucket service. Bitbucket creates a  slug  by converting spaces to dashes and making all text lower case.
email_address Yes Name of the email address to delete.
  DELETE   https://api.bitbucket.org/1.0/users/{accountname}/invitations/{email_address}/{group_owner}/{group_slug} 

Upon success, this call returns 204 NO CONTENT.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport