Invite a new person on behalf of an existing tester. The delivered email will use your Invite-a-Friend E-mail Template.

Friend Invitations differ from referrals (where a tester shares their unique referral link with a friend) in that recipients get an immediate invitation to your beta as if they had applied and been invited by you.

For example, to have an existing tester "john.doe@gmail.com" send an invitation to their friend "jane.doe@gmail.com":

Parameter Required? Description
sender_email Required The email address of the existing tester sending this invitation (inviter).
recipient_email Required The email address of the person receiving the invitation (invitee).
message Optional A personal message from the sender to the recipient.

Request

{
  "friend_invitation" : {
    "sender_email": "john.doe@gmail.com",
    "recipient_email": "jane.doe@gmail.com",
    "message": "Hi Jane, I really think you will love this site."
  }
}
      

Or, using curl:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"friend_invitation":{"sender_email":"john.doe@gmail.com","recipient_email":"jane.doe@gmail.com","message":"Hi Jane, I really think you will love this site."}}' https://api.prefinery.com/api/v2/betas/1/friend_invitations.json?api_key=secret
      

Response

HTTP/1.1 201 Created

{
  "id": 1,
  "created_at":"2012-10-23T11:44:58-05:00",
  "inviter": {
    "id": 1,
    "email": "john.doe@gmail.com",
    "status": "active",
    "invitation_code": "a05f6a467c",
    "imported_at": null,
    "applied_at": "2012-10-21T10:44:21-05:00",
    "invited_at": "2012-10-22T11:34:10-05:00",
    "joined_at": "2012-10-23T09:54:35-05:00",
    "unsubscribed_at": null,
    "share_clicks_count": 0,
    "share_signups_count": 0,
    "friend_invitations_count": 0,
    "friend_invitations_remaining": 5,
    "share_link": "http://l.aunch.us/FaKElInK",
    "referred_by": null,
    "created_at": "2012-10-21T10:44:21-05:00",
    "updated_at": "2012-10-23T09:54:35-05:00",
    "profile": {
      "first_name": null,
      "last_name": null,
      "employer": null,
      "jobtitle": null,
      "address_line1": null,
      "address_line2": null,
      "city": null,
      "state": "",
      "postal_code": "",
      "country": "",
      "telephone": "",
      "gender": null,
      "age": null,
      "facebook_username": null,
      "twitter_username": null,
      "linkedin_username": null,
      "browser_name": null,
      "browser_version": null,
      "os_name": null,
      "os_version": null,
      "ip": null
    }
  },
  "invitee": {
    "id": 2,
    "email": "jane.doe@gmail.com",
    "status": "invited",
    "invitation_code": "00509fdc65",
    "imported_at": null,
    "applied_at": null,
    "invited_at": "2012-10-23T11:44:58-05:00",
    "joined_at": null,
    "unsubscribed_at": null,
    "share_clicks_count": 0,
    "share_signups_count": 0,
    "friend_invitations_count": 0,
    "friend_invitations_remaining": 5,
    "share_link": "http://l.aunch.us/FaKElInK",
    "referred_by": null,
    "created_at": "2012-10-23T11:44:58-05:00",
    "updated_at": "2012-10-23T11:44:58-05:00",
    "profile": {
      "first_name": null,
      "last_name": null,
      "employer": null,
      "jobtitle": null,
      "address_line1": null,
      "address_line2": null,
      "city": null,
      "state": "",
      "postal_code": "",
      "country": "",
      "telephone": "",
      "gender": null,
      "age": null,
      "facebook_username": null,
      "twitter_username": null,
      "linkedin_username": null,
      "browser_name": null,
      "browser_version": null,
      "os_name": null,
      "os_version": null,
      "ip": null
    }
  }
}
      
Parameter Required? Description
sender-email Required The email address of the existing tester sending this invitation (inviter).
recipient-email Required The email address of the person receiving the invitation (invitee).
message Optional A personal message from the sender to the recipient.

Request

<?xml version="1.0" encoding="UTF-8"?>
<friend-invitation>
  <sender-email>john.doe@gmail.com</sender-email>
  <recipient-email>jane.doe@gmail.com</recipient-email>
  <message>Hi Jane, I really think you will love this site.</message>
</friend-invitation>
      

Or, using curl:

curl -H "Content-Type: text/xml" --data "<friend-invitation><sender-email>john.doe@gmail.com</sender-email><recipient-email>jane.doe@gmail.com</recipient-email><message>Hi Jane, I really think you will love this site.</message></friend-invitation>" https://api.prefinery.com/api/v2/betas/1/friend_invitations.xml?api_key=secret
      

Response

HTTP/1.1 201 Created
<?xml version="1.0" encoding="UTF-8"?>
<friend-invitation>
  <id type="integer">1</id>
  <created-at type="datetime">2012-10-23T11:44:58-05:00</created-at>
  <inviter>
    <id type="integer">1</id>
    <email>john.doe@gmail.com</email>
    <status>active</status>
    <invitation-code>a05f6a467c</invitation-code>
    <imported-at nil="true"/>
    <applied-at type="datetime">2012-10-21T10:44:21-05:00</applied-at>
    <invited-at type="datetime">2012-10-22T11:34:10-05:00</invited-at>
    <joined-at type="datetime">2012-10-23T09:54:35-05:00</joined-at>
    <unsubscribed-at nil="true"/>
    <share-clicks-count type="integer">0</share-clicks-count>
    <share-signups-count type="integer">0</share-signups-count>
    <friend-invitations-count type="integer">0</friend-invitations-count>
    <friend-invitations-remaining type="integer">5</friend-invitations-remaining>
    <share-link>http://l.aunch.us/P9lf</share-link>
    <referred-by nil="true"/>
    <created-at type="datetime">2012-10-21T10:44:21-05:00</created-at>
    <updated-at type="datetime">2012-10-23T09:54:35-05:00</updated-at>
    <profile>
      <first-name nil="true"/>
      <last-name nil="true"/>
      <employer nil="true"/>
      <jobtitle nil="true"/>
      <address-line1 nil="true"/>
      <address-line2 nil="true"/>
      <city nil="true"/>
      <state></state>
      <country></country>
      <postal-code></postal-code>
      <telephone></telephone>
      <gender nil="true"/>
      <age nil="true"/>
      <facebook-username nil="true"/>
      <twitter-username nil="true"/>
      <linkedin-username nil="true"/>
      <browser-name nil="true"/>
      <browser-version nil="true"/>
      <os-name nil="true"/>
      <os-version nil="true"/>
      <ip nil="true"/>
    </profile>
  </inviter>
  <invitee>
    <id type="integer">2</id>
    <email>jane.doe@gmail.com</email>
    <status>invited</status>
    <invitation-code>00509fdc65</invitation-code>
    <imported-at nil="true"/>
    <applied-at nil="true"/>
    <invited-at type="datetime">2012-10-23T11:44:58-05:00</invited-at>
    <joined-at nil="true"/>
    <unsubscribed-at nil="true"/>
    <share-clicks-count type="integer">0</share-clicks-count>
    <share-signups-count type="integer">0</share-signups-count>
    <friend-invitations-count type="integer">0</friend-invitations-count>
    <created-at type="datetime">2012-10-23T11:44:58-05:00</created-at>
    <updated-at type="datetime">2012-10-23T11:44:58-05:00</updated-at>
    <friend-invitations-remaining type="integer">5</friend-invitations-remaining>
    <share-link>http://l.aunch.us/XsJg</share-link>
    <referred-by nil="true"/>
    <profile>
      <first-name nil="true"/>
      <last-name nil="true"/>
      <employer nil="true"/>
      <jobtitle nil="true"/>
      <address-line1 nil="true"/>
      <address-line2 nil="true"/>
      <city nil="true"/>
      <state></state>
      <country></country>
      <postal-code></postal-code>
      <telephone></telephone>
      <gender nil="true"/>
      <age nil="true"/>
      <facebook-username nil="true"/>
      <twitter-username nil="true"/>
      <linkedin-username nil="true"/>
      <browser-name nil="true"/>
      <browser-version nil="true"/>
      <os-name nil="true"/>
      <os-version nil="true"/>
      <ip nil="true"/>
    </profile>
  </invitee>
</friend-invitation>
      

Errors

2501 A general error has occurred.
2502 The Invite-a-Friend System is disabled. You can enable Invite-a-Friend System via the Prefinery UI on the Advanced Settings page.
2503 Sender email is required.
2504 Tester record not found for sender email. The sender's email address must correspond to an existing tester in your beta.
2505 Sender not allowed to send invitations. The sender's tester record must be set to a status of Invited, Active, or Idle. An Applied or Rejected tester cannot invite friends.
2506 Recipient email is required.
2507 You cannot invite yourself.
2508 You have no more invitations. The sender has used up all of their friend invitations.
2509 You have already invited this person.
2510 Recipient email is invalid.