Beanstalk

Invitation Resource

Admin privileges required for these API methods.

Readable attributes

id integer Unique ID of the Invitation.
account_id integer ID of the Account invitation belongs to.
creator_id integer ID of the User created the Invitation.
user_id integer ID of the User accepted the Invitation.
creator_name string Name of the User created the Invitation.
creator_email string Email address of the User created the Invitation.
secure_token string Unique secure key that is used by a signup_url.
signup_url string URL that can be used to finalize the invitation.
updated_at datetime Time when the Invitation was last updated.
created_at datetime Time when the Invitation was first added to the system.

Writable attributes

email string Required on create. Must be unique for Account.
name string Full name. Required on create.

Find All Invitations

json http-request
GET /api/invitations.json

Click to expand…

json http-response
[{
  "invitation": {
    "creator_email": "doesntexist@wildbit.com",
    "created_at": "2011/10/05 00:15:19 +0800",
    "updated_at": "2011/10/05 00:15:19 +0800",
    "account_id": 2,
    "id": 8,
    "creator_id": 2,
    "user_id": 3,
    "secure_token": "7510d65654649348657a500a9c",
    "creator_name": "John Doe",
    "signup_url": "https://acc.beanstalkapp.com/invitations/7510d65654649348657a500a9c/finish"
  }
}]
xml http-request
GET /api/invitations.xml

Click to expand…

xml http-response
<?xml version="1.0" encoding="UTF-8"?>
<invitations type="array">
  <invitation>
    <account-id type="integer">2</account-id>
    <created-at type="datetime">2011-10-05T00:15:19+08:00</created-at>
    <creator-email>doesntexist@wildbit.com</creator-email>
    <creator-id type="integer">2</creator-id>
    <creator-name>John Doe</creator-name>
    <user-id type="integer">3</user-id>
    <id type="integer">8</id>
    <secure-token>7510d65654649348657a500a9c</secure-token>
    <updated-at type="datetime">2011-10-05T00:15:19+08:00</updated-at>
    <signup-url>https://acc.beanstalkapp.com/invitations/7510d65654649348657a500a9c/finish</signup-url>
  </invitation>
</invitations>

Find Invitation

json http-request
GET /api/invitations/{INVITATION_ID}.json

Click to expand…

json http-response
{
  "invitation": {
    "creator_email": "doesntexist@wildbit.com",
    "created_at": "2011/10/05 00:15:19 +0800",
    "updated_at": "2011/10/05 00:15:19 +0800",
    "account_id": 2,
    "id": 8,
    "creator_id": 2,
    "user_id": 3,
    "secure_token": "7510d65654649348657a500a9c",
    "creator_name": "John Doe",
    "signup_url": "https://acc.beanstalkapp.com/invitations/7510d65654649348657a500a9c/finish"
  }
}
xml http-request
GET /api/invitations/{INVITATION_ID}.xml

Click to expand…

xml http-response
<?xml version="1.0" encoding="UTF-8"?>
<invitation>
  <account-id type="integer">2</account-id>
  <created-at type="datetime">2011-10-05T00:15:19+08:00</created-at>
  <creator-email>doesntexist@wildbit.com</creator-email>
  <creator-id type="integer">2</creator-id>
  <creator-name>John Doe</creator-name>
  <user-id type="integer">3</user-id>
  <id type="integer">8</id>
  <secure-token>7510d65654649348657a500a9c</secure-token>
  <updated-at type="datetime">2011-10-05T00:15:19+08:00</updated-at>
  <signup-url>https://acc.beanstalkapp.com/invitations/7510d65654649348657a500a9c/finish</signup-url>
</invitation>

Create Invitation

This method will create both User and Invitation for him. A usual invitation email with signup link will be delivered to the User.

json http-request
POST /api/invitations.json

{
  "invitation": {
    "user": {
      "email": "ilya+sabanin@example.com",
      "name": "Ilya Sabanin"
    }
  }
}

Click to expand…

json http-response
{
  "invitation": {
    "creator_email": "john@example.com",
    "created_at": "2011/10/02 18:16:38 -1100",
    "updated_at": "2011/10/02 18:16:38 -1100",
    "account_id": 2343434,
    "id": 434324,
    "creator_id": 232423456,
    "user_id": null,
    "secure_token": "375656f0c87574ff387218c8c0",
    "creator_name": "John Doe",
    "signup_url": "https://acc.beanstalkapp.com/invitations/375656f0c87574ff387218c8c0/finish"
  }
}
xml http-request
POST /api/invitations.xml

<invitation>
  <user>
      <email>ilya+sabanin@example.com</email>
      <first-name>Ilya</first-name>
      <last-name>Sabanin</last-name>
  </user>
</invitation>

Click to expand…

xml http-response
<?xml version="1.0" encoding="UTF-8"?>
<invitation>
  <account-id type="integer">2</account-id>
  <created-at type="datetime">2011-10-02T18:24:13-11:00</created-at>
  <creator-email>john@example.com</creator-email>
  <creator-id type="integer">2</creator-id>
  <creator-name>John Doe</creator-name>
  <id type="integer">7</id>
  <user-id></user-id>
  <secure-token>3c06b135b6fabd83ed6b345d79</secure-token>
  <updated-at type="datetime">2011-10-02T18:24:13-11:00</updated-at>
  <signup-url>https://acc.beanstalkapp.com/invitations/3c06b135b6fabd83ed6b345d79/finish</signup-url>
</invitation>

Resend Invitation

This method will resend an invitation to user’s email address.

json http-request
PUT /api/invitations/{USER_ID}/resend.json

Click to expand…

json http-response
{
  "invitation": {
    "creator_email": "john@example.com",
    "created_at": "2011/10/02 18:16:38 -1100",
    "updated_at": "2011/10/02 18:16:38 -1100",
    "account_id": 2343434,
    "id": 434324,
    "creator_id": 232423456,
    "user_id": null,
    "secure_token": "375656f0c87574ff387218c8c0",
    "creator_name": "John Doe",
    "signup_url": "https://acc.beanstalkapp.com/invitations/375656f0c87574ff387218c8c0/finish"
  }
}
xml http-request
PUT /api/invitations/{USER_ID}/resend.xml

Click to expand…

xml http-response
<?xml version="1.0" encoding="UTF-8"?>
<invitation>
  <account-id type="integer">2</account-id>
  <created-at type="datetime">2011-10-02T18:24:13-11:00</created-at>
  <creator-email>john@example.com</creator-email>
  <creator-id type="integer">2</creator-id>
  <creator-name>John Doe</creator-name>
  <id type="integer">7</id>
  <user-id type="integer"></user-id>
  <secure-token>3c06b135b6fabd83ed6b345d79</secure-token>
  <updated-at type="datetime">2011-10-02T18:24:13-11:00</updated-at>
  <signup-url>https://acc.beanstalkapp.com/invitations/3c06b135b6fabd83ed6b345d79/finish</signup-url>
</invitation>